-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adding while loop to wait for cluster container creation #4039
Adding while loop to wait for cluster container creation #4039
Conversation
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.
Thanks for your contribution.
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.
Looks good to me. If nobody complains, I'll merge this in a week or so.
Backport to stable-4: 💚 backport PR created✅ Backport PR branch: Backported as #4095 🤖 @patchback |
@tman5 thanks for your contribution! |
* Adding while loop to wait * Adding changelog fragment * Adding parameter and more docs * Adjusting docs Co-authored-by: Travis Scotto <tscotto@webstaurantstore.com> (cherry picked from commit 7aab449)
* Adding while loop to wait * Adding changelog fragment * Adding parameter and more docs * Adjusting docs Co-authored-by: Travis Scotto <tscotto@webstaurantstore.com> (cherry picked from commit 7aab449) Co-authored-by: tman5 <10875976+tman5@users.noreply.github.com>
SUMMARY
Fixes #3999
In a cluster scenario where the node running the Ansible creates a container on another node in the cluster, the playbook would fail because the
Status != Success
it was equal to running because the container wasn't created yet and took a bit. This will keep checking the status while it is running and then proceed once it is no longer listed as running.ISSUE TYPE
COMPONENT NAME
lxd module_util
ADDITIONAL INFORMATION
If the containers are all created on the node which the Ansible is executing on, the problem will never show itself.
See this discussion too: https://discuss.linuxcontainers.org/t/lxd-cluster-launch-command-creates-container-on-different-node-is-it-possible-to-disable-this-by-default/8389/8
Related: ansible/ansible#53426 (comment)