cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/master to ac06ec0
Date Tue, 14 Apr 2015 11:21:28 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 30604e973 -> ac06ec02e


kvm: improve CentOS 7 support

CentOS 7 does not ship with ifconfig anymore. We should use ip commands instead.
This also works on older versions, like CentOS 6 and Ubuntu 12.x/14.x, that we
support.

This closes #165

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: ac06ec02eb442a4cc218b21e95f8d9a2a9ccb446
Parents: 30604e9
Author: Remi Bergsma <github@remi.nl>
Authored: Mon Apr 13 22:45:15 2015 -0500
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Tue Apr 14 16:51:14 2015 +0530

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java   | 4 ++--
 .../kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java  | 4 ++--
 .../kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac06ec02/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
index 12eda74..aaf75ff 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
@@ -294,7 +294,7 @@ public class BridgeVifDriver extends VifDriverBase {
             }
         }
         if (!foundLinkLocalBr) {
-            Script.runSimpleBashScript("ifconfig " + linkLocalBr + " 169.254.0.1;" + "ip
route add " + NetUtils.getLinkLocalCIDR() + " dev " + linkLocalBr + " src " +
+            Script.runSimpleBashScript("ip address add 169.254.0.1/16 dev " + linkLocalBr
+ ";" + "ip route add " + NetUtils.getLinkLocalCIDR() + " dev " + linkLocalBr + " src " +
                 NetUtils.getLinkLocalGateway());
         }
     }
@@ -302,7 +302,7 @@ public class BridgeVifDriver extends VifDriverBase {
     private void createControlNetwork(String privBrName) {
         deleteExitingLinkLocalRouteTable(privBrName);
         if (!isBridgeExists(privBrName)) {
-            Script.runSimpleBashScript("brctl addbr " + privBrName + "; ifconfig " + privBrName
+ " up; ifconfig " + privBrName + " 169.254.0.1", _timeout);
+            Script.runSimpleBashScript("brctl addbr " + privBrName + "; ip link set " + privBrName
+ " up; ip address add 169.254.0.1/16 dev " + privBrName, _timeout);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac06ec02/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
index b503674..1aae2b5 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
@@ -263,7 +263,7 @@ public class IvsVifDriver extends VifDriverBase {
             }
         }
         if (!foundLinkLocalBr) {
-            Script.runSimpleBashScript("ifconfig " + linkLocalBr + " 169.254.0.1;" + "ip
route add " + NetUtils.getLinkLocalCIDR() + " dev " + linkLocalBr + " src " +
+            Script.runSimpleBashScript("ip address add 169.254.0.1/16 dev " + linkLocalBr
+ ";" + "ip route add " + NetUtils.getLinkLocalCIDR() + " dev " + linkLocalBr + " src " +
                 NetUtils.getLinkLocalGateway());
         }
     }
@@ -271,7 +271,7 @@ public class IvsVifDriver extends VifDriverBase {
     private void createControlNetwork(String privBrName) {
         deleteExitingLinkLocalRouteTable(privBrName);
         if (!isBridgeExists(privBrName)) {
-            Script.runSimpleBashScript("brctl addbr " + privBrName + "; ifconfig " + privBrName
+ " up; ifconfig " + privBrName + " 169.254.0.1", _timeout);
+            Script.runSimpleBashScript("brctl addbr " + privBrName + "; ip link set " + privBrName
+ " up; ip address add 169.254.0.1/16 dev " + privBrName, _timeout);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac06ec02/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
index 1420682..6462df7 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
@@ -151,7 +151,7 @@ public class OvsVifDriver extends VifDriverBase {
             }
         }
         if (!foundLinkLocalBr) {
-            Script.runSimpleBashScript("ifconfig " + linkLocalBr + " 169.254.0.1;" + "ip
route add " + NetUtils.getLinkLocalCIDR() + " dev " + linkLocalBr + " src " +
+            Script.runSimpleBashScript("ip address add 169.254.0.1/16 dev " + linkLocalBr
+ ";" + "ip route add " + NetUtils.getLinkLocalCIDR() + " dev " + linkLocalBr + " src " +
                     NetUtils.getLinkLocalGateway());
         }
     }
@@ -159,7 +159,7 @@ public class OvsVifDriver extends VifDriverBase {
     private void createControlNetwork(String privBrName) {
         deleteExitingLinkLocalRouteTable(privBrName);
         if (!isBridgeExists(privBrName)) {
-            Script.runSimpleBashScript("ovs-vsctl add-br " + privBrName + "; ifconfig " +
privBrName + " up; ifconfig " + privBrName + " 169.254.0.1", _timeout);
+            Script.runSimpleBashScript("ovs-vsctl add-br " + privBrName + "; ip link set
" + privBrName + " up; ip address add 169.254.0.1/16 dev " + privBrName, _timeout);
         }
     }
 


Mime
View raw message