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@ubuntu.com 2015-03-11 16:11:55 +00:00
parent d87d3b82c4
commit 9c80d8db65
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()