- Notifications
You must be signed in to change notification settings - Fork2.9k
Fixunless-stopped restart policy to match Docker behavior#27619
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR isAPPROVED This pull-request has been approved by:Honny1 The full list of commands accepted by this bot can be foundhere. The pull request process is describedhere Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5b28844 to33a8d52Compare[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Luap99 commentedNov 27, 2025
I haven't looked at the code but I find Given this only targets the on boot start , maybe something more like |
33a8d52 tob5b5d8fCompareHonny1 commentedNov 27, 2025
That is a much better name. I have renamed it |
- Update documentation: Differentiate `unless-stopped` from `always` - containers stopped by the user before a reboot will not restart.- Add `should-start-on-boot` filter: Identify containers that require a restart after a system reboot.- Update command documentation: Add `restart-policy` and `label!` filters to the documentation for container commands (rm, ps, start, stop, pause, unpause, restart).- Add `restart-policy` and `shoud-start-on-boot` to completions.- Update service: Update `podman-restart.service` to use the `needs-restart=true` filter.- Preserve state: Preserve the `StoppedByUser` state across reboots.- Update API: Add a `ShouldStartOnBoot()` method to the Container API.- Update documentation: Add descriptions for the `should-start-on-boot` filter.Fixes:https://issues.redhat.com/browse/RHEL-129405Fixes:containers#20418Signed-off-by: Jan Rodák <hony.com@seznam.cz>
b5b5d8f to22bc44cCompare
Uh oh!
There was an error while loading.Please reload this page.
unless-stoppedfromalways- containers stopped by the user before a reboot will not restart.should-start-on-bootfilter: Identify containers that require a restart after a system reboot.restart-policyandlabel!filters to the documentation for container commands (rm, ps, start, stop, pause, unpause, restart).restart-policyandshoud-start-on-bootto completions.podman-restart.serviceto use theneeds-restart=truefilter.StoppedByUserstate across reboots.ShouldStartOnBoot()method to the Container API.should-start-on-bootfilter.Fixes:https://issues.redhat.com/browse/RHEL-129405
Fixes:#20418
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. SeeCONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?