From c2764ecd103f8e1ef12a35d7dce4ab8b8f78aaec Mon Sep 17 00:00:00 2001 From: Liran Rotenberg Date: Tue, 28 Nov 2023 18:09:28 +0200 Subject: [PATCH] Propagate volume creation errors When failing to create the volumes for a migration, log the error to the user as addition to the step failure that we have on the migration itself. Signed-off-by: Liran Rotenberg --- pkg/controller/plan/migration.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/controller/plan/migration.go b/pkg/controller/plan/migration.go index 1e4f1ce7d..530994d00 100644 --- a/pkg/controller/plan/migration.go +++ b/pkg/controller/plan/migration.go @@ -704,6 +704,7 @@ func (r *Migration) execute(vm *plan.VMStatus) (err error) { pvcNames, err = r.kubevirt.PopulatorVolumes(vm.Ref) if err != nil { if !errors.As(err, &web.ProviderNotReadyError{}) { + r.Log.Error(err, "error creating volumes", "vm", vm.Name) step.AddError(err.Error()) err = nil break @@ -733,6 +734,7 @@ func (r *Migration) execute(vm *plan.VMStatus) (err error) { dataVolumes, err = r.kubevirt.DataVolumes(vm) if err != nil { if !errors.As(err, &web.ProviderNotReadyError{}) { + r.Log.Error(err, "error creating volumes", "vm", vm.Name) step.AddError(err.Error()) err = nil break