podman with options userns keep-id and --restart always doesn't restart like expected #21477
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.
Issue Description
The container after a crash or kill doesn't restart with the option keep-id. It restarts like expected without this option.
Steps to reproduce the issue
$ podman run -d --userns keep-id --name nginx --restart always nginx:latest
8d79d08ffbb2a376d13fa62b0c70f77fc2367291daabe31dc7f6d834283545ca
$ podman inspect nginx --format '{{ .State.Pid }}'
2568968
$ kill -9 2568968
$ podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8d79d08ffbb2 localhost/nginx:latest 14 seconds ago Exited (137) 4 seconds ago nginx
Describe the results you received
In addition, in the journald log, we have a "Started Process Core Dump".
I suspect the command "podman container cleanup nginx" who do a "Core Dump" with the error :
"panic: runtime error: invalid memory address or nil pointer dereference"
Describe the results you expected
$ podman run -d --userns host --name nginx --restart always nginx:latest
516dad881f0f0ebf9f98b4063cf4a09df3499b48d02a61c35cbf122fcf5160cd
$ podman inspect nginx --format '{{ .State.Pid }}'
2566680
$ kill -9 2566680
$ podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
516dad881f0f localhost/nginx:latest 51 seconds ago Up 3 seconds nginx
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
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
The text was updated successfully, but these errors were encountered: