Skip to content

Linstor 4.19 fix selecting non enabled hosts#8653

Merged
yadvr merged 2 commits intoapache:4.19from
LINBIT:linstor-4.19-fix-selecting-maintanence-hosts
Mar 8, 2024
Merged

Linstor 4.19 fix selecting non enabled hosts#8653
yadvr merged 2 commits intoapache:4.19from
LINBIT:linstor-4.19-fix-selecting-maintanence-hosts

Conversation

@rp-
Copy link
Copy Markdown
Contributor

@rp- rp- commented Feb 14, 2024

Description

This PR fixes template copy and other operations while there are nodes in the cluster under maintenance or disabled.

It was simply forgotten to check the host state is not in any none enabled state.
Additionally delete the created resource definition from Linstor if something went wrong copying.

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

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?

Linstor cluster, copying a new template into primary storage and also do volume snapshots (with maintenance hosts)

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 14, 2024

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (bda49ab) 30.90% compared to head (70a1e20) 33.05%.
Report is 2 commits behind head on 4.19.

Files Patch % Lines
...cloudstack/storage/datastore/util/LinstorUtil.java 0.00% 12 Missing ⚠️
...tore/driver/LinstorPrimaryDataStoreDriverImpl.java 0.00% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #8653      +/-   ##
============================================
+ Coverage     30.90%   33.05%   +2.15%     
+ Complexity    34189    34148      -41     
============================================
  Files          5347     4986     -361     
  Lines        375566   346940   -28626     
  Branches      54625    49633    -4992     
============================================
- Hits         116068   114695    -1373     
+ Misses       244236   217099   -27137     
+ Partials      15262    15146     -116     
Flag Coverage Δ
simulator-marvin-tests 24.74% <0.00%> (-0.02%) ⬇️
uitests ?
unit-tests 16.55% <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.

@blueorangutan
Copy link
Copy Markdown

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

@sureshanaparti sureshanaparti added this to the 4.19.1.0 milestone Feb 15, 2024
@rp- rp- force-pushed the linstor-4.19-fix-selecting-maintanence-hosts branch from 51e1f04 to 70a1e20 Compare February 15, 2024 13:55
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Feb 16, 2024

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

getDiskfulStoragePool(@Nonnull DevelopersApi api, @Nonnull String rscName) throws ApiException
{
List<com.linbit.linstor.api.model.StoragePool> sps = getDiskfulStoragePools(api, rscName);
if (sps != null) {
Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti Feb 16, 2024

Choose a reason for hiding this comment

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

Suggested change
if (sps != null) {
if (sps != null && !sps.isEmpty()) {

or use CollectionUtils.isNotEmpty(sps)

and
return sps.get(0)

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

@yadvr yadvr merged commit 001c769 into apache:4.19 Mar 8, 2024
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Mar 21, 2024
* linstor: cleanup resource if copy from template failed

* linstor: do not use non enabled hosts for copy operations
@rp- rp- deleted the linstor-4.19-fix-selecting-maintanence-hosts branch July 4, 2024 13:04
rp- added a commit to LINBIT/cloudstack that referenced this pull request Feb 24, 2026
* linstor: cleanup resource if copy from template failed

* linstor: do not use non enabled hosts for copy operations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants