-
Notifications
You must be signed in to change notification settings - Fork 7
fix: run systemctl daemon-reload before Containerd restart #842
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
Conversation
During Machine bootstrapping Contianerd drop in files may be added. These files are written to the disk before preKubeadmCommmands are run. Always run systemctl daemon-reload along with systemctl restart containerd to pick up these drop-ins.
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.
Are there no tests to update? 🫣
This systemctl behavior is unfortunate. Systemctl knows when you need to run Because We can also avoid running it by first checking if it's required for any service whose configuration we've updated. Example: if [ $(systemctl show containerd -p NeedDaemonReload --value) == "yes" ]; then
systemctl daemon-reload
fi
systemctl restart containerd |
For long-term maintenance, I think we might want to factor this out, so that we have this general structure:
|
Great idea @dlipovetsky, let me create an issue in this repo. We've gone through a couple of iterations now of this common Contianerd command that's needed by different handlers and moving it out to somewhere more generic makes sense to me. |
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.
Good as a short-term implementation. We can revisit in the future.
Doing a test with this suggestion. |
Only systemctl daemon-reload when needed.
f6701bd
to
5969a52
Compare
🤖 I have created a release *beep* *boop* --- ## 0.13.6 (2024-08-05) <!-- Release notes generated using configuration in .github/release.yaml at main --> ## What's Changed ### Fixes 🔧 * fix: run systemctl daemon-reload before Containerd restart by @dkoshkin in #842 **Full Changelog**: v0.13.5...v0.13.6 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
What problem does this PR solve?:
During Machine bootstrapping Contianerd drop in files may be added.
These files are written to the disk before
preKubeadmCommmands
are run.Always run systemctl daemon-reload along with systemctl restart containerd to pick up these dropins.
I saw a warning about the drop-ins when cloud init runs the Containerd restart script, so figured it makes sense to add it here instead of a separate script.
Which issue(s) this PR fixes:
Fixes #
How Has This Been Tested?:
Special notes for your reviewer: