Browse Source

Process labels before building container run args

The consistent way of building container run arguments is processing
labels (possibly multiple) first.

Fix 'debug' actions 'run' and 'print-cmd' to not falling behind of that
pattern already proved working well for containers 'apply'.

Change-Id: I771d086cc75695d7ce2db35c852bb35bb4c59708
Related-Bug: #1798362
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
(cherry picked from commit 6423f9d6ee)
changes/63/718463/1
Bogdan Dobrelya 3 months ago
parent
commit
f294ce2b11
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      paunch/__init__.py

+ 2
- 0
paunch/__init__.py View File

@@ -134,6 +134,7 @@ def debug(config_id, container_name, action, config, managed_by, labels=None,
'--name',
r.unique_container_name(container_name)
]
builder.label_arguments(cmd, container_name)
builder.docker_run_args(cmd, container_name)
print(' '.join(cmd))
elif action == 'run':
@@ -143,6 +144,7 @@ def debug(config_id, container_name, action, config, managed_by, labels=None,
'--name',
r.unique_container_name(container_name)
]
builder.label_arguments(cmd, container_name)
builder.docker_run_args(cmd, container_name)
return r.execute_interactive(cmd, log)
elif action == 'dump-yaml':


Loading…
Cancel
Save