Don't delete failed docker-puppet containers

This helps a bit with debugging issues, and the container will be
deleted on the next run when the same volume is configured.

Change-Id: I4f2f219bd7e40abafd0eb31c1275fdd8ed4db4da
This commit is contained in:
Steve Baker 2017-05-16 04:39:05 +00:00
parent 6241c0309e
commit 7962dd4d44
1 changed files with 3 additions and 1 deletions

View File

@ -253,7 +253,9 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
log.debug(cmd_stderr)
if subproc.returncode != 0:
log.error('Failed running docker-puppet.py for %s' % config_volume)
rm_container('docker-puppet-%s' % config_volume)
else:
# only delete successful runs, for debugging
rm_container('docker-puppet-%s' % config_volume)
return subproc.returncode
# Holds all the information for each process to consume.