Commit e7afea50 authored by Valentin Samir's avatar Valentin Samir

Force new ZSK activate to previous ZSK inactivate

Fix some edge cases happening then the script is not running daily
parent b25d5acb
......@@ -112,12 +112,15 @@ class Zone(object):
if zsk.is_activate:
zsk.inactive = zsk.activate + ZSK_VALIDITY
zsk.delete = zsk.inactive + INTERVAL
last_activate_zsk = zsk
now = datetime.datetime.utcnow()
if zsk.is_activate:
zsk.inactive = max(zsk.inactive, now + INTERVAL)
zsk.delete = zsk.inactive + INTERVAL
zsk.gen_successor()
bind_reload()
else:
zsk.activate = last_activate_zsk.inactive
def do_ksk(self):
ksk = self.KSK[-1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment