Resource parameter order is important on Eoan+
Port of https://github.com/juju/charm-helpers/pull/373 to this interface for reactive charms. From the ch pull request: On Eoan we saw errors like: ERROR: syntax in primitive: Attribute order error: timeout must appear before any instance attribute parsing 'primitive res_ks_cf9dea1_vip ocfheartbeatIPaddr2 params ip=10.5.253.30 op monitor depth=0 timeout=20s interval=10s' It would appear, that ordering matters, update resource config function to the correct order. Change-Id: I1f8a440fb0ad62192307946de42b9b176b3ef4c1 Partial-Bug: #1843830
This commit is contained in:
parent
ef1f8503f4
commit
67511b3787
|
@ -651,7 +651,7 @@ class VirtualIP(ResourceDescriptor):
|
||||||
if self.cidr:
|
if self.cidr:
|
||||||
res_params = '{} cidr_netmask="{}"'.format(res_params, self.cidr)
|
res_params = '{} cidr_netmask="{}"'.format(res_params, self.cidr)
|
||||||
# Monitor the VIP
|
# Monitor the VIP
|
||||||
_op_monitor = 'monitor depth="0" timeout="20s" interval="10s"'
|
_op_monitor = 'monitor timeout="20s" interval="10s" depth="0"'
|
||||||
_meta = 'migration-threshold="INFINITY" failure-timeout="5s"'
|
_meta = 'migration-threshold="INFINITY" failure-timeout="5s"'
|
||||||
crm.primitive(
|
crm.primitive(
|
||||||
vip_key, res_type, params=res_params, op=_op_monitor, meta=_meta)
|
vip_key, res_type, params=res_params, op=_op_monitor, meta=_meta)
|
||||||
|
|
|
@ -360,7 +360,7 @@ class TestHAClusterCommonVirtualIP(unittest.TestCase):
|
||||||
crm['resource_params']['res_apache_eth1_vip'],
|
crm['resource_params']['res_apache_eth1_vip'],
|
||||||
(' params ip="10.110.1.1" nic="eth1" cidr_netmask="24" '
|
(' params ip="10.110.1.1" nic="eth1" cidr_netmask="24" '
|
||||||
'meta migration-threshold="INFINITY" failure-timeout="5s" '
|
'meta migration-threshold="INFINITY" failure-timeout="5s" '
|
||||||
'op monitor depth="0" timeout="20s" interval="10s"'))
|
'op monitor timeout="20s" interval="10s" depth="0"'))
|
||||||
|
|
||||||
def test_configure_resource_no_nic(self):
|
def test_configure_resource_no_nic(self):
|
||||||
crm = common.CRM()
|
crm = common.CRM()
|
||||||
|
@ -373,7 +373,7 @@ class TestHAClusterCommonVirtualIP(unittest.TestCase):
|
||||||
crm['resource_params']['res_apache_a7815c8_vip'],
|
crm['resource_params']['res_apache_a7815c8_vip'],
|
||||||
(' params ip="10.110.1.1" '
|
(' params ip="10.110.1.1" '
|
||||||
'meta migration-threshold="INFINITY" failure-timeout="5s" '
|
'meta migration-threshold="INFINITY" failure-timeout="5s" '
|
||||||
'op monitor depth="0" timeout="20s" interval="10s"'))
|
'op monitor timeout="20s" interval="10s" depth="0"'))
|
||||||
|
|
||||||
|
|
||||||
class TestHAClusterCommonDNSEntry(unittest.TestCase):
|
class TestHAClusterCommonDNSEntry(unittest.TestCase):
|
||||||
|
|
|
@ -322,8 +322,8 @@ class TestHAClusterRequires(unittest.TestCase):
|
||||||
' params ip="10.110.5.43"'
|
' params ip="10.110.5.43"'
|
||||||
' meta migration-threshold="INFINITY" '
|
' meta migration-threshold="INFINITY" '
|
||||||
'failure-timeout="5s"'
|
'failure-timeout="5s"'
|
||||||
' op monitor depth="0" '
|
' op monitor timeout="20s" '
|
||||||
'timeout="20s" interval="10s"')},
|
'interval="10s" depth="0"')},
|
||||||
'groups': {},
|
'groups': {},
|
||||||
'ms': {},
|
'ms': {},
|
||||||
'orders': {},
|
'orders': {},
|
||||||
|
@ -369,8 +369,8 @@ class TestHAClusterRequires(unittest.TestCase):
|
||||||
' params ip="10.120.5.43"'
|
' params ip="10.120.5.43"'
|
||||||
' meta migration-threshold="INFINITY" '
|
' meta migration-threshold="INFINITY" '
|
||||||
'failure-timeout="5s"'
|
'failure-timeout="5s"'
|
||||||
' op monitor depth="0" '
|
' op monitor timeout="20s" '
|
||||||
'timeout="20s" interval="10s"')},
|
'interval="10s" depth="0"')},
|
||||||
'groups': {
|
'groups': {
|
||||||
'grp_mysql_vips': ('res_mysql_1993276_vip '
|
'grp_mysql_vips': ('res_mysql_1993276_vip '
|
||||||
'res_mysql_4b8ce37_vip')},
|
'res_mysql_4b8ce37_vip')},
|
||||||
|
|
Loading…
Reference in New Issue