Skip to content

Commit

Permalink
podman: add required argv0 to wrapper
Browse files Browse the repository at this point in the history
In cases where podman uses conmon it passes its own path
as a command line argument in `--exit-command`. This exit
command is used for container cleanup. For it to work the path
must be the wrapper instead of the unwrapped executable.

Without this change rootless podman runs can hang for 20 seconds
before killing the container itself. The debug logs will show:

    Exceeded conmon timeout waiting for container ___ to exit
  • Loading branch information
KenMacD committed Aug 24, 2022
1 parent 2f63a28 commit 5d5481f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/applications/virtualization/podman/wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ in runCommand podman.name {
ln -s ${podman-unwrapped}/lib $out/lib
ln -s ${podman-unwrapped}/share $out/share
makeWrapper ${podman-unwrapped}/bin/podman $out/bin/podman \
--argv0 $out/bin/podman \
--set CONTAINERS_HELPER_BINARY_DIR ${helpersBin}/bin \
--prefix PATH : ${lib.escapeShellArg binPath}
''

0 comments on commit 5d5481f

Please sign in to comment.