[Pkg-libvirt-maintainers] Bug#596004: libvirt0: xen block stats uses wrong sysfs path
Gerald Turner
gturner at unzane.com
Tue Sep 7 20:51:40 UTC 2010
Package: libvirt0
Version: 0.8.3-1.1
Severity: normal
Hello, I'm using squeeze current xen 4.0.1~rc6-1 packages and
linux-image-2.6.32-5-xen-amd64 2.6.32-21 kernel.
It seems that our kernel has different sysfs paths than other distributions,
some time ago, or perhaps currently in RHEL5, the sysfs path used to be:
/sys/devices/xen-backend/
But for Debian, and perhaps more recent kernels than what RHEL5 is using, the
path has changed to:
/sys/bus/xen-backend/
I tried searching for the history on this path change, couldn't find much
besides the following links. This leads me to believe that it could be the
kernel which has changed sysfs structure and not anything directly in the xen
source.
"[libvirt] wrong path of domblkstat":
https://www.redhat.com/archives/libvir-list/2010-June/msg00310.html
"xentop does not work with 2.6.30-rc3 Dom0 kernel from Jeremy's GIT"
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1454
Tools which retrieve block stats from libvirt0 result in the following error
when running on squeeze:
internal error read_bd_stats: Failed to read any block statistics
The source in libvirt0 src/xen/block_stats.c contains the following function:
static int64_t
read_bd_stat (int device, int domid, const char *str)
{
char path[PATH_MAX];
int64_t r;
snprintf (path, sizeof path,
"/sys/devices/xen-backend/vbd-%d-%d/statistics/%s",
domid, device, str);
r = read_stat (path);
if (r >= 0) return r;
snprintf (path, sizeof path,
"/sys/devices/xen-backend/tap-%d-%d/statistics/%s",
domid, device, str);
r = read_stat (path);
return r;
}
I'll attach a patch that modifies this function with additional search paths
once this bug is created.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libvirt0 depends on:
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libcap-ng0 0.6.4-1 An alternate posix capabilities li
ii libgcrypt11 1.4.5-2 LGPL Crypto library - runtime libr
ii libgnutls26 2.8.6-1 the GNU TLS library - runtime libr
ii libnl1 1.1-5 library for dealing with netlink s
ii libsasl2-2 2.1.23.dfsg1-6 Cyrus SASL - authentication abstra
ii libxenstore3.0 4.0.1~rc6-1 Xenstore communications library fo
ii libxml2 2.7.7.dfsg-4 GNOME XML library
Versions of packages libvirt0 recommends:
ii lvm2 2.02.66-3 The Linux Logical Volume Manager
libvirt0 suggests no packages.
-- no debconf information
More information about the Pkg-libvirt-maintainers
mailing list