Skip to content

Commit 53bc6d4

Browse files
committed
Use unique attach reasons when opening metadata from VDIs.
VDI.open_database now uses a reason which includes the VDI uuid when attaching VDIs. Signed-off-by: John Else <[email protected]>
1 parent 94ab77b commit 53bc6d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ocaml/xapi/xapi_vdi.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ let open_database ~__context ~self =
594594
Static_vdis.permanent_vdi_detach ~__context ~vdi
595595
in
596596
try
597-
let reason = Xapi_globs.foreign_metadata_vdi_reason in
597+
let reason = Printf.sprintf "%s %s"
598+
Xapi_globs.foreign_metadata_vdi_reason
599+
(Db.VDI.get_uuid ~__context ~self)
600+
in
598601
debug "Attaching database VDI to master with reason [%s]" reason;
599602
attach self reason;
600603
debug "%s" "Attempting to read database";

0 commit comments

Comments
 (0)