cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

linstor: set/unset allow-two-primaries and protocol on rc level

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

Description

This changes the way how the linstor plugin sets the correct options to allow live-migration. Before we set allow-two-primaries option on all resources and also don't enable protocol C for that brief time. Now we explicitly set allow-two-primaries and protocol C on the specific resource connection used and after the live migration is done those options get removed.

This allows live migration to work if you have set protocol A between 2 datacenters (e.g. DR site).

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)
  • [ ] build/CI
  • [ ] test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [x] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Live migration in a Linstor cluster with protocol C and A configured between nodes.

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

rp- avatar Aug 21 '24 08:08 rp-

Codecov Report

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

Project coverage is 12.27%. Comparing base (7a9bb83) to head (f96aa82). Report is 1 commits behind head on 4.18.

Files with missing lines Patch % Lines
.../hypervisor/kvm/storage/LinstorStorageAdaptor.java 0.00% 25 Missing :warning:
...cloudstack/storage/datastore/util/LinstorUtil.java 0.00% 5 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               4.18    #9560      +/-   ##
============================================
- Coverage     12.27%   12.27%   -0.01%     
+ Complexity     9335     9333       -2     
============================================
  Files          4699     4699              
  Lines        414676   414691      +15     
  Branches      51544    50855     -689     
============================================
- Hits          50891    50887       -4     
- Misses       357460   357480      +20     
+ Partials       6325     6324       -1     
Flag Coverage Δ
unittests 12.27% <0.00%> (-0.01%) :arrow_down:

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 21 '24 09:08 codecov[bot]