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

This commit is contained in:
edi-oai 2026-08-18 00:44:43 +01:00 committed by GitHub
parent 3ec5e3e585
commit b217649ef0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

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
}