VMware Cloud Community
b0rbb
Enthusiast
Enthusiast

Get-ExternalNetwork only showing 10 results...

Not sure if this would be better suited to the vCloud Director forum, but in an environment where we have over 80 or so External Network "entities" within vCloud Director (1.5.1 running on full vSphere 5 U1) and we run the Get-ExternalNetwork cmdlet against our CIServer, we only get back 10 items.

I was under the assumption that if a specific CIServer isn't specified in the Get-ExternalNetwork cmdlet, that it would pull ALL External Networks from whatever CIServer the user is currently connected to.

Anyone else see anything like this?  Does "Get-ExternalNetwork" only pull just 10 results?

0 Kudos
10 Replies
LucD
Leadership
Leadership

Moved the thread to the vCloud Director PowerCLI community


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
AtanasAtanasov
VMware Employee
VMware Employee

Hello,

Can you try to run:

Search-Cloud -QueryType ExternalNetwork | Measure-Object

and paste the result here?

b0rbb
Enthusiast
Enthusiast

Results from running "Search-Cloud -QueryType ExternalNetwork | Measure-Object":

Count    : 10
Average  :
Sum      :
Maximum  :
Minimum  :
Property :
0 Kudos
b0rbb
Enthusiast
Enthusiast

I just tried this out on a separate vCloud instance we have running here (more of a sandbox environment).  Made 7 new External Network objects to bring it's actual total up to 11 External Networks.

Running Get-ExternalNetwork on this "sandbox" vCD instance shows all 11 External Networks.

Still not sure why my "Production" instance only shows 10, when there's over 80+  Smiley Sad

0 Kudos
b0rbb
Enthusiast
Enthusiast

So this is weird.

After looking at Activity Monitor in SQL (for the vCloud Database, trying to determine where it's pulling data from) , while spamming the "Get-ExternalNetwork" cmdlet, it eventually enumerated all 104 (not 80+, apologies) External Networks!

Doing a Measure-Object on the ExternalNetwork object also showed 104 for the count.

What's really weird?

If I do a "Get-Org", it enumerates all Organizations (around 100), but if I do "Search-Cloud -QueryType Organization | Measure-Object", I get a count of 10.

I'm totally confused here.

0 Kudos
AtanasAtanasov
VMware Employee
VMware Employee

Thank you for the additional info. Feel free to share any info you might think related.

When Search-Cloud returns 10 results again, can you try Get-ExternalNetwork -Name * ? That seems to be a workaround until we find the root cause.

What DB server are you using? Oracle or SqlServer?

0 Kudos
b0rbb
Enthusiast
Enthusiast

Go figure, I run "Get-ExternalNetwork -Name *", and now I only get just the 10 results again.

This is just 10 minutes after running just "Get-ExternalNetwork" and having it return all 104 ExternalNetworks.

Even more odd, is that these 10 results I get back are ALWAYS the same.

This particular instance of vCloud Director has an Oracle 10g Database backend, the other one (that isn't have issues) is running SQL Server 2008 R2 Standard.

I'm guessing this has to be something of a database issue then?

(Remember, same versions of vCloud Director on both instances)

0 Kudos
AtanasAtanasov
VMware Employee
VMware Employee

When the "10-result" situation occur, do you still see all the objects in the GUI of VCD? (there is a "Refresh" button in the GUI that you can use to refresh the view)

0 Kudos
b0rbb
Enthusiast
Enthusiast

That's the weird thing too!

Whenever these "10-result" situations occur, I'll have a browser window open to the System Org within vCloud Director, and ALL ExternalNetworks show.

Also, if I perform a "Get-Org", all Organizations are enumerated, but if I do a "Search-Cloud -QueryType Organization | Measure-Object", it will always come back with 10, so while the "10-result" might show on a "count" of the object, it doesn't always hold true for the cmdlet to actually enumerate all rows for that object.

0 Kudos
AtanasAtanasov
VMware Employee
VMware Employee

Get-Org does not use that query to retrieve the organizations, that is why it is not affected.

How often does the problem appear for you? Have you created some new orgs or external networks at a time close and before the call that returns the 10 results?

Also can you try these:

Search-Cloud -QueryType organization -Filter "name==*&sortAsc=name"

Search-Cloud -QueryType organization -Filter "name==*&sortAsc=name"

and tell me if those would return all the results.

0 Kudos