You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "Damans227 (via GitHub)" <gi...@apache.org> on 2026/07/07 14:29:00 UTC

[PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Damans227 opened a new pull request, #13558:
URL: https://github.com/apache/cloudstack/pull/13558

   ### 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()` 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.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] 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
   - [x] Minor
   
   ### 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 `VirtualMachineManagerImplTest` were updated to match the new `sendStop()` return type, including an assertion on the propagated failure detail. Ran the full `VirtualMachineManagerImplTest` suite (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()` within `VirtualMachineManagerImpl` was updated consistently to handle the new return type, including a case where the `Migrating` state combines the hostId/lastHostId checks into a single `sendStop()` call, to avoid an unrelated double-invocation.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-4905000821

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13558?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 3.46%. Comparing base ([`f9a9451`](https://app.codecov.io/gh/apache/cloudstack/commit/f9a94518606910aa080201390ea0b3d6c22db080?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1dfd4ad`](https://app.codecov.io/gh/apache/cloudstack/commit/1dfd4ad69b36ae0b24425693f90e32c9550a1718?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@          Coverage Diff           @@
   ##            main   #13558   +/-   ##
   ======================================
     Coverage   3.46%    3.46%           
   ======================================
     Files        479      479           
     Lines      41162    41162           
     Branches    7793     7793           
   ======================================
     Hits        1426     1426           
     Misses     39543    39543           
     Partials     193      193           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13558/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/13558/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.46% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cloudstack/pull/13558?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-4909646864

   Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18491


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-4949739348

   @nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-5183617365

   @blueorangutan package


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-4909210918

   @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.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-4949735564

   @blueorangutan test


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-5189083746

   @DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-4909197922

   @blueorangutan package


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-5189066693

   @blueorangutan test


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-5198806400

   <b>[SF] Trillian test result (tid-16711)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 54648 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13558-t16711-kvm-ol8.zip
   Smoke tests completed. 149 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-5184196591

   Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18768


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-5183628998

   @Damans227 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.


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Propagate StopAnswer error details up the call chain when stopping a VM [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13558:
URL: https://github.com/apache/cloudstack/pull/13558#issuecomment-4952388566

   <b>[SF] Trillian test result (tid-16539)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 54089 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13558-t16539-kvm-ol8.zip
   Smoke tests completed. 149 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org