From 4dc5d14e08eeb73717befd0324f98ccca9f61eb4 Mon Sep 17 00:00:00 2001 From: Arik Hadas Date: Mon, 1 Apr 2024 16:31:56 +0300 Subject: [PATCH] Log a non-nil error from findTemplate In 98b06ec we switched an Error log to Info and by that we lost the trace from the code that tries to find a template in KubeVirt in case it raises an error. Switching that log to Error again in order to restore this information. Signed-off-by: Arik Hadas --- pkg/controller/plan/kubevirt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/plan/kubevirt.go b/pkg/controller/plan/kubevirt.go index ccce94ba5..3313b89fc 100644 --- a/pkg/controller/plan/kubevirt.go +++ b/pkg/controller/plan/kubevirt.go @@ -1355,7 +1355,7 @@ func (r *KubeVirt) getVirtualMachineClusterPreference(vm *plan.VMStatus, prefere func (r *KubeVirt) vmTemplate(vm *plan.VMStatus) (virtualMachine *cnv.VirtualMachine, ok bool) { tmpl, err := r.findTemplate(vm) if err != nil { - r.Log.Info("could not find template for destination VM.", + r.Log.Error(err, "could not find template for destination VM.", "vm", vm.String()) return