From 094d29d7cdbb9f3e6e4248875de07fbe3610b2a6 Mon Sep 17 00:00:00 2001 From: Wilder Rodrigues Date: Tue, 29 Sep 2015 15:13:10 +0200 Subject: [PATCH] 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 --- systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py | 2 +- .../patches/debian/config/opt/cloud/bin/cs/CsRedundant.py | 2 +- test/integration/component/test_vpc_redundant.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py index a473277b75a..78ccb3a1fef 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py @@ -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() diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py index f71efc7fd3f..915155194b4 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py @@ -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 diff --git a/test/integration/component/test_vpc_redundant.py b/test/integration/component/test_vpc_redundant.py index 32e52ec90a3..149baf76c9b 100644 --- a/test/integration/component/test_vpc_redundant.py +++ b/test/integration/component/test_vpc_redundant.py @@ -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)