bhouse-nexthop commented on PR #14616:
URL: https://github.com/apache/cloudstack/pull/14616#issuecomment-7102376770
### Test report: worker offering rollout with cancel/resume, and worker
template change (recreate in place)
**Environment**
- CloudStack 24.0 (main) build with this PR at its latest two commits
("recreate worker nodes from a new template in a rollout" and "join a recreated
worker with a fresh token and a pinned CA"), plus #14781 (user data size check)
and some of my other open CKS PRs.
- Three KVM hosts, Ceph RBD primary storage, one management server.
- New cluster created on this build: 1 control node + 2 workers, Kubernetes
v1.32.3, `cks-node` offering (2 vCPU, 4 GB), default CKS template (systemvm
4.22.0, Debian 12).
- A watcher sampled cordoned/NotReady nodes, cluster state and `kubeadm
token list` every 3-5 s.
**Results**
| Step | Result | Evidence |
|---|---|---|
| Cluster created with the fresh-token join | pass | worker user data:
`kubeadm join ... --token <t> --discovery-token-ca-cert-hash sha256:...`; after
create only the kubeadm-certs proxy token is left |
| Worker offering `cks-node` -> `r3-w` (2 vCPU, 3 GB), `rollout=true` | pass
| 1 worker cordoned at a time, each back Ready with a new boot ID, workers on
`r3-w`, control untouched, `workernodesoutofdate=0` |
| `cancelrollout=true` while the first worker is cordoned (offering back to
`cks-node`) | pass | "Asked the rollout ... to stop"; the job ends after that
worker: "The rollout of Kubernetes cluster ... stopped: it was cancelled. Call
updateKubernetesCluster with rollout=true to resume it"; Running,
`workernodesoutofdate=1`, `lasterror="it was cancelled"`; second worker
untouched |
| Resume with `rollout=true` | pass | only the remaining worker restarted;
`workernodesoutofdate=0`, `lasterror` cleared |
| Cancel that arrives after the next batch started (first try) | as designed
| the batch in progress finished, the rollout completed |
| `nodetemplates` worker -> a different CKS template (Ubuntu 24.04
image-builder, v1.32.3), `rollout=true` | pass | 386 s for 2 workers, one at a
time; "Recreating the VM of node ..." per worker; `worker_node_template_id`
stored, control template unchanged |
| Recreated in place | pass | same VM IDs, names and guest IPs; each got a
new root volume, the old one in Destroy (not expunged); OS now Ubuntu 24.04,
control node still Debian 12; nodes Ready with new boot IDs, same Kubernetes
node objects |
| Fresh join token + pinned CA per recreated worker | pass | during each
worker's batch a new `system:bootstrappers` token (TTL ~30 min) appeared; a
different token per worker; the recreated worker's user data joins with that
token and `--discovery-token-ca-cert-hash`, matching the control plane CA's
hash |
| Token deleted after the batch | pass | each token gone once its worker was
back; at the end only the kubeadm-certs proxy token remains |
| Final state | pass | Running, 3/3 Ready, `controlnodesoutofdate=0`,
`workernodesoutofdate=0`, nothing left cordoned |
**Rollout log (management server)**
```
13:06:09 Restarting worker node(s) [<worker-1>] of Kubernetes cluster
<cluster> with the settings of their type
13:06:59 Restarting worker node(s) [<worker-2>] ...
13:08:04 Rollout of Kubernetes cluster <cluster> completed
13:09:06 Restarting worker node(s) [<worker-1>] ...
13:09:08 Asked the rollout of Kubernetes cluster <cluster> to stop
13:09:54 ... FAILED ... "The rollout of Kubernetes cluster <cluster>
stopped: it was cancelled. Call updateKubernetesCluster with rollout=true to
resume it"
13:09:58 Restarting worker node(s) [<worker-2>] ... (resume)
13:11:03 Rollout of Kubernetes cluster <cluster> completed
13:11:31 Recreating the VM of node <worker-1> of Kubernetes cluster
<cluster> ...
13:15:00 Recreating the VM of node <worker-2> ...
13:17:43 Rollout of Kubernetes cluster <cluster> completed
```
Token list sampled during the template rollout (secrets cut):
```
<proxy>.* 1h Proxy for managing TTL for the kubeadm-certs secret
<tokA>.* 29m system:bootstrappers:kubeadm:default-node-token <- worker
1 batch
<proxy>.* 1h
<tokB>.* 29m system:bootstrappers:kubeadm:default-node-token <- worker
2 batch
<proxy>.* 1h <- end
```
Not covered here: a cancel during a template rollout, and a management
server restart mid-recreate.
--
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]