Skip to content

Change vmsnapshot.max configuration to be dynamic#9883

Merged
JoaoJandre merged 1 commit intoapache:4.20from
scclouds:dynamic-vmsnapshotmax
Nov 28, 2024
Merged

Change vmsnapshot.max configuration to be dynamic#9883
JoaoJandre merged 1 commit intoapache:4.20from
scclouds:dynamic-vmsnapshotmax

Conversation

@lucas-a-martins
Copy link
Copy Markdown
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
Copy Markdown
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

@codecov
Copy link
Copy Markdown

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 45 commits behind head on 4.20.

Files with missing lines Patch % Lines
...a/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##               4.20    #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
Copy Markdown
Member

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
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@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
Copy Markdown

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

[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

@JoaoJandre JoaoJandre changed the base branch from main to 4.20 November 28, 2024 17:48
@JoaoJandre JoaoJandre merged commit 5886780 into apache:4.20 Nov 28, 2024
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 12, 2024
Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
@Pearl1594 Pearl1594 moved this to Done in ACS 4.20.1 Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants