cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

[Veeam] disable jobs but keep backups

Open SadiJr opened this issue 3 years ago • 113 comments
trafficstars

Description

Using the VMWare hypervisor, with the Veeam plugin active, it is not possible to remove the VM from its Backup Offering without removing its backups. To resolve this limitation, a new parameter has been added to the removeVirtualMachineFromBackupOffering API to allow users to disable the job but keep Veeam backups. So, when removing a VM from a Backup Offering, it is possible to pass the forced parameter to true, which will remove the job and the backups. Otherwise, the job will just be disabled and the backups will be kept.

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 make some manual backups;
  3. I removed this VM from the backup offering, without using the force option as false, and checked if, in Veeam, the job was still there, in the disabled state, and if the backups were still stored too;
  4. I repeat this process, but using true in force option and check if the backups and job are deleted in Veeam.

SadiJr avatar Jul 29 '22 17:07 SadiJr

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

acs-robot avatar Jul 29 '22 17:07 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 Jul 29 '22 17:07 blueorangutan

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

blueorangutan avatar Jul 29 '22 17:07 blueorangutan

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]

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

acs-robot avatar Aug 03 '22 12: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 12:08 blueorangutan

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

blueorangutan avatar Aug 03 '22 12:08 blueorangutan

@blueorangutan package

DaanHoogland avatar Aug 04 '22 08:08 DaanHoogland

@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 avatar Aug 04 '22 08:08 blueorangutan

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

blueorangutan avatar Aug 04 '22 09:08 blueorangutan

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

blueorangutan avatar Aug 04 '22 13:08 blueorangutan

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

blueorangutan avatar Aug 05 '22 10:08 blueorangutan

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

blueorangutan avatar Aug 05 '22 11:08 blueorangutan

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

blueorangutan avatar Aug 08 '22 09:08 blueorangutan

@blueorangutan test matrix

DaanHoogland avatar Aug 08 '22 09:08 DaanHoogland

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

blueorangutan avatar Aug 08 '22 09:08 blueorangutan

Trillian test result (tid-4642) Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7 Total time taken: 36946 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6589-t4642-xenserver-71.zip Smoke tests completed. 101 look OK, 0 have errors Only failed tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Aug 08 '22 20:08 blueorangutan

Trillian test result (tid-4643) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 40253 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6589-t4643-kvm-centos7.zip Smoke tests completed. 100 look OK, 1 have errors Only failed tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 631.70 test_kubernetes_clusters.py

blueorangutan avatar Aug 08 '22 21:08 blueorangutan

Trillian test result (tid-4644) Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7 Total time taken: 44490 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6589-t4644-vmware-65u2.zip Smoke tests completed. 100 look OK, 1 have errors Only failed tests results shown below:

Test Result Time (s) Test File
test_01_unmanage_vm_cycle Error 46.26 test_vm_lifecycle_unmanage_import.py

blueorangutan avatar Aug 08 '22 22:08 blueorangutan

@blueorangutan test centos7 vmware-65u2

DaanHoogland avatar Aug 09 '22 13:08 DaanHoogland

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

blueorangutan avatar Aug 09 '22 13:08 blueorangutan

Trillian Build Failed (tid-4664)

blueorangutan avatar Aug 09 '22 13:08 blueorangutan

Trillian Build Failed (tid-4665)

blueorangutan avatar Aug 09 '22 14:08 blueorangutan

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 10 '22 11:08 github-actions[bot]

Trillian test result (tid-4669) Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7 Total time taken: 42303 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6589-t4669-vmware-65u2.zip Smoke tests completed. 99 look OK, 2 have errors Only failed tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 607.06 test_kubernetes_clusters.py
test_01_unmanage_vm_cycle Error 46.38 test_vm_lifecycle_unmanage_import.py

blueorangutan avatar Aug 10 '22 19:08 blueorangutan

Codecov Report

Attention: Patch coverage is 40.55944% with 85 lines in your changes are missing coverage. Please review.

Project coverage is 23.23%. Comparing base (e44c17e) to head (8de0ba0).

Files Patch % Lines
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 17.24% 22 Missing and 2 partials :warning:
.../storage/datastore/db/PrimaryDataStoreDaoImpl.java 51.51% 16 Missing :warning:
...main/java/org/apache/cloudstack/backup/Backup.java 13.33% 13 Missing :warning:
...rg/apache/cloudstack/backup/BackupManagerImpl.java 30.00% 5 Missing and 2 partials :warning:
...stack/api/command/user/volume/DetachVolumeCmd.java 0.00% 6 Missing :warning:
...in/java/org/apache/cloudstack/backup/BackupVO.java 33.33% 3 Missing and 1 partial :warning:
utils/src/main/java/com/cloud/utils/UuidUtils.java 0.00% 4 Missing :warning:
...main/java/com/cloud/storage/dao/VolumeDaoImpl.java 25.00% 3 Missing :warning:
...chema/src/main/java/com/cloud/vm/VMInstanceVO.java 0.00% 3 Missing :warning:
...rg/apache/cloudstack/backup/dao/BackupDaoImpl.java 90.00% 3 Missing :warning:
... and 2 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6589      +/-   ##
============================================
- Coverage     30.93%   23.23%   -7.70%     
+ Complexity    33753    23599   -10154     
============================================
  Files          5404     5234     -170     
  Lines        380309   355809   -24500     
  Branches      55507    51239    -4268     
============================================
- Hits         117658    82686   -34972     
- Misses       247041   261163   +14122     
+ Partials      15610    11960    -3650     
Flag Coverage Δ
simulator-marvin-tests 24.91% <40.55%> (+0.36%) :arrow_up:
uitests 4.34% <ø> (ø)
unit-tests ?

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 12 '22 13:08 codecov[bot]

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 31 '22 09:08 github-actions[bot]

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

github-actions[bot] avatar Sep 27 '22 07:09 github-actions[bot]

@SadiJr can you look at the comments and the conflicts?

DaanHoogland avatar Sep 27 '22 12:09 DaanHoogland

@SadiJr will you address the comments as well?

DaanHoogland avatar Dec 06 '22 10:12 DaanHoogland