-
Notifications
You must be signed in to change notification settings - Fork 419
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
fix(service): service salt-master and salt-minion to restart last #482
fix(service): service salt-master and salt-minion to restart last #482
Conversation
When running a high-state on the salt-master to deploy itself, the run fails with an Authentication error occurred because the master restarts half way though.
Best reviewed: commit by commit
Optimal code review plan
|
Hello @remichristiaan. Do you have debug outputs of the problems and debug outputs with the fixes? I'm wondering if the tests could trigger a master/minion restart to check this… |
I think you could by using Inspec remote command module (https://docs.chef.io/inspec/resources/command/) ... but it would be very tricky... |
I was more thinking about adding some pillars for the formula to do a restart of the service but the configuration files are copied using a |
I do not have debug outputs unfortunately ... I ran into this problem on the go and tried a fix that seems to help in 8 out of 10 runs which probably gets caused by a requisite declaration that overrides the order option. So this needs a bit more digging, but then again it might be an edge case that I ran into. Similar problem with the openvpn-formula ... if the vpn restarts before the states could all finish, it stops in mid-way. |
Thanks for this PR, @remichristiaan. We discussed it briefly in the Formulas' working group meeting yesterday and @baby-gnu mentioned that he will check what can be done with Kitchen first. |
Sorry, I could only do manual testing since I don't find a way to run the formula twice in a kitchen run.
Without this patch, this results in the following:
So, the master is restarted just after it's configuration is modified and the minion states are done after. With the patch, the services are restarted after all configuration are done:
|
So, I can't find a way to automate the testing. Sorry. |
That why I thought it could be done with Inspec. |
I don't think it's possible to run something (highstate or formula depending of the specific config) twice if it succeeds. If it fails, it's possible using |
Thanks for the patience, @remichristiaan -- merged based on approving reviews (x2). |
🎉 This PR is included in version 1.5.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
When running a high-state on the salt-master to deploy itself, the run fails
with an Authentication error occurred because the master restarts half way though.
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Describe the changes you're proposing
Pillar / config required to test the proposed changes
Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context