k0sproject / k0sctl

A bootstrapping and management tool for k0s clusters.
Other
393 stars 77 forks source link

Timed out waiting for scheduling events during reinstall #778

Closed NeonSludge closed 39 minutes ago

NeonSludge commented 2 weeks ago

During a reinstall triggered by changes to installFlags, k0sctl 0.19.0 timed out while waiting for scheduling events and exited with an error:

failed to observe scheduling events after api start-up, you can ignore this check by using --force: context deadline exceeded\ndidn't find any 'Scheduled' kube-system events after ...

It seems that the reinstall phase includes k0sctl trying to look for fresh scheduling-related events in the kube-system namespace:

https://github.com/k0sproject/k0sctl/blob/9246ddc823198b572b51fb19bdf5effee4721a9d/phase/reinstall.go#L120-L126 https://github.com/k0sproject/k0sctl/blob/9246ddc823198b572b51fb19bdf5effee4721a9d/pkg/node/statusfunc.go#L103-L125

This particular cluster has an almost empty kube-system namespace: there are just four CoreDNS pods in it. Nothing really happens there and it can take a while for new scheduling events to show up.

kke commented 22 hours ago

Looks like k0sctl has to stop waiting for scheduling events in the case of changed installFlags since changing those do not necessarily even trigger any scheduling events.

kke commented 22 hours ago

As a workaround --no-wait will skip that part, but the PR #794 should resolve this issue.