Browse Source

Do not call --detach when using podman create

We should never use --detached when calling podman create as it
makes no sense and has actually been removed in podman 3 via
15345ce4c3

Any use of that flag when using podman >= 3.x create will error out with:

  Error: unknown flag: --detach

Change-Id: I8356110aba03dcbc09de97633bfe6f03580e2e7a
Closes-Bug: #1915500
(cherry picked from commit fa68844b06)
changes/22/776622/1 5.5.0
Michele Baldessari 2 months ago
committed by Alex Schultz
parent
commit
68e5206abc
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      paunch/builder/podman.py

+ 3
- 1
paunch/builder/podman.py View File

@ -43,7 +43,9 @@ class PodmanBuilder(base.BaseBuilder):
# via systemd
cmd.append('--conmon-pidfile=/var/run/{}.pid'.format(delegate))
if cconfig.get('detach', True):
# (bandini) - We must never use --detach when we call podman create as
# it makes no sense whatsoever and podman-3.x errors out on it
if 'create' not in cmd and cconfig.get('detach', True):
cmd.append('--detach=true')
if self.cont_log_path is not None:


Loading…
Cancel
Save