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

Make vmware_guest honor "wait_for_ip_address" when powering on a VM #45226

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

albers
Copy link
Contributor

@albers albers commented Sep 5, 2018

SUMMARY

Fixes #45223

It turned out that the vmware_guest module does not check for ip availability at all in the desired_operation='set_vm_power_state' case.

This PR adds a call to wait_for_vm_ip in the same manner as done in vmware_dploy_ovf.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vmware_guest

ANSIBLE VERSION
ansible 2.7.0b1.post0 (stable-2.7 8a8da98546) last updated 2018/09/03 10:13:33 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/devops/ansible/ansible/lib/ansible
  executable location = /home/user/devops/ansible/ansible/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
ADDITIONAL INFORMATION

The return value's instance value is updated with the last poll result so that the IP is also available in the module's return value.

This module now uses the same shared function wait_for_vm_ip as vmware_deploy_ovf does, so it is inherently affected by #45159. As the undetected timeout occurs after 5 minutes, this should not be a big issue in this context.

Signed-off-by: Harald Albers <github@albersweb.de>
@ansibot
Copy link
Contributor

ansibot commented Sep 5, 2018

@ansibot
Copy link
Contributor

ansibot commented Sep 5, 2018

Hi @albers,

Thank you for the pullrequest, 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.8 This issue/PR affects Ansible v2.8 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. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community labels Sep 5, 2018
@Akasurde Akasurde self-requested a review September 6, 2018 13:15
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Sep 6, 2018
Copy link
Contributor

@Im0 Im0 left a comment

Choose a reason for hiding this comment

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

Thanks @albers - I have tested on 6.7 and works fine for me.

@Akasurde Akasurde merged commit a9c829b into ansible:devel Sep 10, 2018
@Akasurde
Copy link
Member

@albers Thanks for the contribution. @Im0 Thanks for reviewing and testing.

@albers albers deleted the issue-45223 branch September 10, 2018 08:11
@albers
Copy link
Contributor Author

albers commented Sep 12, 2018

@Akasurde Can we get this one into the 2.7 release, please?

@Akasurde
Copy link
Member

@albers I already did - #45540 (comment)

@albers
Copy link
Contributor Author

albers commented Sep 18, 2018

Thanks!

@albers
Copy link
Contributor Author

albers commented Sep 18, 2018

@Akasurde Sorry, but this is another PR. #45429 was pulled in but this one (#45226) not.

@albers
Copy link
Contributor Author

albers commented Sep 28, 2018

@Akasurde Can we please, please get this one into 2.7?

@pdellaert
Copy link
Contributor

pdellaert commented Sep 28, 2018

Ok, just removing the comment, i must be tired :). Missed that it didn't yet make it. @Akasurde will have to cherry-pick, if that is still allowed for 2.7

Akasurde pushed a commit to Akasurde/ansible that referenced this pull request Sep 28, 2018
)

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a9c829b)
@Akasurde
Copy link
Member

@albers @pdellaert PR for Stable-2.7 #46248

abadger pushed a commit that referenced this pull request Oct 9, 2018
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a9c829b)
@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.8 This issue/PR affects Ansible v2.8 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. 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_guest ignores "wait_for_ip_address" when powering on a VM
5 participants