canonical / microk8s

MicroK8s is a small, fast, single-package Kubernetes for datacenters and the edge.
https://microk8s.io
Apache License 2.0
8.37k stars 765 forks source link

Increase systemd unit timeout for microk8s.stop #774

Closed krichter722 closed 3 years ago

krichter722 commented 4 years ago

microk8s.stop regularly (~20% of times) fails to stop due to

Fehler: cannot perform the following tasks:
- stop of [microk8s.daemon-apiserver microk8s.daemon-apiserver-kicker microk8s.daemon-cluster-agent microk8s.daemon-containerd microk8s.daemon-controller-manager microk8s.daemon-etcd microk8s.daemon-flanneld microk8s.daemon-kubelet microk8s.daemon-proxy microk8s.daemon-scheduler] (# systemctl stop snap.microk8s.daemon-apiserver.service snap.microk8s.daemon-apiserver-kicker.service snap.microk8s.daemon-cluster-agent.service snap.microk8s.daemon-containerd.service snap.microk8s.daemon-controller-manager.service snap.microk8s.daemon-etcd.service snap.microk8s.daemon-flanneld.service snap.microk8s.daemon-kubelet.service snap.microk8s.daemon-proxy.service snap.microk8s.daemon-scheduler.service

<exceeded maximum runtime of 1m1s>)
- stop of [microk8s.daemon-apiserver microk8s.daemon-apiserver-kicker microk8s.daemon-cluster-agent microk8s.daemon-containerd microk8s.daemon-controller-manager microk8s.daemon-etcd microk8s.daemon-flanneld microk8s.daemon-kubelet microk8s.daemon-proxy microk8s.daemon-scheduler] (exceeded maximum runtime of 1m1s)
Failed to stop microk8s services. Check snapd logs with "journalctl -u snapd.service"

In this case microk8s.stop needs to be repeated and then usually succeeds. Since aborting the stop routine which already takes more than 60s is a source of trouble (resources left in undefined state or else) increasing the timeout to 120s to even 300s doesn't hurt afaik.

experienced with v1.16.2 (989) on Ubuntu 19.10 inspection-report-20191107_115904.tar.gz

ktsakalozos commented 4 years ago

Hi @krichter722 I do not see an obvious way to set the service stop timeout. I asked the snappy people at https://forum.snapcraft.io/t/snap-disable-timeout/14060. Let's see.

DomFleischmann commented 4 years ago

According to this reply there seems to be a non trivial bug that doesn't allow us to up the timeout time currently.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

eferreira2 commented 3 years ago

I've also encountered this issue with issuing snap commands to install the digital signage "xibo" platform on a Linux Centos 8 device.