[jillr] Add nagios-external-master interface and logic so n-e-m hooks will run

This commit is contained in:
Jill Rouleau
2015-09-11 15:42:14 -07:00
parent 774eb85f16
commit cd1dbf6363
3 changed files with 9 additions and 1 deletions

View File

@@ -278,6 +278,9 @@ def config_changed():
# make sure all the HA resources are (re)created
ha_relation_joined()
if is_relation_made('nrpe-external-master'):
update_nrpe_config()
@hooks.hook('cluster-relation-joined')
def cluster_joined():

View File

@@ -14,6 +14,9 @@ provides:
interface: mysql-root
shared-db:
interface: mysql-shared
nrpe-external-master:
interface: nrpe-external-master
scope: container
peers:
cluster:
interface: percona-cluster

View File

@@ -8,7 +8,9 @@ import percona_hooks as hooks
TO_PATCH = ['log', 'config',
'get_db_helper',
'relation_ids',
'relation_set']
'relation_set',
'update_nrpe_config']
class TestHaRelation(CharmTestCase):