Skip to content

VM start error handling improvements and config to expose error to users#12894

Open
sureshanaparti wants to merge 2 commits intoapache:4.22from
shapeblue:vm-start-error-handling-improvements
Open

VM start error handling improvements and config to expose error to users#12894
sureshanaparti wants to merge 2 commits intoapache:4.22from
shapeblue:vm-start-error-handling-improvements

Conversation

@sureshanaparti
Copy link
Contributor

Description

This PR improves the VM start error handling and reports the error to admins. It introduces new config 'expose.errors.to.user' (default: false), the errors are reported to the users when the config is set to true.

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)
  • 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?

How did you try to break this feature and the system with this change?

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@sureshanaparti sureshanaparti requested a review from nvazquez March 26, 2026 08:17
@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 10.81081% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.60%. Comparing base (d6c3977) to head (d7f1bd3).

Files with missing lines Patch % Lines
...n/java/com/cloud/vm/VirtualMachineManagerImpl.java 8.33% 33 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #12894      +/-   ##
============================================
- Coverage     17.60%   17.60%   -0.01%     
+ Complexity    15666    15661       -5     
============================================
  Files          5917     5917              
  Lines        531527   531556      +29     
  Branches      64982    64986       +4     
============================================
- Hits          93584    93554      -30     
- Misses       427389   427447      +58     
- Partials      10554    10555       +1     
Flag Coverage Δ
uitests 3.70% <ø> (ø)
unittests 18.67% <10.81%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

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

Copy link
Member

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Before fix

When a user tries to start a vm , only the following exception is

Image

After fix

Enable the global setting "expose.errors.to.user"

Image

start a vm

Image

@kiranchavala
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants