tripleo_deploy/upgrade: fail of upgrade_tasks don't return 0
We only want to run the deploy_tasks in one of these situations: - upgrade_tasks finished with success (return code 0) - upgrade_tasks aren't executed (then it's a classic deployment) But we don't want to run the deploy_tasks when upgrade_tasks failed, we want to fail early in the upgrade process and provide the feedback to the operator. Change-Id: I1b9e8b246ebb5e6f0e9ec692912b9d9df9dd5dbc Closes-Bug: #1772804
This commit is contained in:
parent
9cc04d25f3
commit
72449c8e40
|
@ -763,6 +763,8 @@ class Deploy(command.Command):
|
|||
# Run Upgrade tasks before the deployment
|
||||
if parsed_args.upgrade:
|
||||
rc = self._launch_ansible_upgrade(ansible_dir)
|
||||
if rc != 0:
|
||||
raise exceptions.DeploymentError('Upgrade failed')
|
||||
rc = self._launch_ansible_deploy(ansible_dir)
|
||||
except Exception as e:
|
||||
self.log.error("Exception: %s" % e)
|
||||
|
|
Loading…
Reference in New Issue