Prevent failed host-dir VMs from restarting (#463)

This commit is contained in:
edi-oai
2026-08-17 16:44:43 -07:00
committed by GitHub
parent 3ec5e3e585
commit b217649ef0
+4 -1
View File
@@ -322,7 +322,10 @@ func (controller *Controller) failVMsWithHostDirs() error {
}
for _, vm := range vms {
if vm.TerminalState() || len(vm.HostDirs) == 0 {
permanentlyFailed := vm.TerminalState() &&
vm.RestartPolicy == v1.RestartPolicyNever
if permanentlyFailed || len(vm.HostDirs) == 0 {
continue
}