Skip to content

Revert "Add the option to filter by host when retrieving of unregistered VMs (#9925)" #10647

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

DaanHoogland
Copy link
Contributor

@DaanHoogland DaanHoogland commented Apr 1, 2025

Description

This PR...

Fixes: #10634

#9925 caused a regression where under certain circumstances (with more than 100 VMs) console proxy would not work anymore. This has to do with the APIs being used in vmware, that timeout or do not work at all.

#9782 needs to be reworked as a consequence.

Types of changes

  • 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)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@@ -82,6 +82,49 @@ public VirtualMachineMO findVm(String vmName) throws Exception {
List<ObjectContent> ocs = getVmProperties(new String[] {"name", instanceNameCustomField});
return HypervisorHostHelper.findVmFromObjectContent(_context, ocs.toArray(new ObjectContent[0]), vmName, instanceNameCustomField);
}
public VirtualMachineMO findVm2(String vmName) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename the findVm method to something similar to findVmThroughPropertiesEx and rename this findVm2 method to findVm? This way we can redirect all the existing usages of the method to it. Then we could invoke findVmThroughPropertiesEx to the listUnmanagedInstances execution

@DaanHoogland DaanHoogland linked an issue Apr 7, 2025 that may be closed by this pull request
@rohityadavcloud rohityadavcloud added this to the 4.19.3 milestone Apr 7, 2025
@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 1.95122% with 603 lines in your changes missing coverage. Please review.

Project coverage is 15.16%. Comparing base (ee94ae5) to head (c7af57b).
Report is 16 commits behind head on 4.19.

Files with missing lines Patch % Lines
...m/cloud/hypervisor/vmware/mo/VirtualMachineMO.java 0.53% 372 Missing and 3 partials ⚠️
...d/hypervisor/vmware/manager/VmwareManagerImpl.java 6.79% 94 Missing and 2 partials ⚠️
...a/com/cloud/hypervisor/vmware/mo/DatacenterMO.java 0.00% 71 Missing ⚠️
...in/java/com/cloud/hypervisor/vmware/mo/HostMO.java 0.00% 14 Missing ⚠️
...ack/api/command/admin/zone/ListVmwareDcVmsCmd.java 0.00% 9 Missing ⚠️
...stack/api/command/admin/zone/ListVmwareDcsCmd.java 0.00% 9 Missing ⚠️
...com/cloud/hypervisor/vmware/util/VmwareClient.java 0.00% 7 Missing ⚠️
...mand/admin/zone/ListVsphereStoragePoliciesCmd.java 0.00% 5 Missing ⚠️
...nd/admin/zone/ImportVsphereStoragePoliciesCmd.java 0.00% 4 Missing ⚠️
...g/apache/cloudstack/api/response/HostResponse.java 0.00% 3 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##               4.19   #10647    +/-   ##
==========================================
  Coverage     15.16%   15.16%            
- Complexity    11328    11333     +5     
==========================================
  Files          5415     5412     -3     
  Lines        474824   474997   +173     
  Branches      57912    57957    +45     
==========================================
+ Hits          72014    72041    +27     
- Misses       394757   394899   +142     
- Partials       8053     8057     +4     
Flag Coverage Δ
uitests 4.29% <ø> (+<0.01%) ⬆️
unittests 15.89% <1.95%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12977

@Pearl1594 Pearl1594 moved this to In Progress in ACS 4.20.1 Apr 8, 2025
@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12997

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@nvazquez
Copy link
Contributor

@blueorangutan package

@harikrishna-patnala harikrishna-patnala linked an issue Apr 16, 2025 that may be closed by this pull request
@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10647 (QA-JID-600)

for (VmwareDatacenter vmwareDc : vmwareDcList) {
VmwareDatacenterResponse vmwareDcResponse = new VmwareDatacenterResponse();

vmwareDcResponse.setId(vmwareDc.getUuid());
vmwareDcResponse.setVcenter(vmwareDc.getVcenterHost());
vmwareDcResponse.setName(vmwareDc.getVmwareDatacenterName());
vmwareDcResponse.setZoneId(getZoneId());
vmwareDcResponse.setObjectName(ApiConstants.VMWARE_DC);
vmwareDcResponse.setObjectName("VMwareDC");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change needed? most of the object names used are in lower case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree @sureshanaparti , but this is a revert I can remove this part but than we need to add the code for https://github.com/apache/cloudstack/pull/10731/files

@blueorangutan
Copy link

[SF] Trillian test result (tid-13015)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 77755 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10647-t13015-vmware-70u3.zip
Smoke tests completed. 128 look OK, 5 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_events_resource Error 342.55 test_events_resource.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Error 121.76 test_network_permissions.py
test_01_restore_vm Error 3626.59 test_restore_vm.py
test_02_restore_vm_allocated_root Error 10.05 test_restore_vm.py
test_01_deploy_vm_on_specific_host Error 3603.39 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 2.42 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 1.42 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 2.48 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 2.43 test_vm_deployment_planner.py
test_09_expunge_vm Failure 424.64 test_vm_life_cycle.py

@vladimirpetrov
Copy link
Contributor

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

@vladimirpetrov a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests

Copy link
Contributor

@vladimirpetrov vladimirpetrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on manual testing, let's wait for the smoke test results though.

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-13042)

@DaanHoogland DaanHoogland marked this pull request as ready for review April 18, 2025 08:06
@blueorangutan
Copy link

[SF] Trillian test result (tid-13054)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 96591 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10647-t13054-vmware-70u3.zip
Smoke tests completed. 126 look OK, 7 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_events_resource Error 333.25 test_events_resource.py
test_list_vms_metrics_admin Error 3627.03 test_metrics_api.py
test_list_vms_metrics_history Error 7.94 test_metrics_api.py
test_list_volumes_metrics_history Error 3623.60 test_metrics_api.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Error 157.25 test_network_permissions.py
test_01_restore_vm Error 3607.98 test_restore_vm.py
test_02_restore_vm_allocated_root Error 3625.45 test_restore_vm.py
test_02_list_cpvm_vm Failure 0.06 test_ssvm.py
test_04_cpvm_internals Failure 0.06 test_ssvm.py
test_01_deploy_vm_on_specific_host Error 3602.21 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 4.46 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 4.50 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 4.52 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 2.40 test_vm_deployment_planner.py
test_09_expunge_vm Failure 424.58 test_vm_life_cycle.py

@DaanHoogland
Copy link
Contributor Author

@nvazquez @NuxRo , lgty?

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@DaanHoogland can you update the title and description to explain which PR is being reverted and why?

@rohityadavcloud
Copy link
Member

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

@rohityadavcloud a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13084)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 56596 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10647-t13084-vmware-70u3.zip
Smoke tests completed. 130 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_events_resource Error 329.90 test_events_resource.py
test_01_events_resource Error 329.91 test_events_resource.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Error 129.94 test_network_permissions.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Failure 1016.06 test_vpc_redundant.py

@DaanHoogland DaanHoogland changed the title find vms regression fix Revert "Add the option to filter by host when retrieving of unregistered VMs (apache#9925)" Apr 23, 2025
@DaanHoogland DaanHoogland changed the title Revert "Add the option to filter by host when retrieving of unregistered VMs (apache#9925)" Revert "Add the option to filter by host when retrieving of unregistered VMs (#9925)" Apr 23, 2025
@DaanHoogland DaanHoogland merged commit 5a5c865 into apache:4.19 Apr 24, 2025
25 of 26 checks passed
@github-project-automation github-project-automation bot moved this from ready for Review to Done in Apache CloudStack BugFest - Issues Apr 24, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in ACS 4.20.1 Apr 24, 2025
@DaanHoogland DaanHoogland deleted the ghi10634-findVmsFix branch May 1, 2025 12:48
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Vmware details are missing in the zone [VMware] 4.19.2.0 console access not working after the upgrade
8 participants