-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
(Option to) create podman containers with --restart=always to restart cluster after reboots #3463
Comments
can you send a link to this? last time we checked it was not working |
There are limitations, but generally it works as described in the podman documentation. The restart service is packaged (and enabled) in Ubuntu and supposedly any Debian-based distro, likely other distros as well. Here's the relevant service excerpt on a Ubuntu mantic system as seen by
Unfortunately, this only works for podman containers run by root, and currently stopping containers tends to run into timeouts on shutdown. Due to podman's design, even root doesn't see all user containers, so they won't get stopped or started by the systemd service which runs as root by default. It's not too difficult, though, to replicate it as a service running as kind user if running as root is not desired. |
Always works poorly because on a failed cluster startup it will keep retrying indefinitely. we don't use this policy with the docker runtime, we set one time restart. See the podman tracking issues. Restart is also going to be problematic without DNS for node names |
Points taken. I get reliable cluster reboots with a user crontab like
While I agree that it shouldn't be the default, if |
If we can get restarts working reliably in podman, it will be the default, we don't want to add more knobs or worse container runtime specific knobs. #2272 is the existing tracking issue for podman. |
a quick echo of the point @cr made. indeed for us a podman start --all --filter 'name=<our-kind-cluster-name>' does seem to restore kubernetes functionally after a podman machine restart. it would be nice if this could be generalized? while a |
changing the naming scheme of the containers would break a LOT of stuff (aside: it shouldn't be something like |
thanks @BenTheElder! i think |
What would you like to be added:
--restart=always
. Landing this behind an option would be fine, too.At this point, podman containers making up kind clusters have to be re-started manually after reboot with something like
podman start --all
.Podman installations typically come with systemd services that stop all containers on system shutdown, but on system boot they only re-start containers with restart policy
always
(verified for podman on Ubuntu). Since that policy can only be controlled on container creation, the workarounds are rather cumbersome.This looks somewhat related to #148.
Why is this needed:
The text was updated successfully, but these errors were encountered: