Skip to content
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

Change vmsnapshot.max configuration to be dynamic #9883

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

Conversation

lucas-a-martins
Copy link
Contributor

Description

Currently, the configuration vmsnapshot.max isn't dynamic, and it is necessary to restart the Management Server after changing the configuration's value.

This PR intends to change the vmsnapshot.max config to the new ConfigKey standard for dynamic configurations.

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

new-vm-snapshot-max

How Has This Been Tested?

To validate the changes, I performed the following steps without restarting the Management Server:

  1. Changed the vmsnapshot.max value to 2;
  2. Tried to take 3 VM snapshots, but as expected, an exception was thrown on the 3rd snapshot;
  3. Changed the vmsnapshot.max value to 3;
  4. Tried to take the 3rd snapshot again, and it was created successfully;
  5. Tried to take a 4th snapshot and got the same exception.

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 Nov 3, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 15.78%. Comparing base (019f2c6) to head (00492c0).

Files with missing lines Patch % Lines
...a/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##               main    #9883     +/-   ##
===========================================
  Coverage     15.78%   15.78%             
- Complexity    12564    12566      +2     
===========================================
  Files          5627     5627             
  Lines        492250   492250             
  Branches      61405    62693   +1288     
===========================================
+ Hits          77710    77718      +8     
+ Misses       406066   406058      -8     
  Partials       8474     8474             
Flag Coverage Δ
uitests 4.04% <ø> (ø)
unittests 16.60% <80.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants