-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/virtual_machine: Switch ContainerView search to use manual filter #391
Conversation
There seems like there is possibly a bug in RetrieveWithFilter when it comes to MO's with missing keys and the function returning a false positive for the object in question. This has caused issues with the VM search functionality where duplicate UUID errors will be returned for VMs with UUIDs that are otherwise unique within vSphere inventory if there are orphaned VMs in inventory that lack a configuration (as in the whole config data object is missing). This bug applies to the provider when being used with vSphere 6.0 and earlier.
Ref: #382 @johnjelinek and anyone else having this issue can you give this fix a shot? Thanks! |
@vancluever just tell how to test it? I don't know |
@vancluever: I get the same error from this version |
nvm, I was forgetting a step to push in the new binary. Works on my machine 😄 ! It's slow though:
|
Great! Glad that it works! Just making one more change - would you be able to test it? It's a speed improvement. :) |
This actually results in a significant speedup. We only grab the UUID, versus the entire VM MO, as we always get the rest of the VM through other helpers.
@johnjelinek if you can check the latest commit here, that would be great! I actually tested the different searches on the vcsim with 1000 VMs and there definitely was a slowdown when all properties were being retrieved. Since we only need the UUID to check it, we can skip the rest, which brings it back closer to near |
much better, thanks!
|
Awesome! Merging now 👍 |
There seems like there is possibly a bug in
RetrieveWithFilter
when itcomes to MO's with missing keys and the function returning a false
positive for the object in question. This has caused issues with the VM
search functionality where duplicate UUID errors will be returned for
VMs with UUIDs that are otherwise unique within vSphere inventory if
there are orphaned VMs in inventory that lack a configuration (as in the
whole config data object is missing).
This bug applies to the provider when being used with vSphere 6.0 and
earlier.