Skip to content
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

Containers created with --restart=always do not restart when started through a pod #19671

Closed
nivekuil opened this issue Aug 18, 2023 · 3 comments · Fixed by #19676
Closed

Containers created with --restart=always do not restart when started through a pod #19671

nivekuil opened this issue Aug 18, 2023 · 3 comments · Fixed by #19676
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@nivekuil
Copy link

Issue Description

containers created with --restart=always do not restart when they exit, when started through the parent pod

Steps to reproduce the issue

Steps to reproduce the issue

  1. podman pod create --name test-pod
  2. podman create --restart=always --pod test-pod docker.io/bash exit 0
  3. podman pod start test-pod
  4. podman ps -a

Describe the results you received

See that the container Exited (127) N seconds ago and is not restarting

Describe the results you expected

I think --restart=always should always restart the container if it exits regardless of how it's started

podman info output

4.6.0

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@nivekuil nivekuil added the kind/bug Categorizes issue or PR as related to a bug. label Aug 18, 2023
rhatdan added a commit to rhatdan/podman that referenced this issue Aug 18, 2023
@nivekuil
Copy link
Author

nivekuil commented Aug 18, 2023

@rhatdan thanks for putting up the patch. Are you able to put out a rush release? I see that there was discussion about this in #17627 where reviewers didn't want to break this exact situation, but unfortunately the line in question would actually have prevented the current situation where all such workloads on 4.6 are at very high risk of unexpected downtime.

@rhatdan
Copy link
Member

rhatdan commented Aug 19, 2023

@mheon WDYT?

@mheon
Copy link
Member

mheon commented Aug 19, 2023

We are planning a 4.6.2 soon, aiming to finalize plans for when on Monday.

openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/podman that referenced this issue Aug 21, 2023
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/podman that referenced this issue Aug 21, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Nov 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants