Do no recreate fernet tokens on setup
In case of keystone-fernet-setup job rerun (delete and create), fernet tokens are recreated. Which leads to ongoing openstack request fail. keystone-manage fernet_setup is idempotent, let's make the keystone-fernet-setup job idempotent as well. Change-Id: I62e741fe5192b7a0018bc84ccdac1ea5311a1e03
This commit is contained in:
parent
52c132b935
commit
8957bacb4a
@ -152,9 +152,9 @@ def main():
|
|||||||
FERNET_DIR)
|
FERNET_DIR)
|
||||||
write_to_files(secret['data'])
|
write_to_files(secret['data'])
|
||||||
|
|
||||||
if args.command == 'credential_setup':
|
if args.command in ('credential_setup', 'fernet_setup'):
|
||||||
if secret.get('data', False):
|
if secret.get('data', False):
|
||||||
LOG.info('Credential keys already exist, skipping setup...')
|
LOG.info('Keys already exist, skipping setup...')
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
execute_command(args.command)
|
execute_command(args.command)
|
||||||
|
Loading…
Reference in New Issue
Block a user