diff --git a/paunch/builder/compose1.py b/paunch/builder/compose1.py index c5f701e..a777bd4 100644 --- a/paunch/builder/compose1.py +++ b/paunch/builder/compose1.py @@ -58,7 +58,7 @@ class ComposeV1Builder(object): LOG.error("Error running %s. [%s]\n" % (cmd, returncode)) deploy_status_code = returncode else: - LOG.debug('Completed %s' % cmd) + LOG.debug('Completed $ %s' % ' '.join(cmd)) return stdout, stderr, deploy_status_code def label_arguments(self, cmd, container): diff --git a/paunch/cmd.py b/paunch/cmd.py index d7ed534..f91f7be 100644 --- a/paunch/cmd.py +++ b/paunch/cmd.py @@ -83,7 +83,7 @@ class Cleanup(Command): parser.add_argument( 'config_id', metavar='', - nargs='?', + nargs='*', help=('Identifiers for the configs which still apply, all others ' 'will be deleted.'), ) diff --git a/paunch/runner.py b/paunch/runner.py index d1a01e2..b23d0f6 100644 --- a/paunch/runner.py +++ b/paunch/runner.py @@ -29,7 +29,7 @@ class DockerRunner(object): @staticmethod def execute(cmd): - LOG.debug(' '.join(cmd)) + LOG.debug('$ %s' % ' '.join(cmd)) subproc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) cmd_stdout, cmd_stderr = subproc.communicate() @@ -157,6 +157,9 @@ class DockerRunner(object): return container def delete_missing_configs(self, config_ids): + if not config_ids: + config_ids = [] + for conf_id in self.current_config_ids(): if conf_id not in config_ids: LOG.debug('%s no longer exists, deleting containers' % conf_id)