Fix Revert Instance to Snapshot with custom service offering#12885
Fix Revert Instance to Snapshot with custom service offering#12885abh1sar wants to merge 1 commit intoapache:4.20from
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a regression in VM snapshot revert for VMs using dynamic/custom service offerings by avoiding unnecessary service-offering “upgrade” operations during revert.
Changes:
- Tightens/clarifies validation around allowed VM state vs snapshot type for revert (disk-only vs disk+memory).
- Reworks service offering handling during revert by introducing a “needs change” check before attempting to change the VM’s service offering.
- Updates revert transaction flow to only call
changeUserVmServiceOffering(...)when a change is detected.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12885 +/- ##
=========================================
Coverage 16.25% 16.25%
Complexity 13415 13415
=========================================
Files 5664 5664
Lines 500465 500476 +11
Branches 60780 60782 +2
=========================================
+ Hits 81338 81347 +9
- Misses 410031 410033 +2
Partials 9096 9096
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@abh1sar 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. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17238 |
|
@blueorangutan test |
|
@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15737) |
Description
This PR fixes a regression in Revert VM to Snapshot with Dynamic/Custom service offering.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Before fix :
After fix:
Revert was successful.
How did you try to break this feature and the system with this change?