Break cluster when relation is broken, as this will be run on the unit that's just been removed

This commit is contained in:
James Page 2015-03-11 16:11:55 +00:00
parent 36643c5d39
commit 601b6de009
2 changed files with 2 additions and 10 deletions

View File

@ -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()