Cannot install it

Hello,

John, if you read this, I’m here during the break.
these are my screen commands:
marko@malix:~$ microk8s.kubectl get all --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system pod/coredns-86f78bb79c-rq774 0/1 Pending 0 14m
kube-system pod/hostpath-provisioner-5c65fbdb4f-74hf5 0/1 Pending 0 13m
kube-system pod/calico-kube-controllers-847c8c99d-gldxb 0/1 Pending 0 15m

NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 10.152.183.1 443/TCP 19m
kube-system service/kube-dns ClusterIP 10.152.183.10 53/UDP,53/TCP,9153/TCP 14m

NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system daemonset.apps/calico-node 0 0 0 0 0 kubernetes.io/os=linux 17m

NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
kube-system deployment.apps/coredns 0/1 1 0 15m
kube-system deployment.apps/calico-kube-controllers 0/1 1 0 17m
kube-system deployment.apps/hostpath-provisioner 0/1 1 0 13m

NAMESPACE NAME DESIRED CURRENT READY AGE
kube-system replicaset.apps/calico-kube-controllers-847c8c99d 1 1 0 15m
kube-system replicaset.apps/coredns-86f78bb79c 1 1 0 14m
kube-system replicaset.apps/hostpath-provisioner-5c65fbdb4f 1 1 0 13m
marko@malix:~$ sudo snap install juju --classic
error: cannot perform the following tasks:

  • Run hook connect-plug-peers of snap “juju” (run hook “connect-plug-peers”: error: cannot communicate with server: timeout exceeded while waiting for response)
1 Like

Marek, thank you for reaching out.
I don’t have an answer for you, but maybe there might be more info to aid debugging if we enable debug logs for snapd:

$ sudo systemctl edit snapd.service

[Service]
Environment=SNAPD_DEBUG=1 SNAPD_DEBUG_HTTP=7

$ sudo systemctl restart snapd.service

and then retrying the install.

John, thank you.

Now I get this:

marko@malix:~$ sudo snap install juju --classic
error: cannot perform the following tasks:

  • Run hook connect-plug-peers of snap “juju” (run hook “connect-plug-peers”:

cmd_run.go:404: DEBUG: SELinux not enabled
DEBUG: umask reset, old umask was 022
DEBUG: security tag: snap.juju.hook.connect-plug-peers
DEBUG: executable: /snap/core/10185/usr/lib/snapd/snap-exec
DEBUG: confinement: classic
DEBUG: base snap: core18
DEBUG: ruid: 0, euid: 0, suid: 0
DEBUG: rgid: 0, egid: 0, sgid: 0
DEBUG: apparmor label on snap-confine is: /snap/core/10185/usr/lib/snapd/snap-confine
DEBUG: apparmor mode is: enforce
DEBUG: preparing classic execution environment
DEBUG: set_effective_identity uid:0 (change: yes), gid:0 (change: yes)
DEBUG: creating user data directory: /root/snap/juju/14356
DEBUG: requesting changing of apparmor profile on next exec to snap.juju.hook.connect-plug-peers
DEBUG: ruid: 0, euid: 0, suid: 0
DEBUG: loading bpf program for security tag snap.juju.hook.connect-plug-peers
DEBUG: read 14 bytes from /var/lib/snapd/seccomp/bpf//snap.juju.hook.connect-plug-peers.bin
DEBUG: execv(/snap/core/10185/usr/lib/snapd/snap-exec, /snap/core/10185/usr/lib/snapd/snap-exec…)
DEBUG: argv[1] = --hook=connect-plug-peers
DEBUG: argv[2] = juju
DEBUG: umask restored to 022
DEBUG: working directory restored to /
error: cannot communicate with server: timeout exceeded while waiting for response
-----)

A little update:
I installed LXD to see how it goes in a container, Both host and the container are U20.04, but get this:
root@optimum-doberman:~# microk8s.kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system calico-kube-controllers-847c8c99d-rgzdk 0/1 Pending 0 9m30s
kube-system coredns-86f78bb79c-66mds 0/1 Pending 0 7m39s
kube-system hostpath-provisioner-5c65fbdb4f-xhvgw 0/1 Pending 0 6m35s

It seems it’s microk8s that’s a problem.
Been waiting a little longer, used watch with the command above and still these pods aren’t ready, 18 minutes after Kubernetes started.

Update #2
Another clean U20.04 container:
root@relaxed-rodent:~# snap install juju --classic
juju 2.8.5 from Canonical✓ installed

This confirms the previous msg.
HTH

On installation, if the juju snap detects that you have microk8s installed on a machine, it will attempt to automatically add the microk8s cloud. If that fails, the juju snap’s install hook will fail.

We probably need to drop in some better messaging about that process.

For now, you’ll need to either troubleshoot and fix microk8s, or uninstall the microk8s snap before installing juju.

Regardless, thank you for the questions, and follow-up troubleshooting.