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/master to 8455a06
Date Thu, 26 Dec 2013 23:53:09 GMT
Updated Branches:
  refs/heads/master 6f800506f -> 8455a0677


CLOUDSTACK-5654: Don't pass empty string to BroadcastDomainType.Vlan.toUri
when attempting to parse VLAN/VNI from bridge's physical ethernet device


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

Branch: refs/heads/master
Commit: 8455a0677a8489a84767e01bba2f646339ea6cb2
Parents: 6f80050
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Thu Dec 26 16:44:09 2013 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Thu Dec 26 16:52:33 2013 -0700

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java     | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8455a067/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 cd4ab26..63c2a08 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
@@ -1804,11 +1804,20 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
         String pif = matchPifFileInDirectory(brName);
         Pattern pattern = Pattern.compile("(\\D+)(\\d+)(\\D*)(\\d*)");
         Matcher matcher = pattern.matcher(pif);
-        if (matcher.find()) {
-            if (brName.startsWith("brvx")) {
+        s_logger.debug("getting broadcast uri for pif " + pif + " and bridge " + brName);
+        if(matcher.find()) {
+            if (brName.startsWith("brvx")){
                 return BroadcastDomainType.Vxlan.toUri(matcher.group(2)).toString();
-            } else {
-                return BroadcastDomainType.Vlan.toUri(matcher.group(4)).toString();
+            }
+            else{
+                if (!matcher.group(4).isEmpty()) {
+                    return BroadcastDomainType.Vlan.toUri(matcher.group(4)).toString();
+                } else {
+                    //untagged or not matching (eth|bond)#.#
+                    s_logger.debug("failed to get vNet id from bridge " + brName
+                           + "attached to physical interface" + pif + ", perhaps untagged
interface");
+                    return "";
+                }
             }
         } else {
             s_logger.debug("failed to get vNet id from bridge " + brName + "attached to physical
interface" + pif);


Mime
View raw message