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

race condition bug in docs example #369

Open
verhulstm opened this issue Jul 18, 2020 · 1 comment
Open

race condition bug in docs example #369

verhulstm opened this issue Jul 18, 2020 · 1 comment

Comments

@verhulstm
Copy link
Member

verhulstm commented Jul 18, 2020

the example file provision.sh at https://terminallabs-rambo.readthedocs.io/en/latest/core/provisioning/ has a race condition in it.

between:

echo "Installing Salt with master and Python 3"
bash bootstrap-salt.sh -M -x python3

echo "Accepting the local minion's key"
salt-key -A -y

this often fails. but it is also random. after installing the salt system the minions take some time to start up. if the minion is not fully loaded by the time "salt-key -A -y" is run the whole build will fail.

i put in a sleep 5s delay to give the minion time to load and send it's key to the master. that fixed it for now

@nixjdm
Copy link
Member

nixjdm commented Jul 18, 2020

Ok, yeah, that's annoying. Maybe I'll post an issue for salt about this. I've handled the same thing in the next step of the script by checking the exit codes. I'll do that here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants