Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E0440200C40 for ; Thu, 23 Mar 2017 10:50:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DEDA9160B84; Thu, 23 Mar 2017 09:50:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2DAA4160B75 for ; Thu, 23 Mar 2017 10:50:11 +0100 (CET) Received: (qmail 19834 invoked by uid 500); 23 Mar 2017 09:50:05 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 19800 invoked by uid 99); 23 Mar 2017 09:50:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2017 09:50:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BECD4DFE1E; Thu, 23 Mar 2017 09:50:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rajani@apache.org To: commits@cloudstack.apache.org Date: Thu, 23 Mar 2017 09:50:03 -0000 Message-Id: <0b6468a824f24cb7aae877ab23ff45c9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/3] git commit: updated refs/heads/master to ec2d4dd archived-at: Thu, 23 Mar 2017 09:50:12 -0000 Repository: cloudstack Updated Branches: refs/heads/master 2b0a5ae4b -> ec2d4dd42 CLOUDSTACK-9811: fix duplicated nics on VR caused by nic name pp Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bf93b631 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bf93b631 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bf93b631 Branch: refs/heads/master Commit: bf93b6313e537a56b27f61fdaaf7319fc04a8058 Parents: 929c823 Author: Wei Zhou Authored: Thu Mar 16 11:48:35 2017 +0100 Committer: Wei Zhou Committed: Mon Mar 20 07:32:31 2017 +0100 ---------------------------------------------------------------------- .../hypervisor/kvm/resource/LibvirtComputingResource.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf93b631/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 7e2b1bf..c26c3e2 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -1464,7 +1464,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private String getBroadcastUriFromBridge(final String brName) { final String pif = matchPifFileInDirectory(brName); - final Pattern pattern = Pattern.compile("(\\D+)(\\d+)(\\D*)(\\d*)"); + final Pattern pattern = Pattern.compile("(\\D+)(\\d+)(\\D*)(\\d*)(\\D*)(\\d*)"); final Matcher matcher = pattern.matcher(pif); s_logger.debug("getting broadcast uri for pif " + pif + " and bridge " + brName); if(matcher.find()) { @@ -1472,7 +1472,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv return BroadcastDomainType.Vxlan.toUri(matcher.group(2)).toString(); } else{ - if (!matcher.group(4).isEmpty()) { + if (!matcher.group(6).isEmpty()) { + return BroadcastDomainType.Vlan.toUri(matcher.group(6)).toString(); + } else if (!matcher.group(4).isEmpty()) { return BroadcastDomainType.Vlan.toUri(matcher.group(4)).toString(); } else { //untagged or not matching (eth|bond|team)#.#