Skip to content

Conversation

@Tonitzpp
Copy link
Contributor

@Tonitzpp Tonitzpp commented Jan 5, 2026

Description

Currently, when performing volume migration operations, an exception message exposing infrastructure information may be shown. Changes have been made to this message in order to hide infrastructure information from end users.

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

Screenshots (if appropriate):

Exception displayed for users before the changes image
Exception displayed for users after the changes image
Log messages image

How Has This Been Tested?

To perform the tests, I created a VM with a 5 GiB Disk Offering. After stopping the VM, I performed the changeDiskOfferingForVolumeInternal operation for a 100 GiB Disk Offering, which resulted in the error with the correct message. Other tests were also performed using the IntelliJ IDE debug functionality to force the expected exceptions when performing the changeDiskOfferingForVolumeInternal operation.

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.76%. Comparing base (4628385) to head (95da079).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...n/java/com/cloud/storage/VolumeApiServiceImpl.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12367      +/-   ##
============================================
- Coverage     17.76%   17.76%   -0.01%     
  Complexity    15861    15861              
============================================
  Files          5923     5923              
  Lines        530470   530538      +68     
  Branches      64823    64826       +3     
============================================
- Hits          94253    94252       -1     
- Misses       425673   425742      +69     
  Partials      10544    10544              
Flag Coverage Δ
uitests 3.57% <ø> (ø)
unittests 18.85% <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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances security by sanitizing error messages in volume migration operations to prevent infrastructure information disclosure to end users. The changes replace detailed exception messages containing storage pool and volume object details with generic, user-friendly messages while preserving detailed information in server logs for debugging.

Key Changes:

  • Replaced infrastructure-exposing exception messages with generic user-facing error messages
  • Added detailed error logging for administrators to diagnose issues
  • Improved error message consistency for volume resize failures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@blueorangutan
Copy link

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

@DaanHoogland DaanHoogland added this to the 4.23.0 milestone Jan 7, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

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

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.

4 participants