CLOUDSTACK-8915 - VRRP needs a cidr in order to work properly

- The cidr was replaced by the single IP, which broke the feature.
   - Wait during transition from master to backup otherwise the test fails due to wronge state
This commit is contained in:
Wilder Rodrigues 2015-09-29 15:13:10 +02:00
parent 0c752eab60
commit 094d29d7cd
3 changed files with 4 additions and 4 deletions

View File

@ -292,8 +292,8 @@ class CsIP:
def post_configure(self, address):
""" The steps that must be done after a device is configured """
route = CsRoute()
if not self.get_type() in ["control"]:
route = CsRoute()
route.add_table(self.dev)
CsRule(self.dev).addMark()

View File

@ -310,7 +310,7 @@ class CsRedundant(object):
if(cmdline.get_type()=='router'):
str = " %s brd %s dev %s\n" % (cmdline.get_guest_gw(), o.get_broadcast(), o.get_device())
else:
str = " %s brd %s dev %s\n" % (o.get_ip(), o.get_broadcast(), o.get_device())
str = " %s brd %s dev %s\n" % (o.get_gateway_cidr(), o.get_broadcast(), o.get_device())
lines.append(str)
self.check_is_up(o.get_device())
return lines

View File

@ -287,8 +287,6 @@ class TestVPCRedundancy(cloudstackTestCase):
cnts[vals.index(router.redundantstate)] += 1
if cnts[vals.index('MASTER')] != 1:
self.fail("No Master or too many master routers found %s" % cnts[vals.index('MASTER')])
# if cnts[vals.index('UNKNOWN')] > 0:
# self.fail("Router has unknown status")
def stop_router(self, type):
self.check_master_status(2)
@ -430,6 +428,7 @@ class TestVPCRedundancy(cloudstackTestCase):
self.check_master_status(2)
self.add_nat_rules()
self.do_vpc_test(False)
time.sleep(15)
self.stop_router("MASTER")
# wait for the backup router to transit to master state
@ -443,6 +442,7 @@ class TestVPCRedundancy(cloudstackTestCase):
self.start_router()
self.add_nat_rules()
time.sleep(15)
self.check_master_status(2)
self.do_vpc_test(False)