[gnuoy,r=hopem]

Allow corosync.conf netmtu to be set regardless of inet
mode (ipv4/ipv6).
This commit is contained in:
Edward Hope-Morley 2015-04-14 11:16:50 +01:00
commit 4e2906a4f3
2 changed files with 9 additions and 4 deletions

View File

@ -71,8 +71,11 @@ options:
and a time factor, e.g. 5s = 5 seconds. 2m = 2 minutes.
netmtu:
type: int
default: 1500
description: MTU size corosync used for communication.
default:
description: |
Specifies the corosync.conf network mtu. If unset, the default
corosync.conf value is used (currently 1500). See 'man corosync.conf' for
detailed information on this config option.
prefer-ipv6:
type: boolean
default: False

View File

@ -136,6 +136,10 @@ def get_corosync_conf():
return conf
conf = {}
if config('netmtu'):
conf['netmtu'] = config('netmtu')
for relid in relation_ids('ha'):
for unit in related_units(relid):
bindiface = relation_get('corosync_bindiface',
@ -153,8 +157,6 @@ def get_corosync_conf():
if config('prefer-ipv6'):
conf['nodeid'] = get_corosync_id(local_unit())
conf['netmtu'] = config('netmtu')
if None not in conf.itervalues():
return conf
missing = [k for k, v in conf.iteritems() if v is None]