Skip to content

Commit 17df8ce

Browse files
committed
Merge pull request #29 from djs55/epoch-open
Only perform a clone-on-boot if the disk is not persistent
2 parents f9a5754 + 0740d1c commit 17df8ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ let process root_dir name x =
674674
fork_exec_rpc root_dir (script root_dir name (`Datapath datapath) "Datapath.open") args Storage.Datapath.Types.Datapath.Open.Out.t_of_rpc
675675
>>= fun () ->
676676
Deferred.Result.return (R.success (Args.VDI.Epoch_begin.rpc_of_response ()))
677-
end else begin
677+
end else if not persistent then begin
678678
(* We create a non-persistent disk here with Volume.clone, and store
679679
the name of the cloned disk in the metadata of the original. *)
680680
( match List.Assoc.find response.Storage.Volume.Types.keys _clone_on_boot_key with
@@ -689,7 +689,7 @@ let process root_dir name x =
689689
set root_dir name args.Args.VDI.Epoch_begin.dbg sr args.Args.VDI.Epoch_begin.vdi _clone_on_boot_key vdi.Storage.Volume.Types.key
690690
>>= fun () ->
691691
Deferred.Result.return (R.success (Args.VDI.Epoch_begin.rpc_of_response ()))
692-
end
692+
end else Deferred.Result.return (R.success (Args.VDI.Epoch_begin.rpc_of_response ()))
693693
| { R.name = "VDI.epoch_end"; R.params = [ args ] } ->
694694
let open Deferred.Result.Monad_infix in
695695
let args = Args.VDI.Epoch_end.request_of_rpc args in

0 commit comments

Comments
 (0)