GabrielBrascher opened a new pull request, #6267: URL: https://github.com/apache/cloudstack/pull/6267
### Description This PR fixes #6263. The issue is that an Exception is thrown when scaling a customized offering, changing the CPU/Memory but keeping the same disk offering. This PR proposes a fix for this issue by skipping the volume "upgrade" process in such situations, avoiding any operations and also the thrown exception. Considering that the disk offering is the same, there is no need to run all actions of the respective method. The skipped actions are, in summary: 1. run DB updates matching the "new offering"; 2. publish EVENT_VOLUME_RESIZE; 3. if volume migration is required (and allowed), find a suitable pool to migrate volume in case the current pool does not match the new offering needs; 4. return a "Volume" object containing all the changes. <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. --> <!-- For new features, provide link to FS, dev ML discussion etc. --> <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. --> <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged --> <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" --> <!-- Fixes: # --> <!--- ********************************************************************************* --> <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. --> <!--- PLEASE PUT AN 'X' in only **ONE** box --> <!--- ********************************************************************************* --> ### 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) ### Feature/Enhancement Scale or Bug Severity #### Bug Severity - [ ] BLOCKER - [X] Critical - [ ] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> <!-- see how your change affects other areas of the code, etc. --> - Scale (via UI or API) a VM with the custom offering, keeping the same offering but updating the Memory and/or CPU. - After skipping the validation, all worked out fine. <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
