Skip to content

update comments and exception related to kvm.snapshot.enabled setting - #13733

Open
sudo87 wants to merge 1 commit into
apache:mainfrom
shapeblue:fixKvmSnapshotComment
Open

update comments and exception related to kvm.snapshot.enabled setting#13733
sudo87 wants to merge 1 commit into
apache:mainfrom
shapeblue:fixKvmSnapshotComment

Conversation

@sudo87

@sudo87 sudo87 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes comment and exception related to kvm.snapshot.enabled setting.

Doc PR: apache/cloudstack-documentation#673

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?

Copilot AI review requested due to automatic review settings July 28, 2026 09:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the in-code documentation and runtime exception text related to the kvm.snapshot.enabled global setting, clarifying how it affects snapshot support for running VMs on KVM.

Changes:

  • Renames a private helper to fix a spelling error (hostSupportsSnapsthotForVolumehostSupportsSnapshotForVolume).
  • Updates comments describing kvm.snapshot.enabled behavior for KVM volume snapshots.
  • Rewords the exception thrown when snapshots are blocked for running VMs due to kvm.snapshot.enabled=false.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java Fixes helper method spelling and updates KVM snapshot-related comment and exception message text.
server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java Minor wording fix in the kvm.snapshot.enabled ConfigKey description.
Comments suppressed due to low confidence (1)

server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java:1593

  • This exception message is internally inconsistent: it says kvm.snapshot.enabled is already set to false, then immediately says "It can be disabled". Consider rephrasing to explain that it is sometimes set to false to avoid corruption, and how to re-enable it.
                            "KVM Snapshot is not supported for Running VMs because the global setting " +
                                    "kvm.snapshot.enabled is set to false for this deployment. It can be disabled to " +
                                    "avoid a possible volume corruption in certain cases. To allow snapshots of running " +
                                    "VMs, set kvm.snapshot.enabled to true. See the documentation for more details.");

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

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.64%. Comparing base (4f11707) to head (0345815).

Files with missing lines Patch % Lines
...om/cloud/storage/snapshot/SnapshotManagerImpl.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13733      +/-   ##
============================================
- Coverage     19.65%   19.64%   -0.01%     
+ Complexity    19792    19789       -3     
============================================
  Files          6368     6368              
  Lines        574881   574881              
  Branches      70351    70351              
============================================
- Hits         112970   112963       -7     
- Misses       449639   449647       +8     
+ Partials      12272    12271       -1     
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests 20.92% <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 Harness.
📢 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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

trivial

@GaOrtiga GaOrtiga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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