Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3045e63

Browse files
committedApr 22, 2025·
Refind VDI after setting content_id
So that the new content_id can be reflected in the returned vdi_info. Signed-off-by: Vincent Liu <[email protected]>
1 parent 5492c14 commit 3045e63

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎ocaml/xapi/storage_smapiv1_migrate.ml

+2
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ module Copy = struct
279279
(* PR-1255: XXX: this is useful because we don't have content_ids by default *)
280280
D.debug "setting local content_id <- %s" local_vdi.content_id ;
281281
Local.VDI.set_content_id dbg sr local_vdi.vdi local_vdi.content_id ;
282+
(* Re-find the VDI to get the updated content_id info *)
283+
let remote_vdi = find_vdi ~dbg ~sr:dest ~vdi:dest_vdi (module Remote) in
282284
Some (Vdi_info remote_vdi)
283285
with e ->
284286
D.error "Caught %s: performing cleanup actions" (Printexc.to_string e) ;

0 commit comments

Comments
 (0)
Please sign in to comment.