| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
After a node is upgraded, the version recorded for it was the whole output of the SSH command that checks it, such as "v1.33.1\n", and whatever the command wrote to stderr. listKubernetesClusters then returned kubernetesnodeversion with a "v" and a trailing newline for upgraded nodes, and without either for nodes created later. Record the version that matched, in the same form as for a new node. Signed-off-by: Brad House <bhouse@nexthop.ai>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## 4.22 #14635 +/- ##
============================================
- Coverage 18.32% 18.32% -0.01%
Complexity 16644 16644
============================================
Files 5939 5939
Lines 537768 537767 -1
Branches 65929 65929
============================================
- Hits 98551 98547 -4
- Misses 428008 428009 +1
- Partials 11209 11211 +2
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: node versions recorded by a CKS upgradeSummary: after a Kubernetes upgrade, each upgraded node's recorded version is now the semantic version, 1.33.13. There's no v prefix and no trailing newline, the same form a new node gets. Before, the earlier upgrade of the same nodes had recorded v1.33.1\n. Environment
Method: upgradeKubernetesCluster from v1.33.1 to v1.33.13. I read kubernetes_cluster_vm_map.kubernetes_node_version, with its hex, before and after, and kubernetesnodeversion from listKubernetesClusters. Results
Result: pass. An upgrade records the node's semantic version, not the command output. Not covered
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
After a node is upgraded, KubernetesClusterUtil.clusterNodeVersionMatches recorded the whole output of the SSH command that checks its version as the node's version: v1.33.1\n, plus anything the command wrote to stderr. listKubernetesClusters then returned kubernetesnodeversion with a v and a trailing newline for upgraded nodes, and without either for nodes created later, which record the semantic version.
This records the version that matched, which is the upgrade's semantic version, in the same form as for a new node.
Fixes #14629
Rows written before this change keep their old value. Nothing in CloudStack compares them; they are only returned by the API.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
New unit test in KubernetesClusterUtilTest: with the SSH command mocked to return v1.25.1\n, clusterNodeVersionMatches returns true and records 1.25.1. Without the fix it records v1.25.1\n. mvn -pl plugins/integrations/kubernetes-service -am test -Dtest=KubernetesClusterUtilTest passes.
The stored values in #14629 come from a test environment. This change itself has not been run against a live cluster.
How did you try to break this feature and the system with this change?