bhouse-nexthop opened a new issue, #14810: URL: https://github.com/apache/cloudstack/issues/14810
### problem Creating a CKS cluster with `cniconfigurationid` leaves the cluster stuck in Starting. With a CNI configuration, the control node's user data is merged into MIME multipart. `k8s-control-node.yml` starts with `## template: jinja`, but `CloudInitUserDataProvider` types that part `text/cloud-config`. cloud-init only renders jinja for `text/jinja2` parts, so it parses the raw template as YAML: ``` util.py[WARNING]: Failed loading yaml blob. Invalid format at line 472 column 4: "while scanning for the next token found character '%' that cannot start any token ``` The whole CKS cloud-config is dropped: no SSH keys, no kubeadm bootstrap. Related: `registerCniConfiguration` accepts a call with no `cniconfig`. A cluster using that config then fails to create with `NullPointerException: Cannot read the array length because "bytes" is null` in `KubernetesClusterStartWorker`. ### versions - CloudStack 4.22 (CKS jinja header since #9102) - cloud-init 22.4.2 on the CKS node image ### The steps to reproduce the bug 1. `registerCniConfiguration` with a shell-script or MIME CNI config. 2. `createKubernetesCluster` with `cniconfigurationid` set. 3. The control node boots, cloud-init logs the YAML error above, and the cluster stays in Starting. For the second issue: `registerCniConfiguration name=x` (no `cniconfig`), then create a cluster with it. ### What to do about it? - Type a jinja-headed cloud-config or shell part as `text/jinja2` when building the multipart. cloud-init renders it, then handles the result by its own header. - Reject a missing or blank `cniconfig` at registration time. -- 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]
