andrijapanicsb opened a new pull request, #14705:
URL: https://github.com/apache/cloudstack/pull/14705

   ### 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.createTemplateObjectInDB` sets 
`dynamicallyScalable` for KVM templates (the method is now `protected` so it 
can be unit tested).
   - `schema-42300to2400.sql` sets 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.
   - Two unit tests: a KVM template is registered as scalable, a VMware one is 
not.
   
   ### What changes for operators
   
   | Situation | Before | After |
   |---|---|---|
   | `enable.dynamic.scale.vm` off (the default) | Nothing is dynamically 
scalable | Unchanged |
   | Global setting on, new CKS nodes | Not scalable; live CKS scaling fails | 
Scalable; live CKS scaling works |
   | Global setting on, new routers, SSVM, console proxy | Fixed size | 
Scalable; about 67 MB less usable memory (a 64 MB kernel I/O buffer for the 
hot-plug range) |
   | VMs that already exist | — | Unchanged; each keeps its own flag until it 
is recreated |
   
   ### Testing
   
   - Unit tests: both new tests in `SystemVmTemplateRegistrationTest` pass.
   - Live, on standard x86_64 KVM hosts with the template flag set by hand 
(details in #14704): a running CKS cluster scaled live with no reboot. The 
memory cost was measured on routers, SSVM and console proxy. A VM whose vCPU 
maximum exceeds the machine type limit is refused by libvirt and CloudStack 
reports the error without crashing.
   - Still to do on packages built from this PR: a fresh install, and an 
upgrade from 4.20 / 4.22 / 4.23 checking that every KVM SystemVM template row 
ends up with the flag set.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to