[libvirt] [PATCH 02/13] tests: Adapt virnetservertest to daemon refactor

2015-06-16 Thread Martin Kletzander
Rename the test to virnetdaemontest and use virNetDaemon objects instead of virNetServer inside. Signed-off-by: Martin Kletzander --- tests/Makefile.am | 10 +- .../{virnetserverdata => virnetdaemondata}/README | 0 .../virnetdaemondata/input-data-admin-nomdn

[libvirt] [PATCH 00/13] Admin API

2015-06-16 Thread Martin Kletzander
This is a real post for an Admin API to get in. Everything discussed in previous posts should be a addressed. I'll start a discussion later on today about the ideas for the APIs to be added and the general near-future desing moves. I'm also keeping the last three example patches in so you can tr

[libvirt] [EXAMPLE PATCH 12/13] admin: Add virAdmHello function

2015-06-16 Thread Martin Kletzander
Just one of the simplest functions that returns string "Clients: X" where X is the number of connected clients to daemon's first subserver (the original one), so it can be tested using virsh, ipython, etc. The subserver is gathered by incrementing its reference counter (similarly to getting qemu c

[libvirt] [PATCH 07/13] Add libvirt-admin library

2015-06-16 Thread Martin Kletzander
Initial scratch of the admin library. It has its own virAdmConnectPtr that inherits from virAbstractConnectPtr and thus trivially supports error reporting. There's pkg-config file added and spec-file adjusted as well. Since the library should be "minimalistic" and not depend on any other library

[libvirt] [EXAMPLE PATCH 13/13] Example virt-admin

2015-06-16 Thread Martin Kletzander
You had only one job. That's what you can say about this example binary. In future, parts of virsh that are usable for this binary should be split into separate shell-utils and virt-admin should gain all the cool features of virsh without too much code addition. Signed-off-by: Martin Kletzander

[libvirt] [PATCH 06/13] Add admin error domain

2015-06-16 Thread Martin Kletzander
Just the addition of VIR_FROM_ADMIN to the enum of error domains. Signed-off-by: Martin Kletzander --- include/libvirt/virterror.h | 3 ++- src/util/virerror.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h i

Re: [libvirt] [PATCH] libxl: rework reference counting

2015-06-16 Thread Anthony PERARD
On Mon, Jun 15, 2015 at 08:36:47PM -0600, Jim Fehlig wrote: > Similar to commit 540c339a for the QEMU driver, rework reference > counting in the libxl driver to make it more deterministic and > the code a bit cleaner. > > Signed-off-by: Jim Fehlig > --- > > I've been testing this patch on and of

[libvirt] [PATCH v2] nodeinfo: fix to parse present cpus rather than possible cpus

2015-06-16 Thread Kothapally Madhu Pavan
Currently we are parsing all the possible cpus to get the nodeinfo. This fix will perform a check for present cpus before parsing. Signed-off-by: Kothapally Madhu Pavan --- src/nodeinfo.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 2

[libvirt] [sandbox v2 1/4] Make sure the sandbox state dir and config can be accessed

2015-06-16 Thread Cédric Bosdonnat
When running a KVM sandbox as root, the qemu process will run as another user (likely qemu). We need to make sure this user can access the vmlinux and initrd.img, sandbox.cfg and mounts.cfg files. --- libvirt-sandbox/libvirt-sandbox-config.c | 2 +- libvirt-sandbox/libvirt-sandbox-con

[libvirt] [sandbox v2 4/4] Add host-image format parameter

2015-06-16 Thread Cédric Bosdonnat
Let the user specify the format of the source disk image in host-image mounts. This will allow us to mount other image types than raw ones. --- .../libvirt-sandbox-builder-container.c| 10 +++ libvirt-sandbox/libvirt-sandbox-builder-machine.c | 9 +++ .../libvirt-sandbox-config-mount

[libvirt] [PATCH v2 0/2] lxc: properly clean up qemu-nbd (resent)

2015-06-16 Thread Cédric Bosdonnat
Just resending the initial patch series as it went into a black hole. > Hi all, > > Here is the very same patch, but split in two patches. Well, I also moved > two comments around between v1 and v2. Cédric Bosdonnat (2): Add virProcessGetPids to get all tasks of a process lxc: properly clean

[libvirt] [PATCH v2 1/2] Add virProcessGetPids to get all tasks of a process

2015-06-16 Thread Cédric Bosdonnat
This function gets all the PIDs listed in /proc/PID/task. This will be needed at least to move all qmeu-nbd tasks to the container cgroup. --- src/libvirt_private.syms | 1 + src/util/virprocess.c| 47 +++ src/util/virprocess.h| 2 ++ 3 files c

[libvirt] [PATCH v2 2/2] lxc: properly clean up qemu-nbd

2015-06-16 Thread Cédric Bosdonnat
Add the qemu-nbd tasks to the container cgroup to make sure those will be killed when the container is stopped. In order to reliably get the qemu-nbd tasks PIDs, we use /sys/devices/virtual/block//pid as qemu-nbd is daemonizing itself. --- src/lxc/lxc_controller.c | 56

[libvirt] [sandbox v2 2/4] Write /dev/vd* instead of vd* in mounts.cfg

2015-06-16 Thread Cédric Bosdonnat
Fixes a regression introduced by d74b4350: the init-qemu tool expects /dev/vd* sources to create the block device, while we were just having vd*. Write again /dev/vd* to mounts.cfg. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[libvirt] [sandbox v2 3/4] qemu: mount all host-images as ext4

2015-06-16 Thread Cédric Bosdonnat
To avoid troubles when mounting ext4 images, hard-code ext4 as mount format instead of ext3. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbo

[libvirt] [sandbox v2 0/4] Getting qemu sandboxes run as root + host-image format

2015-06-16 Thread Cédric Bosdonnat
Hi all, Here are a few patches to make sandboxes run with qemu:///system connection. The last one is just a new feature to allow using somethings else than RAW images in host-image mounts. This feature will later be needed to run docker container using Eren's work. Diff to v1: * Adapted the co

Re: [libvirt] [PATCH v2 0/2] lxc: properly clean up qemu-nbd

2015-06-16 Thread Daniel P. Berrange
On Thu, Jun 11, 2015 at 03:04:33PM +0100, Daniel P. Berrange wrote: > On Wed, Jun 10, 2015 at 04:08:41PM -0400, John Ferlan wrote: > > > > > > On 06/01/2015 09:01 AM, Cédric Bosdonnat wrote: > > > Hi all, > > > > > > Here is the very same patch, but split in two patches. Well, I also moved > > >

[libvirt] [glib v2 4/4] domain config: add API to set the filesystem image format

2015-06-16 Thread Cédric Bosdonnat
Add the gvir_config_domain_filesys_set_driver_format function to allow setting nbd driver type + image format for containers filesystems. --- libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 16 libvirt-gconfig/libvirt-gconfig-domain-filesys.h | 2 ++ libvirt-gconfig/libvirt-gc

[libvirt] [glib v2 1/4] test-gconfig: add filesystem test

2015-06-16 Thread Cédric Bosdonnat
--- tests/test-gconfig.c| 35 + tests/xml/gconfig-domain-device-filesys.xml | 15 + 2 files changed, 50 insertions(+) create mode 100644 tests/xml/gconfig-domain-device-filesys.xml diff --git a/tests/test-gconfig.c b/tests/test-gcon

[libvirt] [glib v2 0/4] Filesystem config improvements

2015-06-16 Thread Cédric Bosdonnat
Hi all, Here is the previous patch split into a series. The difference with v1 are: * it adds test-gconfig test for file systems * the gvir_config_domain_filesys_set_driver_type fix has been moved to its own commit * the gvir_config_domain_filesys_set_driver_format doesn't set the type,

[libvirt] [glib v2 3/4] Add loop and nbd filesystem types

2015-06-16 Thread Cédric Bosdonnat
--- libvirt-gconfig/libvirt-gconfig-domain-filesys.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.h b/libvirt-gconfig/libvirt-gconfig-domain-filesys.h index 4f3973e..4144976 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-filesys.h +++ b

[libvirt] [glib v2 2/4] gvir_config_domain_filesys_set_driver_type: replace the driver node

2015-06-16 Thread Cédric Bosdonnat
Replace the driver node in case the user calls the function more than one time. --- libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c b/libvirt-gconfig/libvirt-gconfig-domain-filesy

Re: [libvirt] Publishing a Python libvirt Howto/Reference Guide

2015-06-16 Thread Daniel P. Berrange
On Mon, Jun 15, 2015 at 10:48:29AM -0500, David Ashley wrote: > All - > > I represent the Fedora Docs Team. We are interested in publishing a Python > libvirt HowTo/Reference Guide for users. We feel that there is a gap with > using virtualization from a scripting environment. While virsh fills th

[libvirt] PING: [PATCH v2 0/2] Allow PCI virtio on ARM "virt" machine

2015-06-16 Thread Pavel Fedin
Hello ? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia > -Original Message- > From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] > On Behalf Of > Pavel Fedin > Sent: Thursday, June 11, 2015 9:41 AM > To: libvir-list@redhat.

Re: [libvirt] Publishing a Python libvirt Howto/Reference Guide

2015-06-16 Thread Michal Privoznik
On 15.06.2015 17:48, David Ashley wrote: > All - > > I represent the Fedora Docs Team. We are interested in publishing a > Python libvirt HowTo/Reference Guide for users. We feel that there is a > gap with using virtualization from a scripting environment. While virsh > fills this gap for simple s

Re: [libvirt] [PATCH v2 3/3] storage: Generate correct parameters for CIFS

2015-06-16 Thread Peter Krempa
On Mon, Jun 15, 2015 at 17:30:37 -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1186969 > > When generating the path to the dir for a CIFS/Samba driver, the code > would generate a source path for the mount using "%s:%s" while the > mount.cifs expects to see "//%s/%s". So

Re: [libvirt] [PATCH v2 2/3] storage: Adjust command arglist for gluster

2015-06-16 Thread Peter Krempa
On Mon, Jun 15, 2015 at 17:30:36 -0400, John Ferlan wrote: > In order for the glusterfs boolean to be set, the pool->def->type must be > VIR_STORAGE_POOL_NETFS, thus the check within virCommandNewArgList whether > pool->def->type is VIR_STORAGE_POOL_FS will never be true, so remove it > > Signed-o

Re: [libvirt] [PATCH v2 1/3] storage: Fix the schema and add tests for cifs pool

2015-06-16 Thread Peter Krempa
On Mon, Jun 15, 2015 at 17:30:35 -0400, John Ferlan wrote: > Commit id '887dd362' added support for a netfs pool format type 'cifs' > and 'gluster' in order to add rng support for Samba and glusterfs netfs > pools. Originally, the CIFS type support was added as part of commit > id '61fb6979'. Event

<    1   2