From 5fcb49183179b50c1ec70d26442ecb881ae0ad82 Mon Sep 17 00:00:00 2001 From: Kimmo Lehto Date: Mon, 16 Oct 2023 09:49:19 +0300 Subject: [PATCH] Nil panic Signed-off-by: Kimmo Lehto --- phase/gather_k0s_facts.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phase/gather_k0s_facts.go b/phase/gather_k0s_facts.go index 6b80b6e9..815f1b82 100644 --- a/phase/gather_k0s_facts.go +++ b/phase/gather_k0s_facts.go @@ -203,6 +203,11 @@ func (p *GatherK0sFacts) investigateK0s(h *cluster.Host) error { } func (p *GatherK0sFacts) needsUpgrade(h *cluster.Host) bool { + if h.Reset { + log.Debugf("%s: is going to be reset", h) + return false + } + // If supplimental files or a k0s binary have been specified explicitly, // always upgrade. This covers the scenario where a user moves from a // default-install cluster to one fed by OCI image bundles (ie. airgap)