cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Linstor: Fix migrate primary storage

Open rp- opened this issue 1 year ago • 4 comments

Description

This PR fixes migrate primary storage for Linstor primary storage. Always use RAW as copy sourceFormat for Linstor devices, as all images are stored as RAW on Linstor, but we have to pretend to use qcow2 to be able to use qcow2 as snapshot format. Also use .getPath() for resource names, as they are altered after a primary storage migration. Fixes: #9176 and #9522

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
  • [X] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Linstor Cluster with migrating VM volumes between Linstor and NFS primary storage

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

Migrated from Linstor to NFS and back to NFS, than tried various volume actions like snaphots and revert.

rp- avatar Aug 14 '24 11:08 rp-

If it helps, I can make the:

commits into its own PR.

rp- avatar Aug 14 '24 11:08 rp-

Codecov Report

Attention: Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.

Project coverage is 15.08%. Comparing base (eaab991) to head (ebcf66a). Report is 25 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java 0.00% 14 Missing :warning:
...cloudstack/storage/datastore/util/LinstorUtil.java 0.00% 11 Missing :warning:
.../hypervisor/kvm/storage/LinstorStorageAdaptor.java 0.00% 7 Missing :warning:
...tore/driver/LinstorPrimaryDataStoreDriverImpl.java 0.00% 7 Missing :warning:
...ud/hypervisor/kvm/storage/KVMStorageProcessor.java 0.00% 5 Missing :warning:
.../hypervisor/kvm/storage/LibvirtStorageAdaptor.java 0.00% 2 Missing :warning:
...ck/storage/snapshot/LinstorVMSnapshotStrategy.java 0.00% 2 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##               4.19    #9528     +/-   ##
===========================================
  Coverage     15.08%   15.08%             
- Complexity    11180    11185      +5     
===========================================
  Files          5406     5406             
  Lines        472915   472942     +27     
  Branches      61731    58606   -3125     
===========================================
+ Hits          71326    71350     +24     
- Misses       393647   393648      +1     
- Partials       7942     7944      +2     
Flag Coverage Δ
uitests 4.30% <ø> (ø)
unittests 15.80% <0.00%> (+<0.01%) :arrow_up:

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 14 '24 11: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 20 '24 10: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 Aug 20 '24 11:08 github-actions[bot]

@blueorangutan package

rohityadavcloud avatar Sep 03 '24 11:09 rohityadavcloud

@rohityadavcloud 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 avatar Sep 03 '24 11:09 blueorangutan

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

blueorangutan avatar Sep 03 '24 11:09 blueorangutan

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

blueorangutan avatar Sep 05 '24 10:09 blueorangutan

@blueorangutan test

DaanHoogland avatar Sep 05 '24 12:09 DaanHoogland

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

blueorangutan avatar Sep 05 '24 12:09 blueorangutan

@slavkap @rg9975 @harikrishna-patnala can you review?

DaanHoogland avatar Sep 05 '24 18:09 DaanHoogland

[SF] Trillian test result (tid-11375) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 44760 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9528-t11375-kvm-ol8.zip Smoke tests completed. 133 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Sep 06 '24 01:09 blueorangutan

The code LGTM, but I haven't tested it

Are you alright with merging as is @slavkap ?

DaanHoogland avatar Sep 09 '24 06:09 DaanHoogland

@DaanHoogland, yes all looks good

slavkap avatar Sep 09 '24 06:09 slavkap