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 818807b
Date Thu, 26 Dec 2013 23:45:24 GMT
Updated Branches:
  refs/heads/4.3 69524fb11 -> 818807b2e


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

Branch: refs/heads/4.3
Commit: 818807b2edb63e5a035abee59393e7f687fce6d2
Parents: 69524fb
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:44:09 2013 -0700

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/LibvirtComputingResource.java | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/818807b2/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 91cd1e9..26deadd 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
@@ -1685,12 +1685,20 @@ ServerResource {
         String pif= matchPifFileInDirectory(brName);
         Pattern pattern = Pattern.compile("(\\D+)(\\d+)(\\D*)(\\d*)");
         Matcher matcher = pattern.matcher(pif);
+        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();
+                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


Mime
View raw message