Stop undercloud upgrade procedure if deployment tasks fail

Previously if deployment tasks fail, the undercloud/standalone upgrade
would continue with post-upgrade and online upgrade tasks. This is now
fixed.

Change-Id: Ia749c01602214df326edf52b855e4a2a43c6b3c2
Closes-Bug: #1805836
(cherry picked from commit 54d6071845)
This commit is contained in:
Jiri Stransky 2018-11-29 13:53:08 +01:00 committed by Emilien Macchi
parent b21d3537e0
commit daafd2fad1
1 changed files with 2 additions and 0 deletions

View File

@ -1116,6 +1116,8 @@ class Deploy(command.Command):
if rc != 0:
raise exceptions.DeploymentError('Upgrade failed')
rc = self._launch_ansible_deploy(self.ansible_dir)
if rc != 0:
raise exceptions.DeploymentError('Deployment failed')
if parsed_args.upgrade:
# Run Online Upgrade tasks after the deployment
rc = self._launch_ansible_online_upgrade(self.ansible_dir)