Repository navigation
KVM: register SystemVM templates as dynamically scalable - #14705
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
|
@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.
|
@ACSHomeBot package G |
|
Accepted: Planned: RPM + DEB, KVM SystemVM. Status: Completed. Packaging results. |
Packaging results:
Test packages are available at: |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
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.