Repository navigation
CKS: don't fail when a node still has an ISO attached - #14637
bhouse-nexthop wants to merge 1 commit into
Conversation
attachIsoKubernetesVMs attaches the binaries ISO to every node before an upgrade, a scale-up or a start, and relied on the attach replacing whatever ISO the node had. Since an Instance can have several CD-ROMs, attachIso refuses an ISO that is already attached, and any ISO beyond the number of CD-ROMs, one by default. A node left holding the binaries ISO by an operation that did not finish, for example because the management server stopped, then made every later operation fail before it started. Leave the binaries ISO in place if the node has it already, and detach any other ISO from the node first, as the attach used to replace it. Signed-off-by: Brad House <bhouse@nexthop.ai>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14637 +/- ##
=========================================
Coverage 20.78% 20.78%
- Complexity 21927 21932 +5
=========================================
Files 6496 6496
Lines 591657 591665 +8
Branches 72592 72595 +3
=========================================
+ Hits 122955 122967 +12
+ Misses 455356 455345 -11
- Partials 13346 13353 +7
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:
|
Test report: CKS upgrade with the binaries ISO already attached to a nodeSummary: with the upgrade's binaries ISO already attached to the control node, as an operation that didn't finish would leave it, Environment
Method
Results
Result: pass. A node already holding the binaries ISO no longer blocks the upgrade. The ISO is kept on that node for the upgrade, and detached from every node at the end, as for a node that had none. Not covered
|
Description
Since #13101 (multiple CD-ROMs per VM),
attachIsoon main refuses an ISO that is already attached, and any ISO beyond the number of CD-ROMs, one by default.KubernetesClusterActionWorker.attachIsoKubernetesVMsrelied on the attach replacing whatever ISO a node had. So a node left holding the binaries ISO by an operation that didn't finish, for example because the management server stopped, made every later upgrade, scale-up or start fail before it started, with "The specified ISO is already attached to this Instance."Fixes #14630
For each node,
attachIsoKubernetesVMsnow reads the VM again and:4.22 is not affected, so this is for main only.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
New unit tests in
KubernetesClusterActionWorkerIsoTest:Without the fix, the last three fail.
mvn -pl plugins/integrations/kubernetes-service -am test -Dtest='KubernetesClusterActionWorker*Test'passes.On a test environment running main, an upgrade failed as described in #14630 while both nodes still held the binaries ISO, and ran once the ISO was detached from both by hand. This PR itself has not been run against a live cluster.
How did you try to break this feature and the system with this change?
detachIsoKubernetesVMsis unchanged.