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
mutex: Add a logical mutex locking module to help prevent global or per-host race conditions #50382
Conversation
e622812
to
8de1556
Compare
The test
The test
The test
|
4f05c85
to
a52db3e
Compare
Please note that #47322 includes a
lot of changes and bug fixes to FileLock, you probably want to use that
after those changes has been merged. It should(tm) be good to go, waiting
for final review from @abadger
…On Sat, 29 Dec 2018, 16:33 Aram Alipoor ***@***.*** wrote:
@bcoca <https://github.com/bcoca> @acalm <https://github.com/acalm>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#50382 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQu64HqnluYiAQwAsXJaYnzS0VufQLPZks5u94s_gaJpZM4ZknJs>
.
|
The test
|
f359c7b
to
61bff16
Compare
…er-host race conditions
61bff16
to
cfa8043
Compare
@AnderEnder @gregswift @jarv @jhoekx @linuxdynasty @tbielawa As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add |
Work in progress
SUMMARY
We usually need to have a global mutex lock to avoid simultaneous ansible playbooks to run from our bastion machine targeting our cluster.
One example is adding a new node to the cluster, which due to many complex tasks involved must be done only once "per cluster" at a time. This needs a global mutex on the bastion machine to prevent other ansible processes to run the same role/tasks.
Another example would be per-host procedures which don't have internal locks.
Before diving deep into creating a custom module it would be great to have your feedbacks on such a module. Is this a good practice to provide users with a mutex locking module at all? Based on current description in
mutex.py
in this PR, would this be a useful module?I intend to use file.py's LockFile and create a lock file on the machine that is running the ansible process.
ISSUE TYPE
COMPONENT NAME
mutex
Related to issue #31096
Disclaimer: I'm new to python and contributing to Ansible