Merge "Support hacluster using peer-availability relation"

This commit is contained in:
Zuul 2019-04-03 14:15:46 +00:00 committed by Gerrit Code Review
commit 159a5f4333
4 changed files with 8 additions and 1 deletions

View File

@ -229,6 +229,8 @@ def hanode_relation_joined(relid=None):
@hooks.hook('ha-relation-joined',
'ha-relation-changed',
'peer-availability-relation-joined',
'peer-availability-relation-changed',
'hanode-relation-changed')
def ha_relation_changed():
# Check that we are related to a principle and that
@ -253,7 +255,7 @@ def ha_relation_changed():
level=INFO)
return
relids = relation_ids('ha')
relids = relation_ids('ha') or relation_ids('juju-info')
if len(relids) == 1: # Should only ever be one of these
# Obtain relation information
relid = relids[0]

View File

@ -0,0 +1 @@
hooks.py

View File

@ -0,0 +1 @@
hooks.py

View File

@ -15,6 +15,9 @@ requires:
juju-info:
interface: juju-info
scope: container
peer-availability:
interface: juju-info
scope: container
provides:
ha:
interface: hacluster