Skip to content

Fix infrastructure leak on exception while attaching/detaching volumes in VMware #10860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erikbocks
Copy link
Contributor

Description

In VMware environments, when a VM resides on a host in the Disconnected state, and an attach/detach volume operation is initiated, an exception containing infrastructure data is thrown. This PR addresses the issue by handling the AgentUnavailableException separately. The exception will still appear in the application logs, allowing operators to troubleshoot effectively.

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?

I made the following tests, in my local lab:

  1. Created a new VM and attached a volume to it.
  2. Shutdown my VMware host.
  3. Tried to attach a new volume, and the exception containing the infrastructure data was thrown.
  4. Tried to detach the previously attached volume, and the same exception was thrown.
  5. Built and installed CloudStack's packages with my fix.
  6. Repeated the same processes, and validated that the new error message contained no infrastructure data.

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

Copy link

codecov bot commented May 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 3.99%. Comparing base (39c5641) to head (9cb36d8).
Report is 31 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (39c5641) and HEAD (9cb36d8). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (39c5641) HEAD (9cb36d8)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #10860       +/-   ##
=============================================
- Coverage     16.40%    3.99%   -12.41%     
=============================================
  Files          5692      401     -5291     
  Lines        501976    32654   -469322     
  Branches      60795     5791    -55004     
=============================================
- Hits          82369     1306    -81063     
+ Misses       410449    31198   -379251     
+ Partials       9158      150     -9008     
Flag Coverage Δ
uitests 3.99% <ø> (-0.01%) ⬇️
unittests ?

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.

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.

2 participants