incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject [2/2] git commit: CS-15094: Fix multiply vlan of redundang router
Date Wed, 26 Sep 2012 23:28:51 GMT
CS-15094: Fix multiply vlan of redundang router

This fix would work because:
1. When booting up the router, there is possible that no ip information have
been set for the interface(CS would do it after confirm router is up), so the
interface isn't associate with any ip, then ifconfig cannot work. We have to use
ifup, this is especially true for the first router become master.

2. After booting up phase, the ip would be associated with interfaces, then we
can use ifconfig to bring them up.


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

Branch: refs/heads/master
Commit: 0c6dcb477237a2e84261fc51afe3f359d68b9ea1
Parents: 435e4f6
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Mon Sep 24 12:06:18 2012 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Wed Sep 26 16:28:33 2012 -0700

----------------------------------------------------------------------
 .../root/redundant_router/enable_pubip.sh.templ    |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0c6dcb47/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ b/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ
index ec5905d..ccdef0b 100644
--- a/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ
+++ b/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ
@@ -21,8 +21,14 @@ set -e
 ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
 while read i
 do
-    ifdown $i
-    ifup $i
+    if [ "$i" == "eth2" ]
+    then
+        ifdown $i
+        ifup $i
+    else
+        ifconfig $i down
+        ifconfig $i up
+    fi
 done < /tmp/iflist
 ip route add default via [GATEWAY] dev eth2 && \
 service cloud-passwd-srvr restart && \


Mime
View raw message