Skip to content

Commit 92c0a70

Browse files
author
David Scott
committed
After destroying the clone-on-boot disk, remove the link
Signed-off-by: David Scott <[email protected]>
1 parent 63f9d84 commit 92c0a70

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

main.ml

+7
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ let set root_dir name dbg sr vdi k v =
219219
let args = Storage.Volume.Types.Volume.Set.In.rpc_of_t args in
220220
fork_exec_rpc root_dir (script root_dir name `Volume "Volume.set") args Storage.Volume.Types.Volume.Set.Out.t_of_rpc
221221

222+
let unset root_dir name dbg sr vdi k =
223+
let args = Storage.Volume.Types.Volume.Unset.In.make dbg sr vdi k in
224+
let args = Storage.Volume.Types.Volume.Unset.In.rpc_of_t args in
225+
fork_exec_rpc root_dir (script root_dir name `Volume "Volume.unset") args Storage.Volume.Types.Volume.Unset.Out.t_of_rpc
226+
222227
let choose_datapath ?(persistent = true) response =
223228
(* We can only use a URI with a valid scheme, since we use the scheme
224229
to name the datapath plugin. *)
@@ -704,6 +709,8 @@ let process root_dir name x =
704709
(* Destroy the temporary disk we made earlier *)
705710
destroy root_dir name args.Args.VDI.Epoch_end.dbg sr temporary
706711
>>= fun () ->
712+
unset root_dir name args.Args.VDI.Epoch_end.dbg sr args.Args.VDI.Epoch_end.vdi _clone_on_boot_key
713+
>>= fun () ->
707714
Deferred.Result.return (R.success (Args.VDI.Epoch_end.rpc_of_response ()))
708715
end
709716
| { R.name = "VDI.set_persistent"; R.params = [ args ] } ->

0 commit comments

Comments
 (0)