Do not rotate keys when lead unit is paused
Closes-Bug: #1787719 Change-Id: I0557803e90d8ec52271f01e5e7276d2db8338ce2
This commit is contained in:
parent
e472adaf2f
commit
93db018485
|
@ -2050,6 +2050,10 @@ def fernet_keys_rotate_and_sync(log_func=log):
|
|||
"""
|
||||
if not keystone_context.fernet_enabled() or not is_leader():
|
||||
return
|
||||
if is_unit_paused_set():
|
||||
log_func("Fernet key rotation requested but unit is paused",
|
||||
level=INFO)
|
||||
return
|
||||
# now see if the keys need to be rotated
|
||||
try:
|
||||
last_rotation = os.stat(
|
||||
|
|
Loading…
Reference in New Issue