Ensure NRPE checks are updated under config-change
Reorder the config-changed hook to ensure that NRPE checks are updated across all units, not just the lead unit, when charm options are changed by an operator. Change-Id: Ia75471ea9781ecee115a837db89a6d597e82d512 Closes-Bug: 1790544
This commit is contained in:
parent
79a1ea26d6
commit
02ffffe50b
|
@ -804,12 +804,6 @@ def config_changed():
|
|||
rabbit.ConfigRenderer(
|
||||
rabbit.CONFIG_FILES).write_all()
|
||||
|
||||
# Only set values if this is the leader
|
||||
if not is_leader():
|
||||
return
|
||||
|
||||
rabbit.set_all_mirroring_queues(config('mirroring-queues'))
|
||||
|
||||
if is_relation_made("ha"):
|
||||
ha_is_active_active = config("ha-vip-only")
|
||||
|
||||
|
@ -824,6 +818,12 @@ def config_changed():
|
|||
elif is_relation_made('nrpe-external-master'):
|
||||
update_nrpe_checks()
|
||||
|
||||
# Only set values if this is the leader
|
||||
if not is_leader():
|
||||
return
|
||||
|
||||
rabbit.set_all_mirroring_queues(config('mirroring-queues'))
|
||||
|
||||
# Update cluster in case min-cluster-size has changed
|
||||
for rid in relation_ids('cluster'):
|
||||
for unit in related_units(rid):
|
||||
|
|
Loading…
Reference in New Issue