Skip removal of offerings if in use during domain removal
Description
This PR fixes https://github.com/apache/cloudstack/issues/11502
- Prevent service offering update to specific domains if any instance for the offering are outside of those
- Removal of offerings is skipped if it is in use by any Instance.
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
- [ ] Major
- [ ] Minor
- [ ] Trivial
Screenshots (if appropriate):
How Has This Been Tested?
- Create a compute offering L1 at Root Domain
- Create a domain d1
- Create an instance vm1 with L1 at root domain level
- Try updating service offering domain to d1, shouldn't be allowed
- Destroy instance vm1
- Update of domain d1 for service offering works
How did you try to break this feature and the system with this change?
Codecov Report
:x: Patch coverage is 8.51064% with 43 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 16.18%. Comparing base (d53b6db) to head (a487eba).
:warning: Report is 18 commits behind head on 4.20.
Additional details and impacted files
@@ Coverage Diff @@
## 4.20 #11780 +/- ##
============================================
- Coverage 16.19% 16.18% -0.01%
Complexity 13306 13306
============================================
Files 5657 5657
Lines 498467 498510 +43
Branches 60491 60492 +1
============================================
+ Hits 80702 80707 +5
- Misses 408783 408823 +40
+ Partials 8982 8980 -2
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 4.00% <ø> (ø) |
|
| unittests | 17.04% <8.51%> (-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.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@blueorangutan package
@sudo87 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15304
@blueorangutan package
@sudo87 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15628
@blueorangutan package
@rosi-shapeblue 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]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 15989
@blueorangutan package
@sudo87 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15996
@blueorangutan test
@sudo87 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian Build Failed (tid-14968)
Thank you, @RosiKyu, for taking the time to review and for validating the functionality.
On Black UI rendering issue, I will take a look at the code changes. Although that seems to be related to UI packaging issue.
@blueorangutan package
@RosiKyu 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16048
@sudo87 , @DaanHoogland - the rendering issue does not appear to be caused by the PR code. Rebuilding the packages with the PR code resolved it, so I believe this can be safely merged.
@shwstppr can you have another look?