Skip to content

Conversation

@SadiJr
Copy link
Contributor

@SadiJr SadiJr commented Feb 15, 2023

Description

ACS allows users to modify the target VM when restoring one VM from a backup (VMware + Veeam). This behavior can cause the restore to fail in Veeam and also generate some inconsistencies in the database. This behavior has been fixed, so operations that modify the VM cannot be applied when restoring VMs.

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)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

It was tested in a local lab:

  1. I created one VM, added this VM to one backup offering, and made one manual backup;
  2. I tested restoring this backup and tried to destroy the VM during this process;
  3. Previously, I could easily destroy the VM;
  4. Now, the ACS does not allow me to modify the VM.

@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #7238 (6807859) into main (c2e1731) will increase coverage by 0.00%.
The diff coverage is 54.16%.

@@            Coverage Diff            @@
##               main    #7238   +/-   ##
=========================================
  Coverage     12.68%   12.69%           
- Complexity     8656     8664    +8     
=========================================
  Files          2718     2718           
  Lines        256172   256214   +42     
  Branches      39926    39926           
=========================================
+ Hits          32504    32530   +26     
- Misses       219534   219548   +14     
- Partials       4134     4136    +2     
Impacted Files Coverage Δ
...n/java/com/cloud/capacity/CapacityManagerImpl.java 4.96% <0.00%> (+<0.01%) ⬆️
...n/java/com/cloud/storage/VolumeApiServiceImpl.java 14.87% <ø> (ø)
...rg/apache/cloudstack/backup/BackupManagerImpl.java 9.52% <55.31%> (+3.87%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DaanHoogland DaanHoogland requested a review from yadvr February 16, 2023 08:04
@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a 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: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5591

@DaanHoogland
Copy link
Contributor

@blueorangutan test rocky8 vmware-67u3

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (rocky8 mgmt + vmware-67u3) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-6188)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
Total time taken: 45950 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7238-t6188-vmware-67u3.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

code looks mostly good, some comments

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 25 Code Smells

47.6% 47.6% Coverage
0.0% 0.0% Duplication

@DaanHoogland
Copy link
Contributor

SonarCloud Quality Gate failed. Quality Gate failed

Bug A 0 Bugs Vulnerability A 0 Vulnerabilities Security Hotspot A 0 Security Hotspots Code Smell A 25 Code Smells

47.6% 47.6% Coverage 0.0% 0.0% Duplication

please look at those. I know a lot of useless ones but the ones about RuntimeException and the ones about the test case seem valid concerns.

Copy link
Contributor

@stephankruggg stephankruggg left a comment

Choose a reason for hiding this comment

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

CLGTM, not manually tested

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 25 Code Smells

47.6% 47.6% Coverage
0.0% 0.0% Duplication

@DaanHoogland DaanHoogland changed the base branch from main to 4.18 March 29, 2023 15:04
@DaanHoogland DaanHoogland changed the base branch from 4.18 to main March 29, 2023 15:05
@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a 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: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5803

@DaanHoogland
Copy link
Contributor

@blueorangutan test matrix

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-6339)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38573 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7238-t6339-xenserver-71.zip
Smoke tests completed. 106 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_vms_metrics_admin Error 0.21 test_metrics_api.py
test_list_vms_metrics_history Error 0.17 test_metrics_api.py
test_list_volumes_metrics_history Error 0.17 test_metrics_api.py
test_01_deploy_vm_on_specific_host Error 0.08 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 0.06 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 0.09 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 0.10 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 0.08 test_vm_deployment_planner.py

@blueorangutan
Copy link

Trillian test result (tid-6341)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39648 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7238-t6341-kvm-centos7.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link

Trillian test result (tid-6343)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
Total time taken: 41741 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7238-t6343-vmware-67u3.zip
Smoke tests completed. 100 look OK, 8 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_09_arping_in_cpvm Failure 5.23 test_diagnostics.py
test_change_service_offering_for_vm_with_snapshots Error 1.32 test_vm_snapshots.py
ContextSuite context=TestVmSnapshot>:setup Error 10.27 test_vm_snapshots.py
ContextSuite context=TestCreateVolume>:setup Error 0.00 test_volumes.py
ContextSuite context=TestVolumes>:setup Error 9.05 test_volumes.py
test_01_verify_ipv6_vpc Error 4.44 test_vpc_ipv6.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Error 9.93 test_vpc_redundant.py
test_02_redundant_VPC_default_routes Error 10.27 test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Error 10.99 test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics Error 8.90 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 10.06 test_vpc_redundant.py
test_01_VPC_nics_after_destroy Error 8.89 test_vpc_router_nics.py
test_02_VPC_default_routes Error 6.91 test_vpc_router_nics.py
test_01_redundant_vpc_site2site_vpn Failure 9.61 test_vpc_vpn.py
test_01_vpc_site2site_vpn_multiple_options Failure 6.53 test_vpc_vpn.py
test_01_vpc_remote_access_vpn Failure 5.29 test_vpc_vpn.py
test_01_vpc_site2site_vpn Failure 5.49 test_vpc_vpn.py
test_01_cancel_host_maintenace_with_no_migration_jobs Error 0.07 test_host_maintenance.py
test_02_cancel_host_maintenace_with_migration_jobs Error 0.07 test_host_maintenance.py
test_03_cancel_host_maintenace_with_migration_jobs_failure Error 0.06 test_host_maintenance.py

@DaanHoogland
Copy link
Contributor

insanity is
@blueorangutan test matrix

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-6355)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38419 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7238-t6355-xenserver-71.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link

Trillian test result (tid-6357)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 51683 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7238-t6357-kvm-centos7.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

trusting testing by the user, merging

@DaanHoogland DaanHoogland merged commit 1e25340 into apache:main Apr 4, 2023
kishankavala pushed a commit to shapeblue/cloudstack that referenced this pull request Apr 13, 2023
Co-authored-by: SadiJr <sadi@scclouds.com.br>
@weizhouapache weizhouapache added this to the 4.19.0.0 milestone Jan 8, 2024
weizhouapache added a commit to weizhouapache/cloudstack that referenced this pull request Feb 6, 2024
…o another VM

This PR reverts some changes in apache#7238

When restore backup of a VM and attach the volume to another VM, the original VM is not changed/touched, therefore the VM state should not be updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants