Commit 440fb14
authored
fix(vmop): exit maintenance mode after restore failure (#2094)
Description
When a restore operation fails, the VM remains in maintenance mode because the lifecycle handler ignores the Failed phase and never calls ExitMaintenanceStep.
This fix adds a check: for restore operations (vmop.Spec.Restore != nil), continue processing after Failed phase to allow ExitMaintenanceStep to run and exit maintenance mode.
Also adds handling when VirtualDisk is not found during restore - instead of failing, wait for disk to appear (watcher will trigger reconcile).
---------
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>1 parent 2638e77 commit 440fb14
File tree
2 files changed
+12
-1
lines changed- images/virtualization-artifact/pkg/controller/vmop/snapshot/internal
- handler
- step
2 files changed
+12
-1
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
0 commit comments