bhouse-nexthop opened a new pull request, #14635: URL: https://github.com/apache/cloudstack/pull/14635
### 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 - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [x] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [x] Minor - [ ] Trivial ### 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? - Only the value recorded after a match changes; the match itself doesn't. - A node that reports build metadata (`v1.33.1+vendor.1`) is recorded as the registered semantic version, the same as a new node. -- 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]
