diff --git a/pkg/node/wait.go b/pkg/node/wait.go index d6870fbe..d2cf5ca0 100644 --- a/pkg/node/wait.go +++ b/pkg/node/wait.go @@ -108,10 +108,9 @@ func WaitK0sDynamicConfigReady(ctx context.Context, h *cluster.Host) error { // WaitEventsScheduled blocks until the node has started scheduling pods or context is cancelled func WaitEventsScheduled(ctx context.Context, h *cluster.Host) error { since := time.Now() - sinceStr := since.Format(time.RFC3339) return retry(ctx, func(_ context.Context) error { - output, err := h.ExecOutput(h.Configurer.KubectlCmdf(h, h.K0sDataDir(), `-n kube-system get events --field-selector reason=Scheduled --since-time="%s"`, sinceStr), exec.Sudo(h)) + output, err := h.ExecOutput(h.Configurer.KubectlCmdf(h, h.K0sDataDir(), "-n kube-system get events --field-selector reason=Scheduled"), exec.Sudo(h)) if err != nil { return fmt.Errorf("failed to get node events: %w", err) } @@ -127,9 +126,10 @@ func WaitEventsScheduled(ctx context.Context, h *cluster.Host) error { continue } if e.EventTime.Before(since) { - log.Debugf("%s: skipping event %s at %s - too old", h, e.Reason, e.EventTime) + log.Debugf("%s: skipping event: %s is too old", h, e.EventTime) continue } + log.Debugf("%s: found a 'Scheduled' event occuring after api start-up", h) return nil } return fmt.Errorf("node not scheduled")