Okay, so the reason this is happening is due to this code in keystone:
hooks/keystone_hooks.py, line 442:
@hooks.hook('shared-db-relation-departed', 'shared-db-relation-broken')
def db_departed_or_broken():
if is_leader(): leader_set({'db-initialised': None})
In order to fix it, the code should verify (via the cluster/peer relationship) whether it is the only unit and NOT set the flag 'db-initialised' to None. However, if it's the only unit left, it would be valid to clear it.
Okay, so the reason this is happening is due to this code in keystone:
hooks/keystone_ hooks.py, line 442:
@hooks. hook('shared- db-relation- departed' ,
'shared- db-relation- broken' ) or_broken( ):
leader_ set({'db- initialised' : None})
def db_departed_
if is_leader():
In order to fix it, the code should verify (via the cluster/peer relationship) whether it is the only unit and NOT set the flag 'db-initialised' to None. However, if it's the only unit left, it would be valid to clear it.