[gnuoy,r=james-page] Update default multicast port to avoid smoosh clash

This commit is contained in:
Liam Young 2015-01-23 13:19:56 +00:00
commit 8ce9445f84
3 changed files with 11 additions and 4 deletions

View File

@ -158,7 +158,7 @@ options:
with the other members of the HA Cluster.
ha-mcastport:
type: int
default: 5403
default: 5434
description: |
Default multicast port number that will be used to communicate between
HA Cluster nodes.

View File

@ -155,6 +155,8 @@ def config_changed():
if settings:
for rid in relation_ids('cluster'):
relation_set(relation_id=rid, relation_settings=settings)
for r_id in relation_ids('ha'):
ha_joined(relation_id=r_id)
@hooks.hook('shared-db-relation-joined')
@ -391,7 +393,7 @@ def cluster_changed():
@hooks.hook('ha-relation-joined')
def ha_joined():
def ha_joined(relation_id=None):
cluster_config = get_hacluster_config()
resources = {
'res_ks_haproxy': 'lsb:haproxy',
@ -427,7 +429,8 @@ def ha_joined():
vip_group.append(vip_key)
if len(vip_group) >= 1:
relation_set(groups={CLUSTER_RES: ' '.join(vip_group)})
relation_set(relation_id=relation_id,
groups={CLUSTER_RES: ' '.join(vip_group)})
init_services = {
'res_ks_haproxy': 'haproxy'
@ -435,7 +438,8 @@ def ha_joined():
clones = {
'cl_ks_haproxy': 'res_ks_haproxy'
}
relation_set(init_services=init_services,
relation_set(relation_id=relation_id,
init_services=init_services,
corosync_bindiface=cluster_config['ha-bindiface'],
corosync_mcastport=cluster_config['ha-mcastport'],
resources=resources,

View File

@ -461,6 +461,7 @@ class KeystoneRelationTests(CharmTestCase):
self.get_netmask_for_address.return_value = '255.255.255.0'
hooks.ha_joined()
args = {
'relation_id': None,
'corosync_bindiface': 'em0',
'corosync_mcastport': '8080',
'init_services': {'res_ks_haproxy': 'haproxy'},
@ -486,6 +487,7 @@ class KeystoneRelationTests(CharmTestCase):
self.get_netmask_for_address.return_value = None
hooks.ha_joined()
args = {
'relation_id': None,
'corosync_bindiface': 'em0',
'corosync_mcastport': '8080',
'init_services': {'res_ks_haproxy': 'haproxy'},
@ -510,6 +512,7 @@ class KeystoneRelationTests(CharmTestCase):
self.get_netmask_for_address.return_value = '64'
hooks.ha_joined()
args = {
'relation_id': None,
'corosync_bindiface': 'em0',
'corosync_mcastport': '8080',
'init_services': {'res_ks_haproxy': 'haproxy'},