[
https://issues.apache.org/jira/browse/CLOUDSTACK-9184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470055#comment-16470055
]
ASF GitHub Bot commented on CLOUDSTACK-9184:
--------------------------------------------
rhtyd closed pull request #1253: CLOUDSTACK-9184: [VMware]
vmware.ports.per.dvportgroup global setting is not useful from vCenter 5.0
onwards
URL: https://github.com/apache/cloudstack/pull/1253
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/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index b0f87af648d..bb451ceb392 100644
---
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -134,6 +134,10 @@
private static final long SECONDS_PER_MINUTE = 60;
private static final int STARTUP_DELAY = 60000; // 60
seconds
private static final long DEFAULT_HOST_SCAN_INTERVAL = 600000; //
every 10 minutes
+
+ private static final int DEFAULT_PORTS_PER_DV_PORT_GROUP_VSPHERE4_x = 256;
+ private static final int DEFAULT_PORTS_PER_DV_PORT_GROUP = 8;
+
private long _hostScanInterval = DEFAULT_HOST_SCAN_INTERVAL;
private int _timeout;
@@ -180,7 +184,7 @@
private StorageLayer _storage;
private final String _privateNetworkVSwitchName = "vSwitch0";
- private int _portsPerDvPortGroup = 256;
+ private int _portsPerDvPortGroup = DEFAULT_PORTS_PER_DV_PORT_GROUP;
private boolean _fullCloneFlag;
private boolean _instanceNameFlag;
private String _serviceConsoleName;
@@ -267,8 +271,6 @@ public boolean configure(String name, Map<String, Object>
params) throws Configu
_instanceNameFlag = Boolean.parseBoolean(value);
}
- _portsPerDvPortGroup =
NumbersUtil.parseInt(_configDao.getValue(Config.VmwarePortsPerDVPortGroup.key()),
_portsPerDvPortGroup);
-
_serviceConsoleName =
_configDao.getValue(Config.VmwareServiceConsole.key());
if (_serviceConsoleName == null) {
_serviceConsoleName = "Service Console";
@@ -387,8 +389,17 @@ private void prepareHost(HostMO hostMo, String
privateTrafficLabel) throws Excep
HypervisorHostHelper.prepareNetwork(vSwitchName, "cloud.private",
hostMo, vlanId, null, null, 180000, false, BroadcastDomainType.Vlan, null);
}
else {
+ int portsPerDvPortGroup = _portsPerDvPortGroup;
+ AboutInfo about = hostMo.getHostAboutInfo();
+ if (about != null) {
+ String version = about.getApiVersion();
+ if (version != null && (version.equals("4.0") ||
version.equals("4.1")) && _portsPerDvPortGroup <
DEFAULT_PORTS_PER_DV_PORT_GROUP_VSPHERE4_x) {
+ portsPerDvPortGroup =
DEFAULT_PORTS_PER_DV_PORT_GROUP_VSPHERE4_x;
+ }
+ }
+
HypervisorHostHelper.prepareNetwork(vSwitchName, "cloud.private",
hostMo, vlanId, null, null, null, 180000,
- vsType, _portsPerDvPortGroup, null, false,
BroadcastDomainType.Vlan, null);
+ vsType, portsPerDvPortGroup, null, false,
BroadcastDomainType.Vlan, null);
}
}
diff --git a/server/src/com/cloud/configuration/Config.java
b/server/src/com/cloud/configuration/Config.java
index 551c61ea2e4..e9ef4432f75 100644
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -1135,14 +1135,6 @@
"false",
"Enable/Disable Nexus/Vmware dvSwitch in VMware environment",
null),
- VmwarePortsPerDVPortGroup(
- "Network",
- ManagementServer.class,
- Integer.class,
- "vmware.ports.per.dvportgroup",
- "256",
- "Default number of ports per Vmware dvPortGroup in VMware
environment",
- null),
VmwareCreateFullClone(
"Advanced",
ManagementServer.class,
diff --git a/setup/db/db/schema-4930to41000-cleanup.sql
b/setup/db/db/schema-4930to41000-cleanup.sql
index 986dcdfe7da..b9b853e34f2 100644
--- a/setup/db/db/schema-4930to41000-cleanup.sql
+++ b/setup/db/db/schema-4930to41000-cleanup.sql
@@ -21,4 +21,6 @@
DELETE FROM `cloud`.`configuration` WHERE
name='consoleproxy.loadscan.interval';
+DELETE FROM `cloud`.`configuration` WHERE
`name`='vmware.ports.per.dvportgroup';
+
DELETE FROM `cloud`.`host_details` where name = 'vmName' and value in (select
name from `cloud`.`vm_instance` where state = 'Expunging' and hypervisor_type
='BareMetal');
----------------------------------------------------------------
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:
[email protected]
> [VMware] vmware.ports.per.dvportgroup global setting is not useful from
> vCenter 5.0 onwards
> -------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-9184
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9184
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server, VMware
> Affects Versions: 4.5.2
> Reporter: Suresh Kumar Anaparti
> Assignee: Suresh Kumar Anaparti
> Priority: Major
>
> CloudStack has a global config paramter vmware.ports.per.dvportgroup for
> setting the number of ports per dvportgroup of Distributed Virtual Switch
> (DVS) and this takes effect when the zone is created.
> Auto expand/shrink features adjusts the ports per dvportgroup value
> dynamically from ESX 5.0 release. So, even if we set this global setting,
> auto expand will take effect and the value configured at cloudstack is not
> useful anymore.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)