[3988689847] Upstream Reporter: Jan Rodák
Upstream issue status: Open
Upstream description:
Issue Description
When exiting, podman-restart.service stops all containers that are flagged to start after boot. This is fine for the always restart policy, but for unless-stopped, it behaves just like a user running podman stop .
ExecStop=/usr/bin/podman $LOGGING stop --all --filter should-start-on-boot=trueNote that stopping the service will automatically stop all running containers that match --filter should-start-on-boot=true on your machine.
Steps to reproduce the issue
podman run -d --restart=unless-stopped --name my_container fedora sleep infinity # Check container if it is running: podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 58ae1d244603 registry.fedoraproject.org/fedora:latest sleep infinity 2 minutes ago Up 21 seconds my_container systemctl --user enable podman-restart.service systemctl --user start podman-restart.service # Check if service is running: systemctl --user status podman-restart.service reboot # Check the container if it is running after reboot: podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESDescribe the results you received
A container with --restart=unless-stopped does not start after a machine reboot, if podman-restart.service was running before the restart.
Describe the results you expected
A container with --restart=unless-stopped does start after a machine reboot.
podman info output
host: arch: arm64 buildahVersion: 1.43.0-dev cgroupControllers: - cpu - io - memory - pids cgroupManager: systemd cgroupVersion: v2 conmon: package: conmon-2.2.1-1.20260224064415932437.main.5.g9e471ba.fc42.aarch64 path: /usr/bin/conmon version: 'conmon version 2.2.1, commit: ' cpuUtilization: idlePercent: 98.09 systemPercent: 0.59 userPercent: 1.31 cpus: 6 databaseBackend: sqlite distribution: distribution: fedora variant: workstation version: "42" emulatedArchitectures: - linux/386 - linux/amd64 - linux/arm64be - linux/loong64 - linux/mips - linux/mips64 - linux/ppc - linux/ppc64 - linux/ppc64le - linux/riscv32 - linux/riscv64 - linux/s390x eventLogger: journald freeLocks: 1984 hostname: fedora-mac-vm idMappings: gidmap: - container_id: 0 host_id: 1000 size: 1 - container_id: 1 host_id: 524288 size: 65536 uidmap: - container_id: 0 host_id: 1000 size: 1 - container_id: 1 host_id: 524288 size: 65536 kernel: 6.18.12-100.fc42.aarch64 linkmode: dynamic logDriver: journald memFree: 11435470848 memTotal: 16718344192 networkBackend: netavark networkBackendInfo: backend: netavark defaultNetwork: podman dns: package: aardvark-dns-2.0.0~dev-1.20260223151339890071.main.40.g12570fb.fc42.aarch64 path: /usr/libexec/podman/aardvark-dns version: aardvark-dns 2.0.0-dev package: Unknown path: /usr/local/libexec/podman/netavark version: netavark 2.0.0-dev ociRuntime: name: crun package: crun-1.26-1.20260223200004469904.main.102.gfab0a1d7.fc42.aarch64 path: /usr/bin/crun version: |- crun version UNKNOWN commit: 3c771023c6f0890634b87a0ecf17e2b160b67006 rundir: /run/user/1000/crun spec: 1.0.0 +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL os: linux pasta: executable: /usr/bin/pasta package: passt-0^20260120.g386b5f5-1.fc42.aarch64 version: | pasta 0^20260120.g386b5f5-1.fc42.aarch64-pasta Copyright Red Hat GNU General Public License, version 2 or later <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. remoteSocket: exists: true path: /run/user/1000/podman/podman.sock rootlessNetworkCmd: pasta security: apparmorEnabled: false capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT rootless: true seccompEnabled: true seccompProfilePath: /usr/share/containers/seccomp.json selinuxEnabled: true serviceIsRemote: false slirp4netns: executable: /usr/bin/slirp4netns package: slirp4netns-1.3.1-2.fc42.aarch64 version: |- slirp4netns version 1.3.1 commit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236 libslirp: 4.8.0 SLIRP_CONFIG_VERSION_MAX: 5 libseccomp: 2.5.5 swapFree: 8589930496 swapTotal: 8589930496 uptime: 0h 13m 33.00s variant: v8 plugins: authorization: null log: - k8s-file - none - passthrough - journald network: - bridge - macvlan - ipvlan volume: - local registries: localhost:5000: Blocked: false Insecure: true Location: localhost:5000 MirrorByDigestOnly: false Mirrors: null Prefix: localhost:5000 PullFromMirror: "" search: - registry.fedoraproject.org - registry.access.redhat.com - docker.io store: containerStore: number: 3 paused: 0 running: 1 stopped: 2 graphDriverName: overlay graphOptions: {} graphRoot: /home/jrodak/.local/share/containers/storage graphRootAllocated: 67014492160 graphRootUsed: 28504403968 graphStatus: Backing Filesystem: btrfs Native Overlay Diff: "true" Supports d_type: "true" Supports shifting: "false" Supports volatile: "true" Using metacopy: "false" imageCopyTmpDir: /var/tmp imageStore: number: 11 runRoot: /run/user/1000/containers transientStore: false volumePath: /home/jrodak/.local/share/containers/storage/volumes version: APIVersion: 6.0.0-dev BuildOrigin: 'Copr: rhcontainerbot/podman-next' Built: 1771891200 BuiltTime: Tue Feb 24 01:00:00 2026 GitCommit: 39ea7ef794b946aa883c75fa3349e4616efec28b GoVersion: go1.24.13 Os: linux OsArch: linux/arm64 Version: 6.0.0-devPodman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Upstream URL: https://github.com/containers/podman/issues/28152
- links to