Bug 1561235

Summary: RFE: virConnectGetAllDomainStats doesn't work with LXC
Product: [Community] Virtualization Tools Reporter: Jonathan Nicol <jnicol>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: libvirt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Nicol 2018-03-27 22:54:49 UTC
Description of problem:
Somewhere along the line virt-top stopped working with LXC containers

Version-Release number of selected component (if applicable):
virt-top 1.0.8 ocaml-libvirt 0.6.1.4

How reproducible:
always

Steps to Reproduce:
1.virt-top -c lxc:///


Actual results:
silent failure

Expected results:
program runs

Additional info:
debug output:
libvirt: VIR_ERR_NO_SUPPORT: VIR_FROM_20: this function is not supported by the connection driver: virConnectGetAllDomainStats
Raised by primitive operation at file "collect.ml", line 143, characters 15-51
Called from file "top.ml", line 322, characters 16-29
Called from file "main.ml", line 50, characters 4-19

libvirt-daemon-3.2.0-14.el7_4.7.x86_64

Comment 1 Richard W.M. Jones 2018-04-09 08:15:33 UTC
We switched to using virConnectGetAllDomainStats because it's a far
more efficient way to collect stats, but it looks like it is not
implemented in libvirt.

I checked upstream and the lxc driver doesn't support it there.

It would be nice if libvirt offered some internal fallback path
so that virConnectGetAllDomainStats could work even for drivers
which don't implement it.