From 59319d6afbc50421b28e2c4a60b84b30e7805017 Mon Sep 17 00:00:00 2001 From: Kimmo Lehto Date: Wed, 28 Aug 2024 14:44:07 +0300 Subject: [PATCH] Add logging Signed-off-by: Kimmo Lehto --- pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go b/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go index d3276f21..f124e22b 100644 --- a/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go +++ b/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go @@ -604,15 +604,19 @@ func (h *Host) FlagsChanged() bool { k0sArgs := h.Metadata.K0sStatusArgs if len(k0sArgs) != len(formattedFlags) { + log.Debugf("%s: installFlags seem to have changed because of different length: %d vs %d", h, len(k0sArgs), len(formattedFlags)) return true } sort.Strings(formattedFlags) sort.Strings(k0sArgs) for i := range formattedFlags { if formattedFlags[i] != k0sArgs[i] { + log.Debugf("%s: installFlags seem to have changed because of different flags: %v vs %v", h, formattedFlags, k0sArgs) return true } } + log.Debugf("%s: installFlags have not changed", h) + return false }