You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/08/26 05:40:31 UTC
[GitHub] [cloudstack] sureshanaparti opened a new pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
sureshanaparti opened a new pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257
## Description
<!--- Describe your changes in detail -->
CLOUDSTACK-9175: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Summary: When a new host is added to a cluster, Cloudstack doesn't create all the port groups (created by cloudstack earlier in other hosts) present in the cluster. Since the new host doesn't have all the necessary networking port groups of cloudstack, it is not eligible to participate in DRS load balancing or HA.
Solution: When adding a host to the cluster in Cloudstack, use VMware API to find the list of unique port groups on a previously added host (older host in the cluster) if exists and then create them on the new host.
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
Fixes: #3156
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [] Bug fix (non-breaking change which fixes an issue)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
## Screenshots (if appropriate):

## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Manually tested adding a new host in the VMware cluster, and verified the port groups added in the new host.
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] nvazquez merged pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901114735
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901114331
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#discussion_r693672795
##########
File path: vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HostMO.java
##########
@@ -1156,6 +1194,41 @@ public String getNetworkName(String netMorVal) throws Exception {
return networkName;
}
+ public void createPortGroup(HostPortGroupSpec spec) throws Exception {
+ if (spec == null) {
+ return;
+ }
+
+ synchronized (_mor.getValue().intern()) {
Review comment:
@DaanHoogland `_mor` object val might not be the same / unique while attempting this from multiple threads. intern() call on its value ensures same val of the String object, and so valid object for synchronisation.
Few similar usages here:
- https://github.com/apache/cloudstack/blob/8a16729fcf10d9e6952fcccc07d8d17952fa6312/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java#L1384
- https://github.com/apache/cloudstack/blob/8a16729fcf10d9e6952fcccc07d8d17952fa6312/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HostMO.java#L1167
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#discussion_r692738225
##########
File path: vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HostMO.java
##########
@@ -1156,6 +1194,41 @@ public String getNetworkName(String netMorVal) throws Exception {
return networkName;
}
+ public void createPortGroup(HostPortGroupSpec spec) throws Exception {
+ if (spec == null) {
+ return;
+ }
+
+ synchronized (_mor.getValue().intern()) {
Review comment:
can you explain why you synchronise on this object @sureshanaparti ? Intuitively I'd say just on the `HostMO` instance you want to add to the portgoup, i.e. `_mor`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti closed pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti closed pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901136455
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian. SL-JID 911
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#discussion_r694892124
##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
##########
@@ -446,6 +449,29 @@ private void prepareHost(HostMO hostMo, String privateTrafficLabel) throws Excep
}
}
+ private HostMO getOldestExistentHostInCluster(Long clusterId, VmwareContext serviceContext) throws Exception {
+ HostVO host = hostDao.findOldestExistentHypervisorHostInCluster(clusterId);
+ if (host == null) {
+ return null;
+ }
+
+ ManagedObjectReference morSrcHost = HypervisorHostHelper.getHypervisorHostMorFromGuid(host.getGuid());
+ if (morSrcHost == null) {
+ Map<String, String> clusterDetails = clusterDetailsDao.findDetails(clusterId);
+ if (clusterDetails.get("url") == null) {
Review comment:
> Can we use `StringUtils.isBlank(..)` here, since cluster_details does not accept null values anymore?
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-904680763
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#discussion_r693744852
##########
File path: vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HostMO.java
##########
@@ -1156,6 +1194,41 @@ public String getNetworkName(String netMorVal) throws Exception {
return networkName;
}
+ public void createPortGroup(HostPortGroupSpec spec) throws Exception {
+ if (spec == null) {
+ return;
+ }
+
+ synchronized (_mor.getValue().intern()) {
Review comment:
tnx @sureshanaparti :+1:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-904707979
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 998
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rhtyd commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-907437637
👏 6 year old PR gets merged
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901137683
@blueorangutan test centos7 vmware-67u3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-904715303
@blueorangutan test centos7 vmware-67u3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901114643
> ping @sureshanaparti ?
rebased, and tested @rhtyd
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] nvazquez commented on a change in pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
nvazquez commented on a change in pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#discussion_r694463880
##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
##########
@@ -446,6 +449,29 @@ private void prepareHost(HostMO hostMo, String privateTrafficLabel) throws Excep
}
}
+ private HostMO getOldestExistentHostInCluster(Long clusterId, VmwareContext serviceContext) throws Exception {
+ HostVO host = hostDao.findOldestExistentHypervisorHostInCluster(clusterId);
+ if (host == null) {
+ return null;
+ }
+
+ ManagedObjectReference morSrcHost = HypervisorHostHelper.getHypervisorHostMorFromGuid(host.getGuid());
+ if (morSrcHost == null) {
+ Map<String, String> clusterDetails = clusterDetailsDao.findDetails(clusterId);
+ if (clusterDetails.get("url") == null) {
Review comment:
Can we use `StringUtils.isBlank(..)` here, since cluster_details does not accept null values anymore?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901138122
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-904716143
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901114735
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-904681696
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-905098131
<b>Trillian test result (tid-1764)</b>
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36895 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1257-t1764-vmware-67u3.zip
Smoke tests completed. 89 look OK, 0 have error(s)
Only failed tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901553762
<b>Trillian test result (tid-1699)</b>
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42527 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1257-t1699-vmware-67u3.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Smoke tests completed. 89 look OK, 0 have error(s)
Only failed tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#discussion_r693672795
##########
File path: vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HostMO.java
##########
@@ -1156,6 +1194,41 @@ public String getNetworkName(String netMorVal) throws Exception {
return networkName;
}
+ public void createPortGroup(HostPortGroupSpec spec) throws Exception {
+ if (spec == null) {
+ return;
+ }
+
+ synchronized (_mor.getValue().intern()) {
Review comment:
@DaanHoogland `_mor` object val might not be the same / unique while attempting this from multiple threads. intern() call on its value ensures same val of the String object, and so valid object for synchronisation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rhtyd commented on pull request #1257: CLOUDSTACK-9175: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-895076479
ping @sureshanaparti ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #1257: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #1257:
URL: https://github.com/apache/cloudstack/pull/1257#issuecomment-901114331
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org