Skip to content

Commit fe11f1f

Browse files
committed
CA-233306: Delete the VDI when invoking Pool_update.pool_clean
Db.VDI.destroy in Pool_update.pool_clean just removes the Xapi database record. It should invoke Client.VDI.destroy instead and remove both the VDI and the database record. Signed-off-by: Hui Zhang <[email protected]>
1 parent f191b8f commit fe11f1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ocaml/xapi/xapi_pool_update.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,8 @@ let pool_clean ~__context ~self =
414414
debug "pool_update.pool_clean %s" pool_update_name;
415415
detach ~__context ~self;
416416
let vdi = Db.Pool_update.get_vdi ~__context ~self in
417-
Db.VDI.destroy ~__context ~self:vdi;
417+
Helpers.call_api_functions ~__context
418+
(fun rpc session_id -> Client.VDI.destroy rpc session_id vdi);
418419
Db.Pool_update.set_vdi ~__context ~self ~value:Ref.null
419420

420421
let destroy ~__context ~self =

0 commit comments

Comments
 (0)