File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1302,6 +1302,9 @@ module Forward = functor(Local: Custom_actions.CUSTOM_ACTIONS) -> struct
13021302 let local_fn = Local.VM. hard_shutdown ~vm in
13031303 with_vm_operation ~__context ~self: vm ~doc: " VM.hard_shutdown" ~op: `hard_shutdown
13041304 (fun () ->
1305+ List. iter (fun (task ,op ) ->
1306+ if op = `clean_shutdown then
1307+ try Local.Task. cancel ~__context ~task: (Ref. of_string task) with _ -> () )(Db.VM. get_current_operations ~__context ~self: vm);
13051308 (* If VM is actually suspended and we ask to hard_shutdown, we need to
13061309 forward to any host that can see the VDIs *)
13071310 let policy =
@@ -1343,6 +1346,9 @@ module Forward = functor(Local: Custom_actions.CUSTOM_ACTIONS) -> struct
13431346 let local_fn = Local.VM. hard_reboot ~vm in
13441347 with_vm_operation ~__context ~self: vm ~doc: " VM.hard_reboot" ~op: `hard_reboot
13451348 (fun () ->
1349+ List. iter (fun (task ,op ) ->
1350+ if op = `clean_reboot then
1351+ try Local.Task. cancel ~__context ~task: (Ref. of_string task) with _ -> () )(Db.VM. get_current_operations ~__context ~self: vm);
13461352 with_vbds_marked ~__context ~vm ~doc: " VM.hard_reboot" ~op: `attach
13471353 (fun vbds ->
13481354 with_vifs_marked ~__context ~vm ~doc: " VM.hard_reboot" ~op: `attach
You can’t perform that action at this time.
0 commit comments