Repository navigation
KVM: register SystemVM templates as dynamically scalable - #14705
Open
andrijapanicsb wants to merge 2 commits into
Open
andrijapanicsb wants to merge 2 commits into
andrijapanicsb wants to merge 2 commits into
Conversation
CKS nodes use the KVM SystemVM template by default and inherit its dynamic-scaling flag, which was never set, so a running CKS cluster could not be scaled to a new offering. Set the flag when a KVM SystemVM template is registered, and on upgrade for the existing ones. Fixes apache#14704
Contributor
Author
|
@ACSHomeBot package G |
|
Accepted: Planned: RPM + DEB, KVM SystemVM. Status: Completed. Packaging results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14705 +/- ##
=========================================
Coverage 20.77% 20.77%
- Complexity 20855 20857 +2
=========================================
Files 6053 6053
Lines 548230 548234 +4
Branches 73237 73239 +2
=========================================
+ Hits 113903 113909 +6
+ Misses 420988 420986 -2
Partials 13339 13339
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Packaging results:
Test packages are available at: |
…namically scalable An operator can register the new SystemVM template by hand before upgrading. The upgrade SQL runs while it is still a user template, so it does not set the flag. Set it when such a KVM template is turned into a SystemVM template. Templates that already are SystemVM templates keep their flag, so a later upgrade does not undo an operator's choice.
Contributor
Author
|
@ACSHomeBot package G |
|
Accepted: Planned: RPM + DEB, KVM SystemVM. Status: Completed. Packaging results. |
Packaging results:
Test packages are available at: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In short
KVM SystemVM templates are now registered as dynamically scalable: on fresh installs, for new template versions, and on upgrade for the ones already there. CKS nodes use this template by default, so a running CKS cluster can then be scaled to a new offering live, as #13226 intended.
Fixes #14704.
Why
On a default install, scaling a running CKS cluster to a new offering fails with
does not have tools to support dynamic scaling. CKS nodes inherit the template's dynamic-scaling flag, and the KVM SystemVM template never had it set. The flag dates from when it meant "XenServer/VMware tools are installed"; KVM needs no guest tools for CPU and memory hot-plug.Changes
SystemVmTemplateRegistration.createTemplateObjectInDBsetsdynamicallyScalablefor KVM templates (the method is nowprotectedso it can be unit tested).schema-42300to2400.sqlsets the flag on all existing KVM SystemVM templates. Installs upgraded across several releases keep several of them, and the SQL runs before the new template row is created, so both changes are needed.SystemVmTemplateRegistration.updateRegisteredTemplateDetailssets the flag on a KVM template that an operator registered by hand before the upgrade. The upgrade SQL misses it, because it is still a user template at that point. Templates that are already SystemVM templates keep their flag, so a later upgrade does not undo an operator's choice.What changes for operators
enable.dynamic.scale.vmoff (the default)Testing
SystemVmTemplateRegistrationTestpass.