Skip to content

Commit 42ea6bb

Browse files
committed
Add qcow2 as supported format by xcp-rrdd-iostat
Since XCP-ng is now supporting qcow files `tap-ctl list` can return string like: - "1564848 0 0 qcow2 /var/run/sr-mount/..." Without this patch the type "qcow2" is unknown and xcp-rrdd-iostat generates an error like: `returned a line that could not be parsed. Ignoring` This patch fixes the issue by allowing qcow2 type. Signed-off-by: Guillaume <[email protected]>
1 parent 8b5bdf7 commit 42ea6bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ocaml/xcp-rrdd/bin/rrdp-iostat/rrdp_iostat.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ let refresh_phypath_to_sr_vdi () =
332332
let exec_tap_ctl_list () : ((string * string) * int) list =
333333
let tap_ctl = "/usr/sbin/tap-ctl list" in
334334
let extract_vdis pid minor _state kind phypath =
335-
if not (kind = "vhd" || kind = "aio") then raise (Failure "Unknown type") ;
335+
if not (kind = "vhd" || kind = "aio" || kind = "qcow2") then
336+
raise (Failure "Unknown type") ;
336337
(* Look up SR and VDI uuids from the physical path *)
337338
if not (Hashtbl.mem phypath_to_sr_vdi phypath) then
338339
refresh_phypath_to_sr_vdi () ;

0 commit comments

Comments
 (0)