[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16387816#comment-16387816
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10274:
---------------------------------------------

rhtyd closed pull request #2448: CLOUDSTACK-10274: L2 network refused to be 
designed on VXLAN physical network
URL: https://github.com/apache/cloudstack/pull/2448
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 c065bd191d0..35f588fd567 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 VxlanGuestNetworkGuru() {
     @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 Network design(NetworkOffering offering, 
DeploymentPlan plan, Network use
             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;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> L2 network refused to be designed on VXLAN physical network 
> ------------------------------------------------------------
>
>                 Key: CLOUDSTACK-10274
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10274
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.11.0.0
>            Reporter: Nicolas Vazquez
>            Priority: Major
>             Fix For: 4.11.1.1
>
>
> Issue reported by [~nuxro] while trying to add an L2 network on a VXLAN 
> physical network:
> 2018-02-06 11:20:27,748 DEBUG [c.c.n.NetworkServiceImpl] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Found physical 
> network id=201 based on requested tags mellanoxvxlan
> 2018-02-06 11:20:27,749 DEBUG [c.c.n.NetworkServiceImpl] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Found physical 
> network id=201 based on requested tags mellanoxvxlan
> 2018-02-06 11:20:27,766 DEBUG [c.c.n.g.BigSwitchBcfGuestNetworkGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Refusing to 
> design this network, the physical isolation type is not BCF_SEGMENT
> 2018-02-06 11:20:27,766 DEBUG [o.a.c.n.c.m.ContrailGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Refusing to 
> design this network
> 2018-02-06 11:20:27,767 DEBUG [c.c.n.g.NiciraNvpGuestNetworkGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Refusing to 
> design this network
> 2018-02-06 11:20:27,767 DEBUG [o.a.c.n.o.OpendaylightGuestNetworkGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Refusing to 
> design this network
> 2018-02-06 11:20:27,767 DEBUG [c.c.n.g.OvsGuestNetworkGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Refusing to 
> design this network
> 2018-02-06 11:20:27,769 DEBUG [o.a.c.n.g.SspGuestNetworkGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) SSP not 
> configured to be active
> 2018-02-06 11:20:27,769 DEBUG [c.c.n.g.BrocadeVcsGuestNetworkGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Refusing to 
> design this network
> 2018-02-06 11:20:27,769 DEBUG [c.c.n.g.NuageVspGuestNetworkGuru] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Refusing to 
> design network using network offering 19 on physical network 201
> 2018-02-06 11:20:27,770 DEBUG [o.a.c.e.o.NetworkOrchestrator] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Releasing lock 
> for Acct[6af2875b-04fc-11e8-923e-002590474525-admin]
> 2018-02-06 11:20:27,789 DEBUG [c.c.u.d.T.Transaction] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) Rolling back 
> the transaction: Time = 38 Name =  qtp788117692-390; called by 
> -TransactionLegacy.rollback:889-TransactionLegacy.removeUpTo:832-TransactionLegacy.close:656-Transaction.execute:43-Transaction.execute:47-NetworkOrchestrator.createGuestNetwork:2315-NetworkServiceImpl$4.doInTransaction:1383-NetworkServiceImpl$4.doInTransaction:1331-Transaction.execute:40-NetworkServiceImpl.commitNetwork:1331-NetworkServiceImpl.createGuestNetwork:1294-NativeMethodAccessorImpl.invoke0:-2
> 2018-02-06 11:20:27,798 ERROR [c.c.a.ApiServer] 
> (qtp788117692-390:ctx-f1a980be ctx-61be30e8) (logid:0ca0c866) unhandled 
> exception executing api command: [Ljava.lang.String;@43b9df02
> com.cloud.utils.exception.CloudRuntimeException: Unable to convert network 
> offering with specified id to network profile
>         at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.setupNetwork(NetworkOrchestrator.java:726)
>         at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator$10.doInTransaction(NetworkOrchestrator.java:2364)
>         at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator$10.doInTransaction(NetworkOrchestrator.java:2315)
>         at 
> com.cloud.utils.db.Transaction$2.doInTransaction(Transaction.java:50)
>         at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
>         at com.cloud.utils.db.Transaction.execute(Transaction.java:47)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to