def leader_settings_changed():
    '''Re-trigger install once leader has seeded passwords into install'''
    config_changed()
    # NOTE(tkurek): re-set 'master' relation data
    if relation_ids('master'):
        master_joined()
    # NOTE(tkurek): deconfigure old leader
    if relation_ids('slave'):
        deconfigure_slave()
def leader_settings_changed():
    '''Re-trigger install once leader has seeded passwords into install'''
    config_changed()
    # NOTE(tkurek): re-set 'master' relation data
    if relation_ids('master'):
        master_joined()
    # NOTE(tkurek): deconfigure old leader
    if relation_ids('slave'):
        deconfigure_slave()
def leader_settings_changed():
    '''Re-trigger install once leader has seeded passwords into install'''

    maybe_notify_bootstrapped()

    config_changed()
    # NOTE(tkurek): re-set 'master' relation data
    if relation_ids('master'):
        master_joined()
    # NOTE(tkurek): deconfigure old leader
    if relation_ids('slave'):
        deconfigure_slave()
    if not leader_get('cluster_series_upgrading'):
        for r_id in relation_ids('shared-db'):
            relation_set(relation_id=r_id,
                         relation_settings={DB_SERIES_UPGRADING_KEY: None})
def slave_departed():
    if is_leader():
        deconfigure_slave()
def slave_departed():
    if is_leader():
        deconfigure_slave()