cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: updated refs/heads/master to f650d07
Date Fri, 25 Oct 2013 01:48:59 GMT
Updated Branches:
  refs/heads/master df1924d91 -> f650d07b6


CLOUDSTACK-4913: Don't enable ebtables/iptables for non-security group zone


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f650d07b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f650d07b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f650d07b

Branch: refs/heads/master
Commit: f650d07b6ff57c3108bdbe06890037e9184bbb2f
Parents: df1924d
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Thu Oct 24 18:27:01 2013 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Thu Oct 24 18:48:52 2013 -0700

----------------------------------------------------------------------
 .../hypervisor/xen/discoverer/XcpServerDiscoverer.java      | 3 +++
 .../cloud/hypervisor/xen/resource/CitrixResourceBase.java   | 9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f650d07b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index bb058e3..688488d 100755
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -311,6 +311,9 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer,
L
                     details.put("storage.network.device1", storageNetworkLabel);
                 }
 
+                DataCenterVO zone = _dcDao.findById(dcId);
+                boolean securityGroupEnabled = zone.isSecurityGroupEnabled();
+                params.put("securitygroupenabled", Boolean.toString(securityGroupEnabled));
 
                 params.put("wait", Integer.toString(_wait));
                 details.put("wait", Integer.toString(_wait));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f650d07b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 0c87e0b..57527c4 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -329,6 +329,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
     protected int _migratewait;
     protected String _instance; //instance name (default is usually "VM")
     static final Random _rand = new Random(System.currentTimeMillis());
+    protected boolean _securityGroupEnabled;
 
     protected IAgentControl _agentControl;
 
@@ -4969,8 +4970,11 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
                 s_logger.warn("set xenserver Iptable failed");
                 return null;
             }
-            _canBridgeFirewall = can_bridge_firewall(conn);
-
+            
+            if (_securityGroupEnabled) {
+            	_canBridgeFirewall = can_bridge_firewall(conn);
+            }
+            
             String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid,
"interval", Integer
                     .toString(_heartbeatInterval));
             if (result == null || !result.contains("> DONE <")) {
@@ -5944,6 +5948,7 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
         _publicNetworkName = (String) params.get("public.network.device");
         _guestNetworkName = (String)params.get("guest.network.device");
         _instance = (String) params.get("instance.name");
+        _securityGroupEnabled = Boolean.parseBoolean((String)params.get("securitygroupenabled"));
 
         _linkLocalPrivateNetworkName = (String) params.get("private.linkLocal.device");
         if (_linkLocalPrivateNetworkName == null) {


Mime
View raw message