Skip to content

Commit

Permalink
Log a non-nil error from findTemplate
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ahadas committed Apr 2, 2024
1 parent 69e3648 commit 4dc5d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/plan/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4dc5d14

Please sign in to comment.