| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…emplate Clusters created before 4.21 have no control, worker or etcd node template set: those columns were added by the 4.21 upgrade and left NULL. The action workers looked the node templates up from those columns only, so scaling up such a cluster passed a null template to the VM deployment, which failed with a NullPointerException. A node type with no template of its own now uses the template CKS picks by default, as these clusters did before 4.21. Such a cluster also counts as using the default template, so the owner gets launch permission for it while nodes are deployed, as before. Signed-off-by: Brad House <bhouse@nexthop.ai>
Codecov Report❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
@@ Coverage Diff @@
## 4.22 #14634 +/- ##
=========================================
Coverage 18.32% 18.32%
- Complexity 16644 16649 +5
=========================================
Files 5939 5939
Lines 537768 537773 +5
Branches 65929 65930 +1
=========================================
+ Hits 98551 98570 +19
+ Misses 428008 427993 -15
- Partials 11209 11210 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
Test report: scaling up and upgrading a cluster created before 4.21, without the DB workaroundSummary: a CKS cluster created on 4.20 and upgraded to 4.22 and then 24.0, with its per-node-type template columns still NULL, now scales up. There's no NPE, and the new worker is deployed from the default CKS template, joins and is Ready. Launch permission for that template is granted to the owner for the scale and revoked at its end. Scaling back down, and a Kubernetes upgrade of the same cluster, also work. The template columns stay NULL throughout. Environment
Results
Scale-up
Launch permission
Scale-down and upgrade
Result: pass. A pre-4.21 cluster with NULL node-type template columns scales up, down and upgrades without the workaround. New nodes come from the default CKS template, and the owner holds launch permission for it only while the scale runs. Not covered
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
A CKS cluster created before 4.21 has no control, worker or etcd node template set. The 4.21 upgrade added those columns (#9102) and left them NULL. The action workers looked the node templates up from those columns only, so scaling up such a cluster passed a null template to the VM deployment, which failed with a NullPointerException.
Fixes #14628
Why clusterTemplate and not the cluster's template_id: for a pre-4.21 cluster, template_id is the system VM template that was current when the cluster was created. After the upgrade that is no longer the default, and the launch permission CKS grants is for clusterTemplate. A cluster owned by a regular user could then not deploy from template_id.
Filling the columns in during the upgrade instead would be a schema change, so it would have to target main, and it wouldn't help clusters already upgraded to 4.21 or 4.22.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
New unit tests in KubernetesClusterActionWorkerNodeTemplateTest:
Without the fix, the first test fails. mvn -pl plugins/integrations/kubernetes-service -am test -Dtest='KubernetesClusterActionWorker*Test' passes.
On a test environment, a cluster created on 4.20 and upgraded to 4.22 failed to scale up with the NullPointerException in #14628. Setting the node type template columns to the cluster's template_id by hand made the scale-up work. 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?