Repository navigation
CLOUDSTACK-9184: Fixes #2631 VMware dvs portgroup autogrowth #2634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,8 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw | |
| private static final Logger s_logger = Logger.getLogger(VmwareManagerImpl.class); | ||
|
|
||
| private static final long SECONDS_PER_MINUTE = 60; | ||
| 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 int _timeout; | ||
|
|
||
|
|
@@ -194,7 +196,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw | |
| 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; | ||
|
|
@@ -279,8 +281,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"; | ||
|
|
@@ -394,8 +394,16 @@ private void prepareHost(HostMO hostMo, String privateTrafficLabel) throws Excep | |
| HypervisorHostHelper.prepareNetwork(vSwitchName, "cloud.private", hostMo, vlanId, null, null, 180000, false, BroadcastDomainType.Vlan, null, 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) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you need that second condition there
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rafaelweingartner Yes. For these versions, the default ports which is 256 shouldn't change, for the backward compatibility. The below details can be documented in the upgrade details.
|
||
| 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, null); | ||
| vsType, portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan, null, null); | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the versions fixed? I mean, can't we have
4.2,4.3, and so on.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafaelweingartner No VMware ESXi/ESX hosts with these release versions. Take a look at the versions in the article https://kb.vmware.com/s/article/2143832.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM