bhouse-nexthop commented on PR #14635:
URL: https://github.com/apache/cloudstack/pull/14635#issuecomment-6752448666

   ### Test report: node versions recorded by a CKS upgrade
   
   **Summary:** 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**
   - A CloudStack 24.0 (main) build with this PR, alongside some of my other 
open PRs, including #14634 and #14637 in the same plugin.
   - The PR targets 4.22; it wasn't run on a 4.22 build. The code it changes is 
the same on both branches: 4.22's 
`KubernetesClusterUtil.clusterNodeVersionMatches` also stores the SSH command's 
output with `setNodeVersion`.
   - Three KVM hosts, Ceph RBD primary storage, one management server.
   - Cluster B: 1 control node and 1 worker. Its nodes had been upgraded from 
v1.32.5 to v1.33.1 on an earlier build without this PR.
   
   **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**
   - The upgrade succeeded (334 s); both nodes are Ready on v1.33.13.
   - Recorded versions:
     ```
     before (written by the earlier upgrade, without this PR)
     control-1   v1.33.1\n   76312E33332E310A
     worker-1    v1.33.1\n   76312E33332E310A
   
     after (written by this upgrade)
     control-1   1.33.13     312E33332E3133
     worker-1    1.33.13     312E33332E3133
     ```
   - The log line for each node gives the version that is stored:
     ```
     20:35:14,834 DEBUG KubernetesClusterUtil  Updating node control-1 
Kubernetes version to 1.33.13
     20:36:26,546 DEBUG KubernetesClusterUtil  Updating node worker-1 
Kubernetes version to 1.33.13
     ```
   - `listKubernetesClusters` returns `"kubernetesnodeversion":"1.33.13"` for 
both nodes.
   - For comparison, a worker added by a scale-up on the same build (the #14634 
run) recorded `1.33.1`. Upgraded and new nodes now use the same form.
   
   **Result:** pass. An upgrade records the node's semantic version, not the 
command output.
   
   **Not covered**
   - A node reporting build metadata (`v1.33.1+vendor.1`): the lab's ISOs don't 
have any. It is covered by the PR's reasoning only.
   - Rows written before this change keep their old value, as the PR says. The 
other two clusters in the lab still have `v1.33.1\n`.
   


-- 
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]

Reply via email to