Skip to content

Commit 85e3c5a

Browse files
committed
storage: Preserve VDI tags on SMAPIv1 migrate
SMAPI.VDI.create ignores the tags from vdi_info, so set them after the call Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
1 parent 42cb9bd commit 85e3c5a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ocaml/xapi/storage_smapiv1_migrate.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,11 @@ module MIRROR : SMAPIv2_MIRROR = struct
631631
try
632632
let vdi_info = {vdi_info with sm_config= [("base_mirror", id)]} in
633633
let leaf = SMAPI.VDI.create dbg sr vdi_info in
634+
635+
List.iter
636+
(fun tag -> Local.VDI.add_tags dbg sr leaf.vdi tag)
637+
vdi_info.tags ;
638+
634639
D.info "Created leaf VDI for mirror receive: %s" (string_of_vdi_info leaf) ;
635640
on_fail := (fun () -> SMAPI.VDI.destroy dbg sr leaf.vdi) :: !on_fail ;
636641
(* dummy VDI is created so that the leaf VDI becomes a differencing disk,

0 commit comments

Comments
 (0)