cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [1/3] git commit: updated refs/heads/master to b66dcda
Date Fri, 11 Sep 2015 12:57:30 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master a04b8f6e8 -> b66dcda49


CLOUDSTACK-8799 fixed for vpc networks.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b66dcda4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b66dcda4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b66dcda4

Branch: refs/heads/master
Commit: b66dcda49f370e6fc91ebff889a694f17826ca44
Parents: 1c6378e
Author: Bharat Kumar <bharat.kumar@citrix.com>
Authored: Thu Sep 10 04:14:30 2015 -0700
Committer: Wido den Hollander <wido@widodh.nl>
Committed: Fri Sep 11 14:57:32 2015 +0200

----------------------------------------------------------------------
 .../debian/config/opt/cloud/bin/cs/CsAddress.py       | 14 +++++++++++++-
 .../debian/config/opt/cloud/bin/cs/CsRedundant.py     |  2 +-
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b66dcda4/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
----------------------------------------------------------------------
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 a855f83..e97abac 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
@@ -95,6 +95,14 @@ class CsAddress(CsDataBag):
                 return ip
         return None
 
+    def check_if_link_exists(self,dev):
+        cmd="ip link show dev %s"%dev
+        result=CsHelper.execute(cmd)
+        if(len(result)!=0):
+           return True
+        else:
+           return False
+
     def check_if_link_up(self,dev):
         cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
         result=CsHelper.execute(cmd)
@@ -117,6 +125,9 @@ class CsAddress(CsDataBag):
                     continue
 
                 #check if link is up
+                if (not self.check_if_link_exists(dev)):
+                    logging.info("link %s does not exist, so not processing"%dev)
+                    continue
                 if not self.check_if_link_up(dev):
                    cmd="ip link set %s up"%dev
                    CsHelper.execute(cmd)
@@ -142,7 +153,8 @@ class CsAddress(CsDataBag):
         # is a default route and add if needed
         if not route.defaultroute_exists():
             cmdline=self.config.get_cmdline_instance()
-            route.add_defaultroute(cmdline.get_gateway())
+            if(cmdline.get_gateway()):
+                route.add_defaultroute(cmdline.get_gateway())
 
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b66dcda4/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
----------------------------------------------------------------------
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 3f1cbe0..5d72824 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
@@ -262,7 +262,7 @@ class CsRedundant(object):
         self.set_lock()
         logging.debug("Setting router to master")
         self.address.process()
-        logging.info("added default rotue")
+        logging.info("added default routes")
 
         # ip route add default via $gw table Table_$dev proto static
         cmd = "%s -C %s" % (self.CONNTRACKD_BIN, self.CONNTRACKD_CONF)


Mime
View raw message