Skip to content

Commit 47fd8a6

Browse files
authored
fix: return error when vMotion task fails (#2595)
Signed-off-by: Stoyan Zhelyazkov <stoyan.zhelyazkov@broadcom.com>
1 parent f2691bb commit 47fd8a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vsphere/internal/helper/virtualmachine/virtual_machine_helper.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,8 @@ func Relocate(vm *object.VirtualMachine, spec types.VirtualMachineRelocateSpec,
856856
if errors.Is(ctx.Err(), context.DeadlineExceeded) {
857857
return errors.New("timeout waiting for migration to complete")
858858
}
859+
// Other type of error, just return it
860+
return err
859861
}
860862
return nil
861863
}

0 commit comments

Comments
 (0)