Propagate StopAnswer error details up the call chain when stopping a VM#13558
Open
Damans227 wants to merge 1 commit into
Open
Propagate StopAnswer error details up the call chain when stopping a VM#13558Damans227 wants to merge 1 commit into
Damans227 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13558 +/- ##
============================================
+ Coverage 17.67% 19.41% +1.74%
- Complexity 15797 19153 +3356
============================================
Files 5923 6284 +361
Lines 533349 564865 +31516
Branches 65248 68920 +3672
============================================
+ Hits 94253 109687 +15434
- Misses 428437 443274 +14837
- Partials 10659 11904 +1245
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
weizhouapache
approved these changes
Jul 7, 2026
When a hypervisor's StopAnswer for a StopCommand fails, the underlying failure reason is logged locally but never surfaced to the caller. Operators and API callers only ever see a generic "Unable to stop VM" message, with no indication of what actually went wrong on the hypervisor side. This changes sendStop() and cleanup() in VirtualMachineManagerImpl to return a Pair<Boolean, String> (success flag + failure detail) instead of a plain boolean, and threads that detail through to the exceptions raised by callers (advanceStop, migrate, orchestrateMigrateWithStorage, orchestrateMigrateForScale), so the StopAnswer failure reason is now visible in the resulting error message.
1dfd4ad to
5fe808e
Compare
Contributor
|
@blueorangutan package |
|
@nvazquez 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 18491 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When a hypervisor's StopAnswer for a StopCommand fails, the underlying failure reason is logged locally but never surfaced to the caller. Operators and API callers only ever see a generic "Unable to stop VM" message, with no indication of what actually went wrong on the hypervisor side.
This PR changes
sendStop()andcleanup()inVirtualMachineManagerImplto return aPair<Boolean, String>(success flag + failure detail) instead of a plainboolean, and threads that detail through to the exceptions raised by callers (advanceStop,migrate,orchestrateMigrateWithStorage,orchestrateMigrateForScale), so the StopAnswer failure reason is now visible in the resulting error message.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
This is a logging/error-message improvement; there's no change to the stop/cleanup control flow itself. Existing unit tests in
VirtualMachineManagerImplTestwere updated to match the newsendStop()return type, including an assertion on the propagated failure detail. Ran the fullVirtualMachineManagerImplTestsuite (100 tests) locally, all passing.How did you try to break this feature and the system with this change?
Verified every caller of
sendStop()/cleanup()withinVirtualMachineManagerImplwas updated consistently to handle the new return type, including a case where theMigratingstate combines the hostId/lastHostId checks into a singlesendStop()call, to avoid an unrelated double-invocation.