cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject git commit: updated refs/heads/4.3 to 83f1f68
Date Tue, 31 Dec 2013 23:03:32 GMT
Updated Branches:
  refs/heads/4.3 23841e336 -> 83f1f6840


CLOUDSTACK-5697 - public ip ranges should allow VNI rather than only working with untagged


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

Branch: refs/heads/4.3
Commit: 83f1f68408b3b9da9eac096d95638ee13aabab30
Parents: 23841e3
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Dec 31 16:03:06 2013 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Dec 31 16:03:06 2013 -0700

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/resource/BridgeVifDriver.java   |  2 +-
 .../kvm/resource/LibvirtComputingResource.java           | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83f1f684/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 b400fd2..2703ddc 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
@@ -126,7 +126,7 @@ public class BridgeVifDriver extends VifDriverBase {
         } else if (nic.getType() == Networks.TrafficType.Public) {
             Integer networkRateKBps = (nic.getNetworkRateMbps() != null && nic.getNetworkRateMbps().intValue()
!= -1) ? nic.getNetworkRateMbps().intValue() * 128 : 0;
             if (nic.getBroadcastType() == Networks.BroadcastDomainType.Vlan
-                    && !vNetId.equalsIgnoreCase("untagged")) {
+                    && !vNetId.equalsIgnoreCase("untagged") || nic.getBroadcastType()
== Networks.BroadcastDomainType.Vxlan) {
                 if(trafficLabel != null && !trafficLabel.isEmpty()){
                     s_logger.debug("creating a vNet dev and bridge for public traffic per
traffic label " + trafficLabel);
                     String brName = createVnetBr(vNetId, trafficLabel, protocol);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83f1f684/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 26deadd..9f694cc 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -1016,6 +1016,17 @@ ServerResource {
             }
         }
 
+        // public creates bridges on a pif, if private bridge not found try pif direct
+        // This addresses the unnecessary requirement of someone to create an unused bridge
just for traffic label
+        if (_pifs.get("public") == null) {
+            s_logger.debug("public traffic label '" + _publicBridgeName+ "' not found as
bridge, looking for physical interface");
+            File dev = new File("/sys/class/net/" + _publicBridgeName);
+            if (dev.exists()) {
+                s_logger.debug("public traffic label '" + _publicBridgeName + "' found as
a physical device");
+                _pifs.put("public", _publicBridgeName);
+            }
+        }
+
         s_logger.debug("done looking for pifs, no more bridges");
     }
 


Mime
View raw message