Handle KeyboardInterrupt for ephemeral Heat cleanup

In the case of KeyboardInterrupt (Ctrl-C), ephemeral Heat still needs to
be stopped and backed up if it was running.

Change-Id: I1e1ef9c4942b6e9a961962025fe220409df2ea0a
Signed-off-by: James Slagle <jslagle@redhat.com>
This commit is contained in:
James Slagle 2022-02-24 09:07:23 -05:00
parent f58fb3df1b
commit 8cbf9c23e2
1 changed files with 1 additions and 1 deletions

View File

@ -1196,7 +1196,7 @@ class DeployOvercloud(command.Command):
extra_vars=extra_vars
)
except Exception:
except (KeyboardInterrupt, Exception):
if parsed_args.heat_type != 'installed' and self.heat_launcher:
self.log.info("Stopping ephemeral heat.")
utils.kill_heat(self.heat_launcher)