From commits-return-72773-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Tue Mar 6 14:56:54 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2E69F180652 for ; Tue, 6 Mar 2018 14:56:54 +0100 (CET) Received: (qmail 45809 invoked by uid 500); 6 Mar 2018 13:56:53 -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 45800 invoked by uid 99); 6 Mar 2018 13:56:53 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2018 13:56:53 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 66D648257A; Tue, 6 Mar 2018 13:56:52 +0000 (UTC) Date: Tue, 06 Mar 2018 13:56:52 +0000 To: "commits@cloudstack.apache.org" Subject: [cloudstack] branch 4.11 updated: CLOUDSTACK-10274: L2 network refused to be designed on VXLAN physical network (#2448) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152034461201.10412.6289611670347982391@gitbox.apache.org> From: rohit@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: cloudstack X-Git-Refname: refs/heads/4.11 X-Git-Reftype: branch X-Git-Oldrev: 0bb20a7ed27865c01f81bca191e6347c32be9c4c X-Git-Newrev: c0b920f740f5e5ba33f0e210caf4642edb2b7224 X-Git-Rev: c0b920f740f5e5ba33f0e210caf4642edb2b7224 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch 4.11 in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/4.11 by this push: new c0b920f CLOUDSTACK-10274: L2 network refused to be designed on VXLAN physical network (#2448) c0b920f is described below commit c0b920f740f5e5ba33f0e210caf4642edb2b7224 Author: Nicolas Vazquez AuthorDate: Tue Mar 6 10:56:47 2018 -0300 CLOUDSTACK-10274: L2 network refused to be designed on VXLAN physical network (#2448) L2 network refused to be designed on VXLAN physical network. Add fix for vxlan issue. Add condition for L2 networks which do not allow specifying vlan. --- .../src/com/cloud/network/guru/VxlanGuestNetworkGuru.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java b/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java index c065bd1..35f588f 100644 --- a/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java +++ b/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java @@ -55,11 +55,12 @@ public class VxlanGuestNetworkGuru extends GuestNetworkGuru { @Override protected boolean canHandle(NetworkOffering offering, final NetworkType networkType, final PhysicalNetwork physicalNetwork) { // This guru handles only Guest Isolated network that supports Source nat service - if (networkType == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) && offering.getGuestType() == Network.GuestType.Isolated && - isMyIsolationMethod(physicalNetwork)) { + if (networkType == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) && + (offering.getGuestType() == Network.GuestType.Isolated || offering.getGuestType() == Network.GuestType.L2) && + isMyIsolationMethod(physicalNetwork)) { return true; } else { - s_logger.trace("We only take care of Guest networks of type " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced); + s_logger.trace("We only take care of Guest networks of type " + GuestType.Isolated + " or " + GuestType.L2 + " in zone of type " + NetworkType.Advanced); return false; } } @@ -72,6 +73,10 @@ public class VxlanGuestNetworkGuru extends GuestNetworkGuru { return null; } + if (offering.getGuestType() == GuestType.L2 && network.getBroadcastUri() != null) { + String vxlan = BroadcastDomainType.getValue(network.getBroadcastUri()); + network.setBroadcastUri(BroadcastDomainType.Vxlan.toUri(vxlan)); + } network.setBroadcastDomainType(BroadcastDomainType.Vxlan); return network; -- To stop receiving notification emails like this one, please contact rohit@apache.org.