Linstor 4.19 fix selecting non enabled hosts
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)
- [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
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, 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?
@blueorangutan package
@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 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 :warning: |
| ...tore/driver/LinstorPrimaryDataStoreDriverImpl.java | 0.00% | 11 Missing :warning: |
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%) |
:arrow_down: |
| uitests | ? |
|
| unit-tests | 16.55% <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.
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8653
@blueorangutan package
@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.
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8677
@blueorangutan test
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
[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 |
|---|