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: Fix vmware_guest cloning bug #58737

Merged
merged 3 commits into from
Jul 15, 2019
Merged

VMware: Fix vmware_guest cloning bug #58737

merged 3 commits into from
Jul 15, 2019

Conversation

nagonzalez
Copy link
Contributor

SUMMARY

Fixes #58721, #56861, #55551

VM cloning in 2.8 tries to create new disks even if they already exist in the original template.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vmware_guest

ADDITIONAL INFORMATION

This PR adds a conditional check that only creates new virtual devices if they aren't based off an existing disk.

@ansibot
Copy link
Contributor

ansibot commented Jul 4, 2019

@ansibot
Copy link
Contributor

ansibot commented Jul 4, 2019

@nagonzalez, just so you are aware we have a dedicated Working Group for vmware.
You can find other people interested in this in #ansible-vmware on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 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. new_contributor This PR is the first contribution by a new community member. small_patch support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community labels Jul 4, 2019
@Akasurde Akasurde changed the title fix vmware_guest cloning bug VMware: Fix vmware_guest cloning bug Jul 5, 2019
@Akasurde Akasurde requested review from goneri and jillr July 5, 2019 05:32
@Akasurde Akasurde self-assigned this Jul 5, 2019
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Jul 5, 2019
@Akasurde
Copy link
Member

Akasurde commented Jul 5, 2019

@nagonzalez Thanks for PR. Could you please add a test case for this change here ? Thanks.

@Akasurde
Copy link
Member

Akasurde commented Jul 5, 2019

@Tomorrow9 Could you please review this ? Thanks in advance

@nagonzalez
Copy link
Contributor Author

@Akasurde added test case. Tried to follow the existing standard as far as I could tell. Let me know if I need to change or add anything else.

@Akasurde
Copy link
Member

Akasurde commented Jul 9, 2019

@nagonzalez Thanks for the tests and fix. @Tomorrow9 Could you please review this ? Thanks.


- assert:
that:
- l_clone_template_modify_disks.changed | bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just do: - l_clone_template_modify_disks is changed

autoselect_datastore: True
template: clone_resize_disks_original
state: poweredoff
register: l_clone_template_modify_disks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you've the opportunity, it would be nice to reduce the length of the variable, this will improve the readability a bit.

@Tomorrow9
Copy link
Contributor

@nagonzalez Thanks for the tests and fix. @Tomorrow9 Could you please review this ? Thanks.

Hi @Akasurde, sorry for not response in time, I was on vacation last week.

@realged13
Copy link

I have confirmed that this has been fixed as well.

@Akasurde
Copy link
Member

@realged13 Thanks for confirmation.

@ansible ansible locked and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 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. new_contributor This PR is the first contribution by a new community member. small_patch support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VMware: vmware_guest throws vmdk already exists
7 participants