Skip to content

Conversation

@daviftorres
Copy link
Contributor

Description

This trivial change provide more details for root administrators during troubleshooting.

See discussion #11980

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):

image

How Has This Been Tested?

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 17.55%. Comparing base (8c86f24) to head (d951da6).

Files with missing lines Patch % Lines
...n/java/com/cloud/vm/VirtualMachineManagerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11981   +/-   ##
=========================================
  Coverage     17.55%   17.55%           
- Complexity    15543    15545    +2     
=========================================
  Files          5910     5910           
  Lines        529334   529334           
  Branches      64654    64654           
=========================================
+ Hits          92944    92945    +1     
+ Misses       425933   425932    -1     
  Partials      10457    10457           
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests 18.62% <0.00%> (+<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.

@DaanHoogland DaanHoogland self-requested a review November 6, 2025 16:12
@DaanHoogland
Copy link
Contributor

not sure if this makes sense, but type breaks as it expects a throwable.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

This trivial change provide more details for root administrators during troubleshooting.

See discussion apache#11980
Copy link
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.

Thanks @daviftorres - just a comment from my review

} catch (final ResourceUnavailableException e) {
if (e.getScope() != null && e.getScope().equals(VirtualRouter.class)){
throw new CloudRuntimeException("Network is unavailable. Please contact administrator", e).add(VirtualMachine.class, vmUuid);
throw new CloudRuntimeException("The Guest Network is unavailable. Please contact administrator: " + e.getMessage()).add(VirtualMachine.class, vmUuid);
Copy link
Contributor

@nvazquez nvazquez Nov 7, 2025

Choose a reason for hiding this comment

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

Hi @daviftorres, can you add a check for the caliing user role and display the exception message only if its a ROOT administrator? For other roles I think the exception message should not be displayed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @nvazquez , I agree with your a point of view. But I do not know how to do such a thing. My sincere apologies but I can barely read a few lines of Java :-/

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants