You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/10/20 08:01:10 UTC
[05/13] git commit: updated refs/heads/master to 6fe5ae0
CLOUDSTACK-8952 - The public interface was comming UP in the Backup router
- There were too many places trying to put the pub interface UP. I centralised it now.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d762dc85
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d762dc85
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d762dc85
Branch: refs/heads/master
Commit: d762dc8579a3ee40c762559d62affdf44194e853
Parents: b4920aa
Author: Wilder Rodrigues <wr...@schubergphilis.com>
Authored: Thu Oct 15 12:44:28 2015 +0200
Committer: Wilder Rodrigues <wr...@schubergphilis.com>
Committed: Sat Oct 17 12:20:40 2015 +0200
----------------------------------------------------------------------
.../patches/debian/config/opt/cloud/bin/cs/CsAddress.py | 7 +------
.../debian/config/opt/cloud/bin/cs/CsRedundant.py | 12 +++++++-----
2 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d762dc85/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 074a63f..0b00397 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py
@@ -118,11 +118,6 @@ class CsAddress(CsDataBag):
ip = CsIP(dev, self.config)
for address in self.dbag[dev]:
- #check if link is up
- if not self.check_if_link_up(dev):
- cmd="ip link set %s up" % dev
- CsHelper.execute(cmd)
-
ip.setAddress(address)
if ip.configured():
@@ -328,7 +323,7 @@ class CsIP:
if " DOWN " in i:
cmd2 = "ip link set %s up" % self.getDevice()
# If redundant do not bring up public interfaces
- # master.py and keepalived deal with tham
+ # master.py and keepalived will deal with them
if self.cl.is_redundant() and not self.is_public():
CsHelper.execute(cmd2)
# if not redundant bring everything up
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d762dc85/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 5dec749..9e1f073 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
@@ -82,12 +82,14 @@ class CsRedundant(object):
def _redundant_on(self):
guest = self.address.get_guest_if()
# No redundancy if there is no guest network
- if self.cl.is_master() or guest is None:
- for obj in [o for o in self.address.get_ips() if o.is_public()]:
- self.check_is_up(obj.get_device())
if guest is None:
self._redundant_off()
return
+
+ if self.cl.is_master():
+ for obj in [o for o in self.address.get_ips() if o.is_public()]:
+ self.check_is_up(obj.get_device())
+
CsHelper.mkdir(self.CS_RAMDISK_DIR, 0755, False)
CsHelper.mount_tmpfs(self.CS_RAMDISK_DIR)
CsHelper.mkdir(self.CS_ROUTER_DIR, 0755, False)
@@ -336,7 +338,7 @@ class CsRedundant(object):
In a DomR there will only ever be one address in a VPC there can be many
The new code also gives the possibility to cloudstack to have a hybrid device
- thet could function as a router and VPC router at the same time
+ that could function as a router and VPC router at the same time
"""
lines = []
for o in self.address.get_ips():
@@ -347,12 +349,12 @@ class CsRedundant(object):
else:
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
def check_is_up(self, device):
""" Ensure device is up """
cmd = "ip link show %s | grep 'state DOWN'" % device
+
for i in CsHelper.execute(cmd):
if " DOWN " in i:
cmd2 = "ip link set %s up" % device