You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix unless-stopped containers not restarting after podman-restart.service stop them
When `podman-restart.service` stops containers, it marks them as "stopped by
user" which breaks the `unless-stopped` restart policy. Add hidden
`--not-stopped-by-user` flag to prevent this, allowing `unless-stopped`
containers to restart on next boot.
Fixes: #28152
Fixes: https://issues.redhat.com/browse/RUN-4357
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
cannotStopErr=fmt.Errorf("can only stop created or running containers. %s is in state %s: %w", c.ID(), c.state.State.String(), define.ErrCtrStateInvalid)
1391
1397
}
1392
1398
1393
-
c.state.StoppedByUser=true
1399
+
if!notStoppedByUser {
1400
+
c.state.StoppedByUser=true
1401
+
}
1402
+
1394
1403
ifcannotStopErr==nil {
1395
1404
// Set the container state to "stopping" and unlock the container
1396
1405
// before handing it over to conmon to unblock other commands. #8501
0 commit comments