The Wayback Machine - http://web.archive.org/web/20200907054934/https://github.com/ubuntu/microk8s/issues/1404
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microk8s cleaner/clearer failure on vanilla LXD #1404

Open
doismellburning opened this issue Jul 14, 2020 · 1 comment
Open

microk8s cleaner/clearer failure on vanilla LXD #1404

doismellburning opened this issue Jul 14, 2020 · 1 comment

Comments

@doismellburning
Copy link

@doismellburning doismellburning commented Jul 14, 2020

I recently installed the microk8s snap on a vanilla LXD container. At the time I hadn't come across https://microk8s.io/docs/lxd and it took a little while before I noticed that some components hadn't started up properly and I found my way to that doc.

Having found the documentation, it's excellent, thank you - following the instructions there left me with a very happy microk8s instance. From a usability perspective however, I'd really appreciate it if microk8s were able to perform some kind of initial check and flag up the potential problem (and direct me to the appropriate doc)

As it stands, my rough debugging process looked like:

  1. Realise my instance wasn't fully running
  2. Run microk8s status and be told microk8s is not running. Use microk8s inspect for a deeper inspection.
  3. Run microk8s inspect as instructed and see FAIL: Service snap.microk8s.daemon-kubelet is not running, For more details look at: sudo journalctl -u snap.microk8s.daemon-kubelet
  4. Run sudo journalctl -u snap.microk8s.daemon-kubelet and see server.go:274] failed to run Kubelet: failed to create kubelet: open /dev/kmsg: no such file or directory
  5. Realise that I probably needed to look at my LXD setup and found https://microk8s.io/docs/lxd

The guidance microk8s gave me from steps 2 to 4 was incredibly nice - I'd just really appreciate an initial "looks like you're on LXD but you haven't done these things" check please!

@ktsakalozos
Copy link
Member

@ktsakalozos ktsakalozos commented Jul 17, 2020

Hi @doismellburning

Thank you for the suggestion. Here is how we could approach this.

In the suggest_fixes of the inspect script [1], we could cat the /proc/1/environ and if we see something like container=lxc we would know we are on an lxc container. Then we could try to see if /dev/kmsg is available. If not show a message that possibly the lxc profile is missing and point the user to the docs page.

[1] https://github.com/ubuntu/microk8s/blob/master/scripts/inspect.sh#L106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.