Comment 14 for bug 1942289

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

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.