[libvirt] libvirt 1.2.9.3 - test for vircgrouptest fails
by Florian Hubold
Hi,
one of the seems to fail on our build system, vircgrouptest fails with
Unexpected: nodeGetCPUCount() yields: -1
The test runs fine locally.
Here are the contents from testsuite.log with VIR_TEST_DEBUG=1 enabled.
See tests/test-suite.log
Please report to libvir-list(a)redhat.com
============================================================================
[...]
+ cat test-suite.log
===========================================
libvirt 1.2.9.3: tests/test-suite.log
===========================================
# TOTAL: 126
# PASS: 123
# SKIP: 2
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: vircgrouptest
===================
TEST: vircgrouptest
1) New cgroup for self ... OK
2) New cgroup for partition ...
libvirt: Cgroup error : At least one cgroup controller is required: No such
device or address
OK
3) New cgroup for partition nested ...
libvirt: Cgroup error : Failed to create controller cpu for group: No such file
or directory
OK
4) New cgroup for partition nested deeply ...
libvirt: Cgroup error : Failed to create controller cpu for group: No such file
or directory
OK
5) New cgroup for domain partition ... OK
6) New cgroup for domain partition escaped ... OK
7) Cgroup available ... OK
8) virCgroupGetBlkioIoServiced works ... OK
9) virCgroupGetBlkioIoDeviceServiced works ... OK
10) virCgroupGetMemoryUsage works ... OK
11) virCgroupGetPercpuStats works ...
Unexpected: nodeGetCPUCount() yields: -1
libvirt: error : this function is not supported by the connection driver: host
cpu counting not supported on this node
FAILED
12) New cgroup for self (allinone) ... OK
13) Cgroup available ... OK
14) New cgroup for self (logind) ... OK
15) Cgroup available ... OK
FAIL vircgrouptest (exit status: 1)
[...]
error: Bad exit status from /home/iurt/rpmbuild/tmp/rpm-tmp.7lQ0Fz (%check)
Kind regards
8 years, 10 months
[libvirt] [PATCH v2 0/7] NSS module for libvirt
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2016-February/msg00693.html
diff to v1:
- Rework to return multiple IPs instead of the first one found
- Move the module into libvirt-nss rpm package
- Fix linking (drop libvirt_util.la from LDADD)
Michal Privoznik (7):
Export virLease* functions for leases file handling
virjson: Resolve const correctness
Initial support for NSS plugin skeleton
libvirt.spec.in: Introduce libvirt-nss package
nss: Implement _nss_libvirt_gethostbyname3_r
Implement _nss_libvirt_gethostbyname4_r
nss: Introduce a test
cfg.mk | 2 +-
configure.ac | 2 +
libvirt.spec.in | 21 ++
m4/virt-nss.m4 | 51 +++++
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/libvirt_private.syms | 6 +
src/network/leaseshelper.c | 271 +------------------------
src/util/virjson.c | 58 +++---
src/util/virjson.h | 54 ++---
src/util/virlease.c | 304 ++++++++++++++++++++++++++++
src/util/virlease.h | 44 ++++
tests/Makefile.am | 18 ++
tests/nssdata/virbr0.status | 14 ++
tests/nssmock.c | 140 +++++++++++++
tests/nsstest.c | 184 +++++++++++++++++
tools/Makefile.am | 44 ++++
tools/nss/libvirt_nss.c | 476 ++++++++++++++++++++++++++++++++++++++++++++
tools/nss/libvirt_nss.h | 52 +++++
tools/nss/libvirt_nss.syms | 12 ++
20 files changed, 1428 insertions(+), 327 deletions(-)
create mode 100644 m4/virt-nss.m4
create mode 100644 src/util/virlease.c
create mode 100644 src/util/virlease.h
create mode 100644 tests/nssdata/virbr0.status
create mode 100644 tests/nssmock.c
create mode 100644 tests/nsstest.c
create mode 100644 tools/nss/libvirt_nss.c
create mode 100644 tools/nss/libvirt_nss.h
create mode 100644 tools/nss/libvirt_nss.syms
--
2.4.10
8 years, 10 months
[libvirt] [PATCH 0/7] Fix and enhance statistics of a completed job
by Jiri Denemark
Jiri Denemark (7):
qemu: Store completed stats at the very end of migration
qemu: Properly update completed migration stats
qemu: Don't explicitly stop CPUs after migration
qemu: Fix a race when computing migration downtime
qemu: Do not report completed stats until the job finishes
Introduce job completed event
qemu: Add support for job completed event
daemon/remote.c | 40 ++++++++++++++++++
include/libvirt/libvirt-domain.h | 26 ++++++++++++
src/conf/domain_event.c | 91 +++++++++++++++++++++++++++++++++++++++-
src/conf/domain_event.h | 12 ++++++
src/libvirt-domain.c | 4 +-
src/libvirt_private.syms | 2 +
src/qemu/qemu_domain.c | 25 +++++++++++
src/qemu/qemu_domain.h | 4 ++
src/qemu/qemu_driver.c | 4 +-
src/qemu/qemu_migration.c | 74 ++++++++++++++++++++------------
src/qemu/qemu_process.c | 20 ++++++---
src/remote/remote_driver.c | 43 +++++++++++++++++++
src/remote/remote_protocol.x | 15 ++++++-
src/remote_protocol-structs | 10 +++++
tools/virsh-domain.c | 28 +++++++++++++
15 files changed, 363 insertions(+), 35 deletions(-)
--
2.7.2
8 years, 10 months
[libvirt] [PATCH 0/4] libxl: support qemu's network-based block backends
by Jim Fehlig
xl/libxl already supports qemu's network-based block backends
such as nbd and rbd. libvirt has supported configuring network
disks for long time too. This series marries the two in the
libxl driver and in the xl<->xml converter. Only rbd supported
is added in this series. Support for other backends such as nbd
and iscsi can be added as a follow-up improvement.
Patch 1 is super trivial and contains no functional changes.
Patch 2 changes the xl disk configuration produced by the
xml->xl converter to use the formal key=value syntax described
in xl-disk-configuration.txt.
Patch 3 adds support for converting rbd info between xl and xml
config formats.
Patch 4 adds support for rbd disks in the libxl driver.
Jim Fehlig (4):
xenconfig: replace text 'xm' with 'xl' in xlconfigtest
xenconfig: produce key=value disk config syntax in xl formatter
xenconfig: support xl<->xml conversion of rbd disk devices
libxl: add support for rbd qdisk
src/libxl/libxl_conf.c | 192 ++++++++++++++++++++-
src/xenconfig/xen_xl.c | 168 ++++++++++++++++--
.../test-disk-positional-parms-full.cfg | 26 +++
.../test-disk-positional-parms-full.xml | 54 ++++++
.../test-disk-positional-parms-partial.cfg | 26 +++
.../test-disk-positional-parms-partial.xml | 54 ++++++
.../test-fullvirt-direct-kernel-boot.cfg | 2 +-
tests/xlconfigdata/test-fullvirt-multiusb.cfg | 2 +-
tests/xlconfigdata/test-new-disk.cfg | 2 +-
tests/xlconfigdata/test-paravirt-cmdline.cfg | 2 +-
tests/xlconfigdata/test-paravirt-maxvcpus.cfg | 2 +-
tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 26 +++
tests/xlconfigdata/test-rbd-multihost-noauth.xml | 51 ++++++
tests/xlconfigdata/test-spice-features.cfg | 2 +-
tests/xlconfigdata/test-spice.cfg | 2 +-
tests/xlconfigdata/test-vif-rate.cfg | 2 +-
tests/xlconfigtest.c | 37 ++--
17 files changed, 610 insertions(+), 40 deletions(-)
create mode 100644 tests/xlconfigdata/test-disk-positional-parms-full.cfg
create mode 100644 tests/xlconfigdata/test-disk-positional-parms-full.xml
create mode 100644 tests/xlconfigdata/test-disk-positional-parms-partial.cfg
create mode 100644 tests/xlconfigdata/test-disk-positional-parms-partial.xml
create mode 100644 tests/xlconfigdata/test-rbd-multihost-noauth.cfg
create mode 100644 tests/xlconfigdata/test-rbd-multihost-noauth.xml
--
2.6.1
8 years, 10 months
[libvirt] [PATCH 0/5] Use virtlogd for chardevs & support logging
by Daniel P. Berrange
This series of patches does two things
* Converts the type=file chardev over to use virtlogd
(assuming use of virtlogd is enabled in qemu.conf)
* Adds a <log file="..."/> element to all chardev
sources, allowing data to be captured to a logfile
Both of these are important features wanted by openstack.
The first thing fixes a long standing security issue that
a guest OS can trivially exhuast host disk space by outputing
lots of data to its serial port.
The second thing allows OpenStack to record boot up
messages for a guest's serial console, while still
allowing interactive serial console ussage. ie the
serial port will be configured with type=tcp, and
the new <log> element used to record the data.
Both these thing required changes in QEMU, which have
been merged for the forthcoming QEMU 2.6 release.
Daniel P. Berrange (5):
logging: allow inode/offset params to be NULL
conf: allow use of a logfile with chardev backends
qemu: add support for logging chardev output to a file
qemu: use virtlogd for character device log files
qemu: support use of virtlogd with file based chardevs
docs/schemas/domaincommon.rng | 12 +
src/conf/domain_conf.c | 28 ++
src/conf/domain_conf.h | 2 +
src/logging/log_daemon_dispatch.c | 3 +-
src/logging/log_handler.c | 6 +-
src/logging/log_handler.h | 2 +-
src/logging/log_manager.c | 6 +-
src/logging/log_manager.h | 2 +
src/logging/log_protocol.x | 4 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 295 ++++++++++++++-------
src/qemu/qemu_command.h | 7 +-
src/qemu/qemu_domain.c | 6 +
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_process.c | 4 +-
.../qemuxml2argv-serial-file-log.args | 25 ++
.../qemuxml2argv-serial-file-log.xml | 39 +++
tests/qemuxml2argvtest.c | 4 +-
20 files changed, 350 insertions(+), 103 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-file-log.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-file-log.xml
--
2.5.0
8 years, 10 months
[libvirt] [PATCH 0/9] fix thread related controllers in cgroups
by Henning Schild
This series picks up the cgroups work i started earlier. My initial
patches got in and later reverted before 1.3.1.
The problem the series is solving is about qemu-threads becoming
runnable on pcpus outside the pinning masks configured for the
machine. That only happens for a short time before the thread is
moved to its final cpuset. But it can disturb other load on the
system or can lead to qemu never starting. (qemu main thread
ends up on a pcpu with busy high prio rt-task).
The problem in the original series was the lack of understanding
that one virCgroup can cover all controllers. Instead of just touching
cpusets the patches had side effects on all the other controllers
(memory, blkio etc.) Again the general idea is to put all threads
right into the correct cgroups and to not move them around. But this
series touches only the cpu, cpuset, and cpuacct controllers. That are
the ones relevant to threads and that are the controllers the
threading sub-groups have mounted.
Patches 1, 2, and 9 deal with asserting correct behaviour. They are
optional. But given the complexity of the "bringup" and the importance
of getting that right, i think they should go in as well!
The tricky bits are in patches 5 and 8, i kept them as simple as
possible.
The series is based on v1.3.1.
Henning Schild (9):
vircgroup: one central point for adding tasks to cgroups
vircgroup: add assertion to allow cgroup controllers to stay empty
vircgroup: introduce controller mask for threads
util: cgroups do not implicitly add task to new machine cgroup
qemu_cgroup: put qemu right into emulator sub-cgroup
qemu_cgroup: use virCgroupAddTask instead of virCgroupMoveTask
vircgroup: add controller mask to virCgroupAddTask
qemu_cgroup: dont put qemu main thread into wrong cgroup
qemu_cgroup: assert threading cgroup layout for machine cgroup
src/libvirt_private.syms | 3 +-
src/lxc/lxc_cgroup.c | 11 ++++
src/lxc/lxc_controller.c | 4 +-
src/qemu/qemu_cgroup.c | 30 +++++++--
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_process.c | 8 +--
src/util/vircgroup.c | 155 ++++++++---------------------------------------
src/util/vircgroup.h | 13 +++-
src/util/vircgrouppriv.h | 1 +
9 files changed, 81 insertions(+), 146 deletions(-)
--
2.4.10
8 years, 10 months
[libvirt] [PATCH 0/2] Fix some issues in storage driver error paths
by John Ferlan
While working through the pool driver, I found a couple of issues in
error paths for the storage driver.
John Ferlan (2):
storage: Fix error path in virStoragePoolObjLoad
storage: Fix error path in storagePoolDefineXML
src/conf/storage_conf.c | 4 ++--
src/storage/storage_driver.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
--
2.5.0
8 years, 10 months
[libvirt] [PATCH] docs: formatdomain: Document "spice" as a valid value for <graphics type=..>
by Richard W.M. Jones
Trivial documentation fix.
Signed-off-by: Richard W.M. Jones <rjones(a)redhat.com>
---
docs/formatdomain.html.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index a524c17..5016772 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4891,7 +4891,8 @@ qemu-kvm -net nic,model=? /dev/null
<dl>
<dt><code>graphics</code></dt>
<dd>The <code>graphics</code> element has a mandatory <code>type</code>
- attribute which takes the value "sdl", "vnc", "rdp" or "desktop":
+ attribute which takes the value "sdl", "vnc", "spice", "rdp" or
+ "desktop":
<dl>
<dt><code>"sdl"</code></dt>
<dd>
--
2.5.0
8 years, 10 months
[libvirt] [PATCHv2 0/5] Fix machine type parsing regressions
by Ján Tomko
Patch 2/5 is the important one, fixing persistent non-QEMU domains.
Ján Tomko (5):
testCompareDomXML2XMLFiles: add parseFlags parameter
Revert "Error out on missing machine type in machine configs"
tests: add a test for persistent LXC XML parsing
tests: add parseFlags to qemuxml2argvtest
qemu: error out on missing machine type in configs
src/conf/domain_conf.c | 6 ---
src/qemu/qemu_domain.c | 6 +++
tests/bhyvexml2xmltest.c | 2 +-
tests/genericxml2xmltest.c | 2 +-
tests/lxcxml2xmltest.c | 14 ++++---
.../qemuxml2argv-missing-machine.xml | 30 +++++++++++++++
tests/qemuxml2argvtest.c | 43 ++++++++++++++--------
tests/qemuxml2xmltest.c | 4 +-
tests/testutils.c | 5 ++-
tests/testutils.h | 3 +-
10 files changed, 83 insertions(+), 32 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-missing-machine.xml
--
2.4.10
8 years, 10 months
[libvirt] [PATCH] virfile: properly detect NFS storage
by Pavel Hrdina
Commit 35847860 introduced virFileUnlink() to fix an issue with deleting
volumes on NFS root-squashed environment. This patch replace the uid
and gid magic by virFileIsSharedFSType() to correctly detect that the
volume is on NFS storage.
This fixes the referenced bug. To reproduce this bug follow those
steps on a domain with local storage:
virsh start $domain
virsh pool-refresh $pool
virsh destroy $domain
virsh vol-delete $volume $pool
The thing is, that the pool-refresh will store qemu:qemu as uid:gid for
that volume and after destroy the volume is relabeled back to root:root.
Then you run vol-delete and the virFileRemove() function will try to
unlink the file as a qemu:qemu process based on the uid and gid magic.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260356
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/virfile.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index f45e18f..f9c5bb1 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -2334,13 +2334,16 @@ virFileRemove(const char *path,
int status = 0, ret = 0;
gid_t *groups;
int ngroups;
+ int rc;
/* If not running as root or if a non explicit uid/gid was being used for
* the file/volume or the explicit uid/gid matches, then use unlink directly
*/
- if ((geteuid() != 0) ||
- ((uid == (uid_t) -1) && (gid == (gid_t) -1)) ||
- (uid == geteuid() && gid == getegid())) {
+ rc = virFileIsSharedFSType(path, VIR_FILE_SHFS_NFS);
+ if (rc < 0)
+ return -EINVAL;
+
+ if (rc == 0) {
if (virFileIsDir(path))
return rmdir(path);
else
--
2.7.1
8 years, 10 months