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).
Report is 38 commits behind head on main.

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.

@DaanHoogland DaanHoogland modified the milestones: 4.20.0.0, 4.20.1.0 Nov 5, 2024
@winterhazel
Copy link
Collaborator

Did some testing manually and everything looks good.

  1. Reach the limit and try to take another VM snapshot: unable to take the snapshot;
  2. Update the limit to a higher value and try to take another snapshot: snapshot taken successfully;
  3. Update the limit to a value lower than the current number of VM snapshots and try to take a snapshot: unable to take any snapshots unless some snapshots were deleted to reach limit-1.

@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 KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-11780)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 50673 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9883-t11780-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

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