Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linstor: Fix using multiple primary storage with same linstor-controller #10280

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

rp-
Copy link
Contributor

@rp- rp- commented Jan 27, 2025

Description

It should have been always possible to use multiple primary storages, with the same linstor-controller, by just using different resource-groups with different settings.
But if the same template was used on 2 different primary storages, there would be a name collision on the linstor-controller, as 2 of them would get allocated to the same name.
This commit fixes this, by intelligently reusing the same template, as long as possible (if select filter properties match enough).

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

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  • Integration tests run
  • Linstor cluster used by 3 different primary storage(same CS cluster) + let cleanup storage run

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

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

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

Project coverage is 15.15%. Comparing base (90c960e) to head (fa245cc).
Report is 1 commits behind head on 4.19.

Files with missing lines Patch % Lines
...tore/driver/LinstorPrimaryDataStoreDriverImpl.java 0.00% 121 Missing ⚠️
.../hypervisor/kvm/storage/LinstorStorageAdaptor.java 0.00% 66 Missing ⚠️
...cloudstack/storage/datastore/util/LinstorUtil.java 0.00% 45 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #10280      +/-   ##
============================================
- Coverage     15.16%   15.15%   -0.01%     
+ Complexity    11314    11313       -1     
============================================
  Files          5409     5409              
  Lines        474473   474663     +190     
  Branches      57876    57903      +27     
============================================
- Hits          71947    71943       -4     
- Misses       394482   394677     +195     
+ Partials       8044     8043       -1     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.87% <0.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rp- rp- force-pushed the linstor-4.19-fix-template-reuse branch from 1ff6d37 to a4a3099 Compare January 27, 2025 12:52
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 generally good, but is 3rd party all the way. some readability improvements possible (no -1)

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-12195)

@rp- rp- force-pushed the linstor-4.19-fix-template-reuse branch from a4a3099 to 1ce5bd8 Compare January 27, 2025 16:02
@blueorangutan
Copy link

[LL]Trillian test result (tid-7069)
Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
Total time taken: 40756 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10280-t7069-kvm-rocky8.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

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-12206)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 46137 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10280-t12206-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

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

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

LGTM, I've not tested this though.

@rp- I hope you must have covered the template deletion part. If not, please verify once.

@rp-
Copy link
Contributor Author

rp- commented Jan 29, 2025

LGTM, I've not tested this though.

@rp- I hope you must have covered the template deletion part. If not, please verify once.

I did, I tested with 3 primary storages using the same linstor cluster.

Copy link

github-actions bot commented Feb 5, 2025

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

@DaanHoogland
Copy link
Contributor

@rp- can you have another look? (conflicts)

@rp-
Copy link
Contributor Author

rp- commented Feb 5, 2025

@rp- can you have another look? (conflicts)

already on it

It should have been always possible to use multiple primary storages,
with the same linstor-controller, by just using different resource-groups
with different settings.
But if the same template was used on 2 different primary storages,
there would be a name collision on the linstor-controller, as 2 of them
would get allocated to the same name.
This commit fixes this, by intelligently reusing the same template,
as long as possible (if select filter properties match enough).
@rp- rp- force-pushed the linstor-4.19-fix-template-reuse branch from 1ce5bd8 to fa245cc Compare February 5, 2025 11:55
@rp-
Copy link
Contributor Author

rp- commented Feb 5, 2025

@DaanHoogland sorry took a while had to retest, encryption and this change here.

@DaanHoogland
Copy link
Contributor

@DaanHoogland sorry took a while had to retest, encryption and this change here.

ok, I'll do one more round

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_12_start_vm_multiple_volumes_allocated Error 15.25 test_vm_life_cycle.py

@DaanHoogland DaanHoogland added this to the 4.19.2 milestone Feb 6, 2025
@DaanHoogland DaanHoogland merged commit df99a29 into apache:4.19 Feb 6, 2025
24 of 26 checks passed
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.

4 participants