cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

[Veeam] Improve remove backup process

Open SadiJr opened this issue 2 years ago • 19 comments

Description

Using the VMWare hypervisor, with the Veeam plugin active, it is not possible to remove backups. Instead, an exception is thrown in ACS, and the only procedure that allows the removal of backups is to remove the VM from the Backup Offering, which causes all backups for that VM to be removed.

Through Veeam's documentation and user forum, it was discovered that it does not allow the removal of specific restore points. Instead, the entire backup chain is removed, leaving only the job in Veeam.

To address this limitation, a new parameter has been added to the deleteBackup API to allow users to remove the complete Veeam backup chain. So, when removing a backup, users can pass the forced parameter as true, to remove all the backup chain, but keeping the VM in the Backup Offering. Otherwise, an exception will be thrown notifying the user of this Veeam limitation and the forced option.

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)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [x] Minor

How Has This Been Tested?

It was tested in a local lab:

  1. I created a new VM and attached this VM to a Backup Offering;
  2. I performed two manual backups;
  3. I attempted (using CLI) to delete one of these backups;
  4. Before, an exception was thrown, forcing the user to remove the VM from Backup Offering;
  5. Now, users can use forced option to remove the entire backup chain but keep VM in Backup Offering, plus the error message has been improved. Also, I added new unit tests.

SadiJr avatar Jul 28 '22 19:07 SadiJr

clgtm, but can you look at the code smells reported by sonarcloud please @SadiJr ?

SonarCloud Quality Gate failed. Quality Gate failed

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

51.3% 51.3% Coverage 0.0% 0.0% Duplication

DaanHoogland avatar Aug 02 '22 06:08 DaanHoogland

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

github-actions[bot] avatar Aug 02 '22 12:08 github-actions[bot]

@DaanHoogland thanks for your suggestion. I will take a look about this code smells :).

SadiJr avatar Aug 02 '22 20:08 SadiJr

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Aug 03 '22 14:08 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 03 '22 14:08 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6580 (SL-JID-2072)

blueorangutan avatar Aug 03 '22 14:08 blueorangutan

@DaanHoogland, can we run the tests for this one? cc: @harikrishna-patnala

@blueorangutan package

GutoVeronezi avatar Sep 08 '22 17:09 GutoVeronezi

@GutoVeronezi 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 avatar Sep 08 '22 17:09 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4150

blueorangutan avatar Sep 09 '22 09:09 blueorangutan

@blueorangutan test centos7 vmware-67

DaanHoogland avatar Sep 12 '22 09:09 DaanHoogland

@DaanHoogland unsupported parameters provided. Supported mgmt server os are: centos7, centos6, suse15, alma8, ubuntu18, ubuntu22, ubuntu20, rocky8. Supported hypervisors are: kvm-centos6, kvm-centos7, kvm-rocky8, kvm-alma8, kvm-ubuntu18, kvm-ubuntu20, kvm-ubuntu22, kvm-suse15, vmware-55u3, vmware-60u2, vmware-65u2, vmware-67u3, vmware-70u1, vmware-70u2, vmware-70u3, xenserver-65sp1, xenserver-71, xenserver-74, xcpng74, xcpng76, xcpng80, xcpng81, xcpng82

blueorangutan avatar Sep 12 '22 09:09 blueorangutan

@blueorangutan test centos7 vmware-67u3

DaanHoogland avatar Sep 12 '22 10:09 DaanHoogland

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

blueorangutan avatar Sep 12 '22 10:09 blueorangutan

Trillian test result (tid-4872) Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7 Total time taken: 38609 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6580-t4872-vmware-67u3.zip Smoke tests completed. 98 look OK, 3 have errors Only failed tests results shown below:

Test Result Time (s) Test File
test_DeployVmAntiAffinityGroup Error 42.66 test_affinity_groups.py
test_DeployVmAntiAffinityGroup_in_project Error 97.21 test_affinity_groups_projects.py
test_03_deploy_and_scale_kubernetes_cluster Failure 35.95 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py

blueorangutan avatar Sep 12 '22 21:09 blueorangutan

let's try insanity; @blueorangutan test centos7 vmware-67u3

DaanHoogland avatar Sep 13 '22 07:09 DaanHoogland

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

blueorangutan avatar Sep 13 '22 07:09 blueorangutan

Trillian test result (tid-4878) Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7 Total time taken: 43139 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6580-t4878-vmware-67u3.zip Smoke tests completed. 101 look OK, 0 have errors Only failed tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Sep 13 '22 19:09 blueorangutan

Did any Veeam user or otherwise user of the backup framework test this (other than the author)? Otherwise it is ready for merge.

DaanHoogland avatar Sep 14 '22 07:09 DaanHoogland