diff --git a/hooks/hooks.py b/hooks/hooks.py index 2d73a59..ed7d50c 100755 --- a/hooks/hooks.py +++ b/hooks/hooks.py @@ -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] diff --git a/hooks/peer-availability-relation-changed b/hooks/peer-availability-relation-changed new file mode 120000 index 0000000..9416ca6 --- /dev/null +++ b/hooks/peer-availability-relation-changed @@ -0,0 +1 @@ +hooks.py \ No newline at end of file diff --git a/hooks/peer-availability-relation-joined b/hooks/peer-availability-relation-joined new file mode 120000 index 0000000..9416ca6 --- /dev/null +++ b/hooks/peer-availability-relation-joined @@ -0,0 +1 @@ +hooks.py \ No newline at end of file diff --git a/metadata.yaml b/metadata.yaml index d3d56f3..6c256f5 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -15,6 +15,9 @@ requires: juju-info: interface: juju-info scope: container + peer-availability: + interface: juju-info + scope: container provides: ha: interface: hacluster