Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
Honny1 wants to merge1 commit intocontainers:main
base:main
Choose a base branch
Loading
fromHonny1:fix-unless-stopped-reboot

Conversation

@Honny1
Copy link
Member

@Honny1Honny1 commentedNov 27, 2025
edited
Loading

  • Update documentation: Differentiateunless-stopped fromalways - containers stopped by the user before a reboot will not restart.
  • Addshould-start-on-boot filter: Identify containers that require a restart after a system reboot.
  • Update command documentation: Addrestart-policy andlabel! filters to the documentation for container commands (rm, ps, start, stop, pause, unpause, restart).
  • Addrestart-policy andshoud-start-on-boot to completions.
  • Update service: Updatepodman-restart.service to use theneeds-restart=true filter.
  • Preserve state: Preserve theStoppedByUser state across reboots.
  • Update API: Add aShouldStartOnBoot() method to the Container API.
  • Update documentation: Add descriptions for theshould-start-on-boot filter.

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:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, usegit commit -s --amend). The author email must match
    the sign-off email address. SeeCONTRIBUTING.md
    for more information.
  • Referenced issues usingFixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits passmake validatepr (format/lint checks)
  • Release note entered in the section below (orNone if no user-facing changes)

Does this PR introduce a user-facing change?

The `unless-stopped` restart policy now correctly matches Docker behavior by preserving the user-stopped state across reboots, and includes a new `should-start-on-boot` filter.

@openshift-ciopenshift-cibot added release-note do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress. labelsNov 27, 2025
@openshift-ci
Copy link
Contributor

[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/approve in a comment
Approvers can cancel approval by writing/approve cancel in a comment

@openshift-ciopenshift-cibot added the approvedIndicates a PR has been approved by an approver from all required OWNERS files. labelNov 27, 2025
@Honny1Honny1force-pushed thefix-unless-stopped-reboot branch from5b28844 to33a8d52CompareNovember 27, 2025 13:06
@packit-as-a-service
Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@Luap99
Copy link
Member

I haven't looked at the code but I findneeds-restart a confusing name, internally we also already have a ShouldRestart() function so it isn't at all clear what this means.

Given this only targets the on boot start , maybe something more likeshould-start-on-boot/ShouldStartOnBoot?

Honny1 reacted with thumbs up emoji

@Honny1Honny1force-pushed thefix-unless-stopped-reboot branch from33a8d52 tob5b5d8fCompareNovember 27, 2025 13:40
@Honny1
Copy link
MemberAuthor

Given this only targets the on boot start , maybe something more likeshould-start-on-boot/ShouldStartOnBoot?

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>
@Honny1Honny1force-pushed thefix-unless-stopped-reboot branch fromb5b5d8f to22bc44cCompareNovember 27, 2025 14:16
@Honny1Honny1 marked this pull request as ready for reviewNovember 27, 2025 14:27
@openshift-ciopenshift-cibot removed the do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress. labelNov 27, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.release-note

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

podman-restart.service Does Not Restart "unless-stopped" Containers

2 participants

@Honny1@Luap99

[8]ページ先頭

©2009-2025 Movatter.jp