Skip to content
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

Merged
merged 1 commit into from
Aug 7, 2018

Conversation

Akasurde
Copy link
Member

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
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/modules/cloud/vmware/vmware_guest.py

ANSIBLE VERSION
2.6devel

@ansibot
Copy link
Contributor

ansibot commented May 18, 2018

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. owner_pr This PR is made by the module's maintainer. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community labels May 18, 2018
@Akasurde Akasurde added affects_2.5 This issue/PR affects Ansible v2.5 and removed needs_triage Needs a first human triage before being processed. labels May 18, 2018
@Akasurde
Copy link
Member Author

@pdellaert @dericcrago @warthog9 Can you please review this ?

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 26, 2018
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. small_patch and removed community_review In order to be merged, this PR must follow the community review workflow. owner_pr This PR is made by the module's maintainer. labels Jun 27, 2018
@webknjaz webknjaz added this to IN PROGRESS in CEM Jul 2, 2018
@ansibot ansibot added the owner_pr This PR is made by the module's maintainer. label Jul 13, 2018
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>
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html small_patch stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 27, 2018
@Akasurde
Copy link
Member Author

@dericcrago @pdellaert Could you please review this ?

Copy link
Contributor

@pdellaert pdellaert left a 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

@Akasurde
Copy link
Member Author

@pdellaert I am afraid as vcsim does not handle dvpg and dvswitch properly.

@Akasurde Akasurde merged commit 5936e1f into ansible:devel Aug 7, 2018
@Akasurde Akasurde deleted the 38955 branch August 7, 2018 16:40
@webknjaz webknjaz moved this from IN PROGRESS to DONE in CEM Sep 10, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. owner_pr This PR is made by the module's maintainer. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community
Projects
No open projects
CEM
DONE
Development

Successfully merging this pull request may close these issues.

None yet

3 participants