Skip to content

Commit 56accde

Browse files
thomassarobhoes
authored andcommitted
MxGPU: Run mxgpu_vf_setup on the correct host
Previously we were running this on the local host which would always have been the master. Now we use the new API call to invoke the function on the appropriate target host. Signed-off-by: Thomas Sanders <[email protected]>
1 parent 7cd570d commit 56accde

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ocaml/xapi/vgpuops.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ let reserve_free_virtual_function ~__context vm pf =
115115
| None ->
116116
if retry then begin
117117
(* We may still need to load the driver... do that and try again *)
118-
Xapi_pgpu.mxgpu_vf_setup ~__context;
118+
let pf_host = Db.PCI.get_host ~__context ~self:pf in
119+
Helpers.call_api_functions ~__context (fun rpc session_id ->
120+
Client.Client.Host.mxgpu_vf_setup rpc session_id pf_host
121+
);
119122
get false
120123
end else
121124
(* This probably means that our capacity checking went wrong! *)

0 commit comments

Comments
 (0)