From c17fb0ff2829b3db4826954970427916df633434 Mon Sep 17 00:00:00 2001 From: Wilder Rodrigues Date: Mon, 28 Sep 2015 13:15:54 +0200 Subject: [PATCH] CLOUDSTACK-8915 - Add the default route only on address that have not been configured yet. - In case of rVPC we experienced the wrong route being added to the VPC tiers --- .../config/opt/cloud/bin/cs/CsAddress.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 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 e3fa1bc8e19..3e8fbcaeb80 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py @@ -142,16 +142,16 @@ class CsAddress(CsDataBag): "Address %s on device %s not configured", ip.ip(), dev) if CsDevice(dev, self.config).waitfordevice(): ip.configure() + + route.add_route(dev, network) - route.add_route(dev, network) - - # The code looks redundant here, but we actually have to cater for routers and - # VPC routers in a different manner. Please do not remove this block otherwise - # The VPC default route will be broken. - if address["nw_type"] == "public" and not found_defaultroute: - if not route.defaultroute_exists(): - if route.add_defaultroute(gateway): - found_defaultroute = True + # The code looks redundant here, but we actually have to cater for routers and + # VPC routers in a different manner. Please do not remove this block otherwise + # The VPC default route will be broken. + if address["nw_type"] == "public" and not found_defaultroute: + if not route.defaultroute_exists(): + if route.add_defaultroute(gateway): + found_defaultroute = True # once we start processing public ip's we need to verify there # is a default route and add if needed