Skip to content

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

Merged
nvazquez merged 2 commits intoapache:4.22from
shapeblue:vm-start-error-handling-improvements
Mar 27, 2026
Merged

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

Conversation

@sureshanaparti
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@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
Copy Markdown

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).
⚠️ Report is 5 commits behind head on 4.22.

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
Copy Markdown

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

Copy link
Copy Markdown
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
Copy Markdown
Member

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-15745)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 51769 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12894-t15745-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

Copy link
Copy Markdown
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

@nvazquez nvazquez merged commit 68030df into apache:4.22 Mar 27, 2026
24 of 26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.22.1 Mar 27, 2026
@nvazquez nvazquez deleted the vm-start-error-handling-improvements branch March 27, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants