paunch apply should exit nonzero for failures

Exit with the return code (nonzero) in case of a failure during paunch
apply. When executing commands such as "docker run..." the actual docker
return code will be used as the exit code, which is what we want so that
the ansible tasks running paunch will actually fail.

Change-Id: Ic656d27c4428249c5394dcd9f998c5bb4e264250
Partial-Bug: #1707997
This commit is contained in:
James Slagle 2017-08-01 15:36:56 -04:00
parent 64df79c70d
commit d11e04548e
1 changed files with 3 additions and 1 deletions

View File

@ -68,13 +68,15 @@ class Apply(command.Command):
with open(parsed_args.file, 'r') as f:
config = yaml.safe_load(f)
paunch.apply(
stdout, stderr, rc = paunch.apply(
parsed_args.config_id,
config,
managed_by='paunch',
labels=labels
)
return rc
class Cleanup(command.Command):