Last active
January 7, 2016 11:12
-
-
Save jpic/8a94155f4b333de272fd to your computer and use it in GitHub Desktop.
Fix a race condition between the reactor and salt-call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -248,7 +248,12 @@ salt_call() { | |
loglevel="-l debug" | |
fi | |
- salt-call $color --state-output=mixed --retcode-passthrough $loglevel $@ | |
+ local call="salt-call $color --state-output=mixed --retcode-passthrough $loglevel" | |
+ | |
+ # This feature prevents race conditions ie. reactor started a job and it | |
+ # has to finish before we can call a state function. | |
+ retry $call state.show_sls test | |
+ $call $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment