Skip to content

Commit 2379577

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 b2a392d commit 2379577

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ocaml/xapi/storage_smapiv1_migrate.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,14 @@ 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 ->
637+
Local.VDI.remove_tags dbg sr leaf.vdi tag ;
638+
Local.VDI.add_tags dbg sr leaf.vdi tag
639+
)
640+
vdi_info.tags ;
641+
634642
D.info "Created leaf VDI for mirror receive: %s" (string_of_vdi_info leaf) ;
635643
on_fail := (fun () -> SMAPI.VDI.destroy dbg sr leaf.vdi) :: !on_fail ;
636644
(* dummy VDI is created so that the leaf VDI becomes a differencing disk,

0 commit comments

Comments
 (0)