diff --git a/server/src/com/cloud/agent/manager/allocator/impl/RecreateHostAllocator.java b/server/src/com/cloud/agent/manager/allocator/impl/RecreateHostAllocator.java index 10973c7bc83..19779476347 100644 --- a/server/src/com/cloud/agent/manager/allocator/impl/RecreateHostAllocator.java +++ b/server/src/com/cloud/agent/manager/allocator/impl/RecreateHostAllocator.java @@ -30,12 +30,11 @@ import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.manager.allocator.HostAllocator; -import com.cloud.configuration.Config; -import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.dc.ClusterVO; import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; import com.cloud.dc.PodCluster; +import com.cloud.dc.DataCenter.NetworkType; import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.HostPodDao; import com.cloud.host.Host; @@ -45,7 +44,6 @@ import com.cloud.storage.VolumeVO; import com.cloud.storage.dao.StoragePoolDao; import com.cloud.storage.dao.VolumeDao; import com.cloud.utils.Pair; -import com.cloud.utils.component.ComponentLocator; import com.cloud.utils.component.Inject; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; @@ -59,7 +57,6 @@ public class RecreateHostAllocator extends FirstFitRoutingAllocator { @Inject ClusterDao _clusterDao; @Inject AgentManager _agentMgr; @Inject VolumeDao _volsDao; - boolean _isDirect; @Override public Host allocateTo(VirtualMachineProfile vm, ServiceOffering offering, Host.Type type, DataCenterVO dc, HostPodVO pod, @@ -77,7 +74,9 @@ public class RecreateHostAllocator extends FirstFitRoutingAllocator { } List pcs = _agentMgr.listByDataCenter(dc.getId()); - if (_isDirect) { + //getting rid of direct.attached.untagged.vlan.enabled config param: Bug 7204 + //basic network type for zone maps to direct untagged case + if (dc.getNetworkType().equals(NetworkType.Basic)) { s_logger.debug("Direct Networking mode so we can only allow the host to be allocated in the same pod due to public ip address cannot change"); List vols = _volsDao.findByInstance(vm.getId()); VolumeVO vol = vols.get(0); @@ -118,11 +117,6 @@ public class RecreateHostAllocator extends FirstFitRoutingAllocator { public boolean configure(String name, Map params) throws ConfigurationException { super.configure(name, params); - ComponentLocator locator = ComponentLocator.getCurrentLocator(); - ConfigurationDao configDao = locator.getDao(ConfigurationDao.class); - Map dbParams = configDao.getConfiguration(params); - - _isDirect = Boolean.parseBoolean(dbParams.get(Config.DirectAttachUntaggedVlanEnabled.key())); return true; } diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java index a2c9afdab41..1d12658f9bc 100755 --- a/server/src/com/cloud/api/ApiServer.java +++ b/server/src/com/cloud/api/ApiServer.java @@ -659,10 +659,6 @@ public class ApiServer implements HttpRequestHandler { if(directAttachNetworkGroupsEnabled == null) directAttachNetworkGroupsEnabled = "false"; - String directAttachedUntaggedEnabled = _ms.getConfigurationValue("direct.attach.untagged.vlan.enabled"); - if (directAttachedUntaggedEnabled == null) - directAttachedUntaggedEnabled = "false"; - String systemVmUseLocalStorage = _ms.getConfigurationValue("system.vm.use.local.storage"); if (systemVmUseLocalStorage == null) systemVmUseLocalStorage = "false"; @@ -679,7 +675,6 @@ public class ApiServer implements HttpRequestHandler { // session.setAttribute("networktype", networkType); session.setAttribute("hypervisortype", hypervisorType); session.setAttribute("directattachnetworkgroupsenabled", directAttachNetworkGroupsEnabled); - session.setAttribute("directattacheduntaggedenabled", directAttachedUntaggedEnabled); session.setAttribute("systemvmuselocalstorage", systemVmUseLocalStorage); if (timezone != null) { diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index 2717cc41075..2d131f98999 100644 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -154,7 +154,6 @@ public enum Config { DirectAttachNetworkGroupsEnabled("Advanced", ManagementServer.class, Boolean.class, "direct.attach.network.groups.enabled", "false", "Ec2-style distributed firewall for direct-attach VMs", "true,false"), DirectAttachNetworkEnabled("Advanced", ManagementServer.class, Boolean.class, "direct.attach.network.externalIpAllocator.enabled", "false", "Direct-attach VMs using external DHCP server", "true,false"), DirectAttachNetworkExternalAPIURL("Advanced", ManagementServer.class, String.class, "direct.attach.network.externalIpAllocator.url", null, "Direct-attach VMs using external DHCP server (API url)", null), - DirectAttachUntaggedVlanEnabled("Advanced", ManagementServer.class, String.class, "direct.attach.untagged.vlan.enabled", "false", "Indicate whether the system supports direct-attached untagged vlan", "true,false"), CheckPodCIDRs("Advanced", ManagementServer.class, String.class, "check.pod.cidrs", "true", "If true, different pods must belong to different CIDR subnets.", "true,false"), MD5Hashed("Advanced", ManagementServer.class, Boolean.class, "security.password.md5hashed", "true", "If set to false password is sent in clear text or else md5hashed", null),