podman: redis fails to start on reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Dan Prince |
Bug Description
In t-h-t 1d9629ec0b3320b
Podman is more sensitive to bind mounts and requires it to exist before starting the container. As such today we get the following error when a non-pacemaker machine is rebooting using podman redis:
podman: unable to start container b623c85da9421b9
Changed in tripleo: | |
assignee: | nobody → Dan Prince (dan-prince) |
Changed in tripleo: | |
milestone: | none → stein-3 |
The best way to fix this is to use systemd to recreate the required /var/run directories and setup permissions there accordingly. Something like this works:
[Unit] container- shutdown. service y=redis /bin/chcon -t svirt_sandbox_ file_t /var/run/redis /usr/bin/ podman start -a redis /usr/bin/ podman stop -t 10 redis
Description=redis container
After=paunch-
Wants=
[Service]
Restart=always
RuntimeDirector
ExecStartPre=
ExecStart=
ExecStop=
KillMode=process
[Install] multi-user. target
WantedBy=
----
NOTE: the addition of RuntimeDirectory and ExecStartPre sections above. I think the best solution here it to make paunch's systemd abstraction "leaky" with regards to systemd.unit creation such that we can inject ad-hoc systemd settings for each services.