Break cluster when relation is broken, as this will be run on the unit that's just been removed
This commit is contained in:
parent
d87d3b82c4
commit
9c80d8db65
|
@ -312,16 +312,8 @@ def update_cookie():
|
|||
service_restart('rabbitmq-server')
|
||||
|
||||
|
||||
@hooks.hook('cluster-relation-departed')
|
||||
def cluster_departed():
|
||||
if is_relation_made('ha') and \
|
||||
config('ha-vip-only') is False:
|
||||
log('hacluster relation is present, skipping native '
|
||||
'rabbitmq cluster config.')
|
||||
return
|
||||
if not is_newer():
|
||||
log('cluster_joined: Relation lesser.')
|
||||
return
|
||||
@hooks.hook('cluster-relation-broken')
|
||||
def cluster_broken():
|
||||
rabbit.break_cluster()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue