[Windows] Juju.exe and MicroK8s.exe volumes mounts wrong path

Bug #1931591 reported by Nuno do Carmo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Yang Kelvin Liu

Bug Description

Hi all,

this is a follow-up from an initial discussion on Juju discourse: https://discourse.charmhub.io/t/windows-juju-and-microk8s-bootstrap-error/4712

I’m currently writing a blog on reproducing Mark Shuttleworth demo at DockerCon 2021, but on Windows, using juju.exe and microk8s.exe.

Based on the "bootstrap error" (https://bugs.launchpad.net/juju/+bug/1931590) bug, I was asked to test another way of adding the cloud config by running the command `microk8s.exe config | juju add-k8s micro`.

The bootstrap could then start, but hanged near the end. After digging into the "controller-0" pod, I could see that the volumes mounts where "translated" as Windows path:
```
Mounts:
          /var/lib/juju from storage (rw)
          /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-ncx4p (ro)
          \var\lib\juju\agents\controller-0\template-agent.conf from controller-agent-conf (rw,path="template-agent.conf")
          \var\lib\juju\bootstrap-params from controller-bootstrap-params (ro,path="bootstrap-params")
          \var\lib\juju\shared-secret from controller-shared-secret (ro,path="shared-secret")
          \var\lib\juju\template-server.pem from controller-server-pem (ro,path="template-server.pem")
```

This generates an error during the pvc creation:
```
Events:
      Type Reason Age From Message
      ---- ------ ---- ---- -------
      Warning FailedScheduling 16m default-scheduler 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.
      Normal Scheduled 16m default-scheduler Successfully assigned controller-microk8s-localhost/controller-0 to microk8s-vm
      Warning FailedScheduling 16m default-scheduler 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.
```

The expected result, and what I get if I connect directly to the MicroK8s VM and run juju there, is:
```
Mounts:
      /var/lib/juju from storage (rw)
      /var/lib/juju/agents/controller-0/template-agent.conf from controller-agent-conf (rw,path="template-agent.conf")
      /var/lib/juju/bootstrap-params from controller-bootstrap-params (ro,path="bootstrap-params")
      /var/lib/juju/shared-secret from controller-shared-secret (ro,path="shared-secret")
      /var/lib/juju/template-server.pem from controller-server-pem (ro,path="template-server.pem")
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-d85wk (ro)
```

Thanks in advance for your help and support.

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.9.6
importance: Undecided → High
status: New → Triaged
Changed in juju:
milestone: 2.9.6 → 2.9.7
Changed in juju:
assignee: nobody → Yang Kelvin Liu (kelvin.liu)
status: Triaged → In Progress
Changed in juju:
milestone: 2.9.7 → 2.9.8
Changed in juju:
milestone: 2.9.8 → 2.9.9
Revision history for this message
Yang Kelvin Liu (kelvin.liu) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.