Merge "Unset DB init flag on shared-db relation removal"

This commit is contained in:
Zuul 2019-02-26 11:47:44 +00:00 committed by Gerrit Code Review
commit 84e77735eb
3 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,7 @@ from charmhelpers.core.hookenv import (
open_port,
is_leader,
relation_id,
leader_set,
)
from charmhelpers.core.host import (
@ -393,6 +394,13 @@ def db_changed():
update_all_identity_relation_units()
@hooks.hook('shared-db-relation-departed',
'shared-db-relation-broken')
def db_departed_or_broken():
if is_leader():
leader_set({'db-initialised': None})
@hooks.hook('identity-service-relation-changed')
@restart_on_change(restart_map(), restart_functions=restart_function_map())
def identity_changed(relation_id=None, remote_unit=None):

View File

@ -0,0 +1 @@
keystone_hooks.py

View File

@ -0,0 +1 @@
keystone_hooks.py