Merge "Don't allow rotating keys if stack not found"

This commit is contained in:
Zuul 2021-04-05 21:56:09 +00:00 committed by Gerrit Code Review
commit 544eb31301
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,8 @@ def rotate_fernet_keys(heat,
stack_env = heat.stacks.environment(
stack_id=container)
except heat_exc.HTTPNotFound:
stack_env = None
raise RuntimeError('Can not rotate fernet keys without an'
'existing stack %s.' % container)
parameter_defaults = stack_env.get('parameter_defaults', {})
passwords = get_overriden_passwords({}, parameter_defaults)