canonical / cluster-api-bootstrap-provider-microk8s

This project offers a cluster API bootstrap provider controller that manages the node provision of a MicroK8s cluster.
https://microk8s.io
21 stars 14 forks source link

modules:final is never executed in Cloud-init of Multi-node Microk8s cluster #107

Open Kun483 opened 4 months ago

Kun483 commented 4 months ago

We disable the default calico and then use helm to install Cilium as CNi layer. When deploying a 3-CP node Microk8s cluster, the first node is running correctly. cloud-init-output logs:

[2024-05-13 22:09:59] Cloud-init v. 22.4.2-0ubuntu0~22.04.1 running 'modules:config' at Mon, 13 May 2024 22:09:59 +0000. Up 10.82 seconds.
[2024-05-13 22:09:59] Begin run command: snap set system proxy.http="http://<PRIVATE_IP>:8000/" proxy.https="http://PRIVATE_IP:8000/"
[2024-05-13 22:10:00] End run command: exit(0)
[2024-05-13 22:10:01] Cloud-init v. 22.4.2-0ubuntu0~22.04.1 running 'modules:final' at Mon, 13 May 2024 22:10:01 +0000. Up 13.24 seconds.
[2024-05-13 22:10:01] + /capi-scripts/00-disable-host-services.sh

However, the second and the third node get stuck in cloud init. cloud-init-output logs:

[2024-05-13 20:24:31] Cloud-init v. 22.4.2-0ubuntu0~22.04.1 running 'modules:config' at Mon, 13 May 2024 20:24:31 +0000. Up 11.66 seconds.
[2024-05-13 20:24:31] Begin run command: snap set system proxy.http="http://PRIVATE_IP:8000/" proxy.https="http://PRIVATE_IP:8000/"
[2024-05-13 20:24:32] End run command: exit(0)

According to the cloud-init-log of the first node, it should run Cloud-init v. 22.4.2-0ubuntu0~22.04.1 running 'modules:final' after End run command: exit(0) When Checking microk8s status in both 2nd and 3rd nodes:

microk8s is not running. Use microk8s inspect for a deeper inspection.