You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ml...@apache.org on 2014/02/21 07:27:59 UTC
git commit: updated refs/heads/4.3-forward to 96355dc
Repository: cloudstack
Updated Branches:
refs/heads/4.3-forward c04fb68fc -> 96355dca4
CLOUDSTACK-6079:
fixed issue: if public traffic is on a physical network isolated by VLAN,
and guest traffic is on an another physical network isolated by VXLAN,
public traffic's broadcast type is updated to VXLAN by mistake.
submitted-by: mail@ynojima.net
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/96355dca
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/96355dca
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/96355dca
Branch: refs/heads/4.3-forward
Commit: 96355dca4b5230e96a64c38d29d727cebd3a10fb
Parents: c04fb68
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Thu Feb 20 23:23:58 2014 -0700
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Thu Feb 20 23:23:58 2014 -0700
----------------------------------------------------------------------
.../com/cloud/network/NetworkServiceImpl.java | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96355dca/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 270ff7b..34d674e 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3587,15 +3587,17 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
// For public traffic, get isolation method of physical network and update the public network accordingly
// each broadcast type will individually need to be qualified for support of public traffic
- List<String> isolationMethods = network.getIsolationMethods();
- if ((isolationMethods.size() == 1 && isolationMethods.get(0).toLowerCase().equals("vxlan"))
- || (isolationMethod != null && isolationMethods.contains(isolationMethod) && isolationMethod.toLowerCase().equals("vxlan"))) {
- // find row in networks table that is defined as 'Public', created when zone was deployed
- NetworkVO publicNetwork = _networksDao.listByZoneAndTrafficType(network.getDataCenterId(),TrafficType.Public).get(0);
- if (publicNetwork != null) {
- s_logger.debug("setting public network " + publicNetwork + " to broadcast type vxlan");
- publicNetwork.setBroadcastDomainType(BroadcastDomainType.Vxlan);
- _networksDao.persist(publicNetwork);
+ if (TrafficType.Public.equals(trafficType)){
+ List<String> isolationMethods = network.getIsolationMethods();
+ if ((isolationMethods.size() == 1 && isolationMethods.get(0).toLowerCase().equals("vxlan"))
+ || (isolationMethod != null && isolationMethods.contains(isolationMethod) && isolationMethod.toLowerCase().equals("vxlan"))) {
+ // find row in networks table that is defined as 'Public', created when zone was deployed
+ NetworkVO publicNetwork = _networksDao.listByZoneAndTrafficType(network.getDataCenterId(),TrafficType.Public).get(0);
+ if (publicNetwork != null) {
+ s_logger.debug("setting public network " + publicNetwork + " to broadcast type vxlan");
+ publicNetwork.setBroadcastDomainType(BroadcastDomainType.Vxlan);
+ _networksDao.persist(publicNetwork);
+ }
}
}