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

Add rudimentary wait for os_zone #54391

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@ederst
Copy link
Contributor

ederst commented Mar 26, 2019

SUMMARY

This adds a rudimentary wait functionality for the os_zone module.

It will wait for:

  • Zone not in OpenStack API when choosing absent
  • Zone status being AVAILABLE in OpenStack when choosing present

Before the os_zone module did not wait for changes to be applied. Thus, this could lead to errors when for example trying to add record sets in subsequent tasks, or when deleting and recreating zones (PENDING and/or DELETING state counted as present).

Fixes: #54680

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

os_zone

ADDITIONAL INFORMATION

Before deleting, creating, and adding record sets could lead to the following behavior with an already existing zone (pseudo task output):

TASK [delete zone]
changed: []

TASK [create zone]
ok: [] # it says ok here because zone still exists (but in PENDING/DELETING state)

TASK [Create record sets] 
fatal: [zone does not exist]

However, with this change the following should happen:

TASK [delete zone]
changed: []

TASK [create zone]
changed: []

TASK [Create record sets] 
changed: []
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 26, 2019

The test ansible-test sanity --test pylint [explain] failed with 4 errors:

lib/ansible/modules/cloud/openstack/os_zone.py:146:0: trailing-whitespace Trailing whitespace
lib/ansible/modules/cloud/openstack/os_zone.py:214:0: trailing-whitespace Trailing whitespace
lib/ansible/modules/cloud/openstack/os_zone.py:217:0: trailing-whitespace Trailing whitespace
lib/ansible/modules/cloud/openstack/os_zone.py:231:0: trailing-whitespace Trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 5 errors:

lib/ansible/modules/cloud/openstack/os_zone.py:140:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/cloud/openstack/os_zone.py:146:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/openstack/os_zone.py:214:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/openstack/os_zone.py:217:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/openstack/os_zone.py:231:1: W293 blank line contains whitespace

click here for bot help

Add rudimentary wait for os_zone
This adds a rudimentary wait functionality for the os_zone module.

It will wait for:
* Zone not in OpenStack API when choosing `absent`
* Zone `status` being `AVAILABLE` in OpenStack when choosing `present`

@ederst ederst force-pushed the infonova:implement-wait-to-os_zones branch to ca0d0f7 Mar 26, 2019

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Mar 26, 2019

Build succeeded (third-party-check pipeline).

@ederst

This comment has been minimized.

Copy link
Contributor Author

ederst commented Mar 27, 2019

ready_for_review

@ederst

This comment has been minimized.

Copy link
Contributor Author

ederst commented Mar 27, 2019

bot_status

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 27, 2019

Components

lib/ansible/modules/cloud/openstack/os_zone.py
support: community
maintainers: Shrews cloudnull dagnello emonty evrardjp juliakreger mnaser odyssey4me rcarrillocruz

Metadata

waiting_on: maintainer
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 0
shipit_actors (maintainer or core team member): []
shipit_actors_other: []
automerge: automerge shipit test failed

click here for bot help

@mnaser

mnaser approved these changes Apr 2, 2019

Copy link
Contributor

mnaser left a comment

shipit

thanks!!!

@ansibot ansibot removed the needs_triage label Apr 2, 2019

@ederst

This comment has been minimized.

Copy link
Contributor Author

ederst commented Apr 4, 2019

bot_status

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Apr 4, 2019

Components

lib/ansible/modules/cloud/openstack/os_zone.py
support: community
maintainers: Shrews cloudnull dagnello emonty evrardjp juliakreger mnaser odyssey4me rcarrillocruz

Metadata

waiting_on: maintainer
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 1
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 0
shipit_actors (maintainers or core team members): mnaser
shipit_actors_other: []
automerge: automerge shipit test failed

click here for bot help

@ansibot ansibot added the stale_ci label Apr 4, 2019

@ederst ederst closed this Apr 4, 2019

@ederst ederst reopened this Apr 4, 2019

@ansibot ansibot removed the stale_ci label Apr 4, 2019

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Apr 4, 2019

Build succeeded (third-party-check pipeline).

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Apr 12, 2019

@ansibot ansibot added the stale_ci label Apr 12, 2019

@ederst ederst closed this Apr 19, 2019

@ederst ederst reopened this Apr 19, 2019

@ansibot ansibot removed the stale_ci label Apr 19, 2019

@openstack-zuul

This comment has been minimized.

Copy link

openstack-zuul bot commented Apr 19, 2019

Build succeeded (third-party-check pipeline).

@ederst

This comment has been minimized.

Copy link
Contributor Author

ederst commented Apr 19, 2019

shipit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.