Repository navigation
(WIP)CKS: reconcile node capacity after live resize - #14223
Draft
andrijapanicsb wants to merge 7 commits into
Draft
andrijapanicsb wants to merge 7 commits into
andrijapanicsb wants to merge 7 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14223 +/- ##
==========================================
Coverage 20.45% 20.45%
- Complexity 21415 21449 +34
==========================================
Files 6487 6489 +2
Lines 589303 589518 +215
Branches 72245 72303 +58
==========================================
+ Hits 120525 120594 +69
- Misses 455643 455759 +116
- Partials 13135 13165 +30
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:
|
Contributor
Author
|
@ACSHomeBot package G |
Packaging results:
Test packages are available at: |
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 25.50% |
| Branch coverage | 19.82% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
andrijapanicsb
force-pushed
the
cks-live-resize-capacity-reconciliation
branch
from
October 20, 2026 05:18
40b50b0 to
7e5a95a
Compare
|
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.


Why this follow-up is needed
This draft follows #13226, which removed the CKS restriction that prevented changing node compute offerings while a KVM cluster was running. That work builds on #12975, the KVM live-resize support for fixed service offerings.
The VM resize itself can complete successfully: CloudStack records the new offering and libvirt exposes the additional CPU or RAM. Kubernetes may still be advertising the old values, though. In practice, the missing operator step was to restart
kubeleton the resized node and check that the Node object'scapacityandallocatablehad caught up.#14213 tracks that gap. This PR moves that reconciliation into the CKS offering-change workflow, so a successful scale operation means CloudStack, the guest, and Kubernetes agree on the node resources.
What this PR does
For a CPU-count or RAM increase on a running, Cloud-managed KVM worker or control-plane node, CKS now handles one node at a time:
MemTotal.kubelet, wait for it to become active, then wait for the Kubernetes Node to be Ready again.capacityandallocatablereflect the resized guest.The target-node SSH connection is resolved from its actual port-forwarding rule for isolated/VPC networks, rather than assuming that every node is reachable on port 2222. Direct-access networks use the VM's private address on port 22.
Deliberately not done here
Created,Stopped, cap-only, external-node, and non-KVM paths keep their existing behaviour.Draft / QA notes
The focused reconciler and scale-worker tests pass locally. Early KVM QA found two follow-up cases that were easy to miss in unit tests: the scale worker is created through
ComponentContext, so the small stateless reconciliation helper must be available directly to that worker; and a retry after CloudStack has already reached the target offering still needs to finish a CKS resize that had previously cordoned the node. This revision addresses both, uses value comparison for offering IDs, and keeps the observed KVM memory-hotplug overhead within the verification tolerance.A fresh, isolated QA environment is now available for the final package-based test run. That run will exercise CPU-only, RAM-only and combined changes, a pre-cordoned node, retry/failure cleanup, and the final UI scale flow with guest and Kubernetes capacity evidence.