cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.4 to 024a292
Date Tue, 14 Apr 2015 18:57:17 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 5f448c1eb -> 024a2924b


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/024a2924
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/024a2924
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/024a2924

Branch: refs/heads/4.4
Commit: 024a2924b711cc1b5a524a08ae022f818c2d1cb5
Parents: 5f448c1
Author: Remi Bergsma <github@remi.nl>
Authored: Mon Apr 13 22:45:15 2015 -0500
Committer: Daan Hoogland <dhoogland@schubergphilis.com>
Committed: Tue Apr 14 13:56:30 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/024a2924/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 2bab7a1..6dba13b 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
@@ -279,7 +279,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());
         }
     }
@@ -287,7 +287,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/024a2924/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 6b482bf..cbad7bc 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
@@ -147,7 +147,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());
         }
     }
@@ -155,7 +155,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