You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "gpordeus (via GitHub)" <gi...@apache.org> on 2024/09/26 20:12:50 UTC

[PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

gpordeus opened a new pull request, #9735:
URL: https://github.com/apache/cloudstack/pull/9735

   ### Description
   
   The MS sends the destroy/delete command of a VM to vCenter when cleaning up its volumes.  If the VM does not have a root volume, the VM with its folder and metadata files remain in vCenter.
   
   To reproduce, deploy a VM, detach its volume, and delete the VM. Then, check vCenter and the VM will still be there.
   
   This PR fixes it by implementing finalizeExpunge for VMWareGuru, which queues a Cleanup Command that, if the VM still exists, sends a destroy command to vCenter to cleanup whatever remained.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] 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
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   | Deploy VM | Destroy VM | Before PR | After PR |
   | ------ | ------ | ------ |  ------ | 
   | Without data disks, detach root disk. | With expunge | VM remains on vCenter :x: | VM gone from vCenter :white_check_mark: |
   | Without data disks, detach root disk. | Without expunge | VM remains on vCenter :white_check_mark: | VM remains on vCenter :white_check_mark: |
   | Without data disks, detach nothing | With expunge | VM gone from vCenter :white_check_mark: | VM gone from vCenter :white_check_mark: |
   | With a data disk, detach root disk | With expunge, without selecting data disk | VM remains on vCenter :x: | VM gone from vCenter :white_check_mark: |
   | With a data disk, detach root disk | With expunge, selecting the data disk | VM remains on vCenter :x: | VM gone from vCenter :white_check_mark: |
   | With a data disk, detach nothing | With expunge, without selecting the data disk | VM gone from vCenter :white_check_mark: | VM gone from vCenter :white_check_mark: |


-- 
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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2629532457

   <b>[SF] Trillian test result (tid-12229)</b>
   Environment: vmware-80u3 (x2), Advanced Networking with Mgmt server ol9
   Total time taken: 356658 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9735-t12229-vmware-80u3.zip
   Smoke tests completed. 98 look OK, 35 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` | 1427.32 | test_events_resource.py
   test_01_events_resource | `Error` | 1427.39 | test_events_resource.py
   test_CRUD_operations_guest_OS | `Error` | 0.04 | test_guest_os.py
   test_CRUD_operations_guest_OS_mapping | `Error` | 0.04 | test_guest_os.py
   test_guest_OS_mapping_check_with_hypervisor | `Error` | 0.04 | test_guest_os.py
   test_01_invalid_upgrade_kubernetes_cluster | `Failure` | 3663.85 | test_kubernetes_clusters.py
   test_02_upgrade_kubernetes_cluster | `Failure` | 3668.59 | test_kubernetes_clusters.py
   test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 3668.31 | test_kubernetes_clusters.py
   test_04_autoscale_kubernetes_cluster | `Failure` | 3684.11 | test_kubernetes_clusters.py
   test_05_basic_lifecycle_kubernetes_cluster | `Failure` | 3688.67 | test_kubernetes_clusters.py
   test_06_delete_kubernetes_cluster | `Failure` | 3672.34 | test_kubernetes_clusters.py
   test_08_upgrade_kubernetes_ha_cluster | `Failure` | 3738.20 | test_kubernetes_clusters.py
   test_10_vpc_tier_kubernetes_cluster | `Failure` | 4780.87 | test_kubernetes_clusters.py
   test_04_deploy_vm_for_other_user_and_test_vm_operations | `Error` | 199.42 | test_network_permissions.py
   test_01_add_primary_storage_disabled_host | `Error` | 0.23 | test_primary_storage.py
   ContextSuite context=TestStorageTags>:setup | `Error` | 91.28 | test_primary_storage.py
   test_01_primary_storage_scope_change | `Error` | 0.14 | test_primary_storage_scope.py
   test_01_vpc_privategw_acl | `Failure` | 998.39 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Failure` | 1015.61 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 999.03 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 999.56 | test_privategw_acl.py
   test_10_project_activation | `Error` | 155.34 | test_projects.py
   test_deploy_vm_with_registered_userdata | `Error` | 1111.40 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata | `Error` | 1111.46 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_allow | `Error` | 1126.15 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_allow | `Error` | 1126.24 | test_register_userdata.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 1079.72 | test_resource_accounting.py
   test_01_restore_vm | `Error` | 1097.75 | test_restore_vm.py
   test_02_restore_vm_allocated_root | `Error` | 42.72 | test_restore_vm.py
   ContextSuite context=TestRestoreVM>:teardown | `Error` | 55.21 | test_restore_vm.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 1118.14 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 1016.79 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 1094.56 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 1120.26 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 1015.05 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 995.98 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 996.00 | test_routers_network_ops.py
   test_03_restart_network_cleanup | `Error` | 992.77 | test_routers.py
   test_04_restart_network_wo_cleanup | `Failure` | 108.85 | test_routers.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 1117.15 | test_service_offerings.py
   test_03_create_vpc_with_specified_source_nat_ip_address | `Error` | 1014.59 | test_set_sourcenat.py
   test_04_change_source_nat_ip_address_for_vpc | `Error` | 1001.64 | test_set_sourcenat.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   test_01_list_sec_storage_vm | `Failure` | 0.05 | test_ssvm.py
   test_02_list_cpvm_vm | `Failure` | 0.04 | test_ssvm.py
   test_03_ssvm_internals | `Failure` | 0.05 | test_ssvm.py
   test_04_cpvm_internals | `Failure` | 0.04 | test_ssvm.py
   test_05_stop_ssvm | `Failure` | 0.04 | test_ssvm.py
   test_06_stop_cpvm | `Failure` | 0.04 | test_ssvm.py
   test_07_reboot_ssvm | `Failure` | 0.04 | test_ssvm.py
   test_08_reboot_cpvm | `Failure` | 0.05 | test_ssvm.py
   test_09_reboot_ssvm_forced | `Failure` | 0.05 | test_ssvm.py
   test_10_reboot_cpvm_forced | `Failure` | 0.04 | test_ssvm.py
   test_11_destroy_ssvm | `Failure` | 0.04 | test_ssvm.py
   test_12_destroy_cpvm | `Failure` | 954.34 | test_ssvm.py
   test_01_import_storage_policies | `Error` | 40.01 | test_storage_policy.py
   ContextSuite context=TestVMWareStoragePolicies>:teardown | `Error` | 40.04 | test_storage_policy.py
   ContextSuite context=TestTemplates>:setup | `Error` | 1130.69 | test_templates.py
   ContextSuite context=TestLBRuleUsage>:setup | `Error` | 1102.42 | test_usage.py
   ContextSuite context=TestVmUsage>:setup | `Error` | 1228.50 | test_usage.py
   test_01_volume_usage | `Error` | 103.85 | test_usage.py
   test_01_scale_up_verify | `Failure` | 576.65 | test_vm_autoscaling.py
   test_02_update_vmprofile_and_vmgroup | `Error` | 2.24 | test_vm_autoscaling.py
   test_03_scale_down_verify | `Error` | 1.09 | test_vm_autoscaling.py
   test_04_stop_remove_vm_in_vmgroup | `Error` | 3.34 | test_vm_autoscaling.py
   test_06_autoscaling_vmgroup_on_project_network | `Failure` | 588.02 | test_vm_autoscaling.py
   test_06_autoscaling_vmgroup_on_project_network | `Error` | 588.02 | test_vm_autoscaling.py
   test_07_autoscaling_vmgroup_on_vpc_network | `Error` | 1013.61 | test_vm_autoscaling.py
   ContextSuite context=TestVmAutoScaling>:teardown | `Error` | 1024.66 | test_vm_autoscaling.py
   test_01_deploy_vm_on_specific_host | `Error` | 0.10 | test_vm_deployment_planner.py
   test_02_deploy_vm_on_specific_cluster | `Error` | 1002.79 | test_vm_deployment_planner.py
   test_04_deploy_vm_on_host_override_pod_and_cluster | `Error` | 0.14 | test_vm_deployment_planner.py
   test_01_offline_migrate_VM_and_root_volume | `Error` | 1219.24 | test_vm_life_cycle.py
   test_02_offline_migrate_VM_with_two_data_disks | `Error` | 97.76 | test_vm_life_cycle.py
   test_03_live_migrate_VM_with_two_data_disks | `Error` | 95.73 | test_vm_life_cycle.py
   test_01_vapps_vm_cycle | `Error` | 28.71 | test_vm_life_cycle.py
   test_08_migrate_vm | `Error` | 0.06 | test_vm_life_cycle.py
   test_01_unmanage_vm_cycle | `Error` | 997.40 | test_vm_lifecycle_unmanage_import.py
   ContextSuite context=TestUnmanageVM>:teardown | `Error` | 997.43 | test_vm_lifecycle_unmanage_import.py
   test_04_deploy_vnf_appliance | `Error` | 1267.35 | test_vnf_templates.py
   test_04_deploy_vnf_appliance | `Error` | 1267.40 | test_vnf_templates.py
   test_05_delete_vnf_template | `Error` | 1.11 | test_vnf_templates.py
   ContextSuite context=TestVnfTemplates>:teardown | `Error` | 1.20 | test_vnf_templates.py
   ContextSuite context=TestVolumes>:setup | `Error` | 1153.66 | test_volumes.py
   test_01_verify_ipv6_vpc | `Error` | 997.38 | test_vpc_ipv6.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 1003.11 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Error` | 1005.01 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 1006.45 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 1029.23 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 1006.38 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Error` | 1005.57 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Error` | 1017.90 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 1002.80 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 1000.85 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Failure` | 998.74 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 996.76 | test_vpc_vpn.py
   


-- 
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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2622061386

   @blueorangutan test ol9 vmware-80u3 keepEnv


-- 
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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2472968959

   @vladimirpetrov 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.


-- 
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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "vladimirpetrov (via GitHub)" <gi...@apache.org>.
vladimirpetrov commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2472965710

   @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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2622065716

   @DaanHoogland a [SL] Trillian-Jenkins test job (ol9 mgmt + vmware-80u3) 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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2473187510

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


-- 
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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735


-- 
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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2377861680

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/9735?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 4.30%. Comparing base [(`89482a2`)](https://app.codecov.io/gh/apache/cloudstack/commit/89482a258303340407d6739ca7406f6a7f4a28d3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`14fd10e`)](https://app.codecov.io/gh/apache/cloudstack/commit/14fd10ed49e2c8bd4f3b206fcb83c5947ae6fee7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 15 commits behind head on 4.19.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@           Coverage Diff            @@
   ##            4.19   #9735      +/-   ##
   ========================================
   - Coverage   4.76%   4.30%   -0.47%     
   ========================================
     Files        366     366              
     Lines      29525   29528       +3     
     Branches    5167    5168       +1     
   ========================================
   - Hits        1408    1270     -138     
   - Misses     28111   28114       +3     
   - Partials       6     144     +138     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9735/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9735/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.30% <ø> (-0.47%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/9735?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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


Re: [PR] Fix VMWare leftovers when deleting VM without root disk [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #9735:
URL: https://github.com/apache/cloudstack/pull/9735#issuecomment-2630402563

   > [SF] Trillian test result (tid-12229) Environment: vmware-80u3 (x2), Advanced Networking with Mgmt server ol9 Total time taken: 356658 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9735-t12229-vmware-80u3.zip Smoke tests completed. 98 look OK, 35 have errors, 0 did not run Only failed and skipped tests results shown below:
   
   @gpordeus , it seems my lab is not in a good state. Do you have any colleague or client to test this?


-- 
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