-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
VMware: confine search for network till datacenter level #40382
Conversation
@pdellaert @dericcrago @warthog9 Can you please review this ? |
If there are multiple distributed virtual portgroup network with same name in different datacenter, vmware_guest module used to choose first DVPG irrespective of the datacenter. This caused problem if two datacenter has same name for DVPG, vmware_guest module failed with error "The object or item referred to could not be found." This fix adds check to search for network (Distributed Virtual Portgroup) till datacenter level. This avoids selection of same name DVPG from other datacenter. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@dericcrago @pdellaert Could you please review this ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mimic/test this in the vc sim? Create two DC's with same DVS/dvPG. and a test case with normal vSwitch and portgroup? To see we get the right one?
Code wise it looks good,just want to make sure it is tested
@pdellaert I am afraid as vcsim does not handle dvpg and dvswitch properly. |
SUMMARY
If there are multiple distributed virtual portgroup network with same name
in different datacenter, vmware_guest module used to choose first DVPG irrespective
of the datacenter. This caused problem if two datacenter has same name for DVPG,
vmware_guest module failed with error "The object or item referred to could not be found."
This fix adds check to search for network (Distributed Virtual Portgroup)
till datacenter level. This avoids selection of same name DVPG from other datacenter.
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/cloud/vmware/vmware_guest.py
ANSIBLE VERSION