Merge "Never give up on resources"
This commit is contained in:
commit
38590837da
|
@ -599,7 +599,9 @@ class InitService(ResourceDescriptor):
|
|||
self.service_name.replace('-', '_'),
|
||||
self.init_service_name.replace('-', '_'))
|
||||
res_type = 'lsb:{}'.format(self.init_service_name)
|
||||
crm.primitive(res_key, res_type, op='monitor interval="5s"')
|
||||
_meta = 'migration-threshold="INFINITY" failure-timeout="5s"'
|
||||
crm.primitive(
|
||||
res_key, res_type, op='monitor interval="5s"', meta=_meta)
|
||||
crm.init_services(self.init_service_name)
|
||||
if self.clone:
|
||||
clone_key = 'cl_{}'.format(res_key)
|
||||
|
@ -650,7 +652,9 @@ class VirtualIP(ResourceDescriptor):
|
|||
res_params = '{} cidr_netmask="{}"'.format(res_params, self.cidr)
|
||||
# Monitor the VIP
|
||||
_op_monitor = 'monitor depth="0" timeout="20s" interval="10s"'
|
||||
crm.primitive(vip_key, res_type, params=res_params, op=_op_monitor)
|
||||
_meta = 'migration-threshold="INFINITY" failure-timeout="5s"'
|
||||
crm.primitive(
|
||||
vip_key, res_type, params=res_params, op=_op_monitor, meta=_meta)
|
||||
|
||||
|
||||
class DNSEntry(ResourceDescriptor):
|
||||
|
|
|
@ -311,7 +311,8 @@ class TestHAClusterCommonInitService(unittest.TestCase):
|
|||
'lsb:apache2')
|
||||
self.assertEqual(
|
||||
crm['resource_params']['res_apache_apache2'],
|
||||
(' op monitor interval="5s"'))
|
||||
(' meta migration-threshold="INFINITY" failure-timeout="5s"'
|
||||
' op monitor interval="5s"'))
|
||||
self.assertEqual(crm['init_services'], ('apache2',))
|
||||
self.assertEqual(
|
||||
crm['clones']['cl_res_apache_apache2'],
|
||||
|
@ -326,7 +327,8 @@ class TestHAClusterCommonInitService(unittest.TestCase):
|
|||
'lsb:apache2')
|
||||
self.assertEqual(
|
||||
crm['resource_params']['res_apache_apache2'],
|
||||
(' op monitor interval="5s"'))
|
||||
(' meta migration-threshold="INFINITY" failure-timeout="5s"'
|
||||
' op monitor interval="5s"'))
|
||||
self.assertEqual(crm['init_services'], ('apache2',))
|
||||
self.assertFalse(crm['clones'].get('cl_res_apache_apache2'))
|
||||
|
||||
|
@ -357,6 +359,7 @@ class TestHAClusterCommonVirtualIP(unittest.TestCase):
|
|||
self.assertEqual(
|
||||
crm['resource_params']['res_apache_eth1_vip'],
|
||||
(' params ip="10.110.1.1" nic="eth1" cidr_netmask="24" '
|
||||
'meta migration-threshold="INFINITY" failure-timeout="5s" '
|
||||
'op monitor depth="0" timeout="20s" interval="10s"'))
|
||||
|
||||
def test_configure_resource_no_nic(self):
|
||||
|
@ -369,6 +372,7 @@ class TestHAClusterCommonVirtualIP(unittest.TestCase):
|
|||
self.assertEqual(
|
||||
crm['resource_params']['res_apache_a7815c8_vip'],
|
||||
(' params ip="10.110.1.1" '
|
||||
'meta migration-threshold="INFINITY" failure-timeout="5s" '
|
||||
'op monitor depth="0" timeout="20s" interval="10s"'))
|
||||
|
||||
|
||||
|
|
|
@ -303,7 +303,10 @@ class TestHAClusterRequires(unittest.TestCase):
|
|||
'delete_resources': [],
|
||||
'resource_params': {
|
||||
'res_mysql_4b8ce37_vip': (
|
||||
' params ip="10.110.5.43" op monitor depth="0" '
|
||||
' params ip="10.110.5.43"'
|
||||
' meta migration-threshold="INFINITY" '
|
||||
'failure-timeout="5s"'
|
||||
' op monitor depth="0" '
|
||||
'timeout="20s" interval="10s"')},
|
||||
'groups': {},
|
||||
'ms': {},
|
||||
|
@ -343,10 +346,14 @@ class TestHAClusterRequires(unittest.TestCase):
|
|||
'delete_resources': [],
|
||||
'resource_params': {
|
||||
'res_mysql_4b8ce37_vip': (
|
||||
' params ip="10.110.5.43" op monitor depth="0" '
|
||||
' params ip="10.110.5.43"'
|
||||
' op monitor depth="0" '
|
||||
'timeout="20s" interval="10s"'),
|
||||
'res_mysql_1993276_vip': (
|
||||
' params ip="10.120.5.43" op monitor depth="0" '
|
||||
' params ip="10.120.5.43"'
|
||||
' meta migration-threshold="INFINITY" '
|
||||
'failure-timeout="5s"'
|
||||
' op monitor depth="0" '
|
||||
'timeout="20s" interval="10s"')},
|
||||
'groups': {
|
||||
'grp_mysql_vips': ('res_mysql_1993276_vip '
|
||||
|
@ -369,7 +376,10 @@ class TestHAClusterRequires(unittest.TestCase):
|
|||
'res_mysql_telnetd': 'lsb:telnetd'},
|
||||
'delete_resources': [],
|
||||
'resource_params': {
|
||||
'res_mysql_telnetd': ' op monitor interval="5s"'},
|
||||
'res_mysql_telnetd':
|
||||
(' meta migration-threshold="INFINITY" '
|
||||
'failure-timeout="5s"'
|
||||
' op monitor interval="5s"')},
|
||||
'groups': {},
|
||||
'ms': {},
|
||||
'orders': {},
|
||||
|
|
Loading…
Reference in New Issue