Re: [libvirt] [PATCH] virnettlscontexttest fails with GNUTLS 3.0.28

2013-12-20 Thread Cedric Bosdonnat
Hi Eric, On Thu, 2013-12-19 at 13:42 -0700, Eric Blake wrote: -DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename, GNUTLS_VERSION_MAJOR = 3); +DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename, +GNUTLS_VERSION_MAJOR = 3

Re: [libvirt] [PATCH] Fix explicit usage of default video PCI slots

2013-12-20 Thread Laine Stump
On 12/19/2013 07:41 PM, Ján Tomko wrote: On 12/19/2013 06:18 PM, Jiri Denemark wrote: On Thu, Dec 19, 2013 at 17:43:33 +0100, Jano Tomko wrote: Don't set the PCI address of primary video to the default if it's already occupied by another device. Without this, a primary video card that

Re: [libvirt] JNA Error Callback could cause core dump.

2013-12-20 Thread Claudio Bley
Sorry, I must have taken some bad pills. Just realized that I replied to a message already more than a year old. I swear my MUA displayed it as new... At Thu, 19 Dec 2013 16:55:58 +0100, Claudio Bley wrote: At Thu, 18 Oct 2012 15:48:22 +, Benjamin Wang (gendwang) wrote: -- AV-Test GmbH,

Re: [libvirt] Segfault in libxl_osevent_occurred_timeout [Was: Re: [libvirt-users] About debugging of libvirt.]

2013-12-20 Thread cool dharma06
thanks to all and that is working with libvirt-1.2.0 and xen-4.3.1. thanks to all people for their valuable suggestions. regards, cooldharma06. On Thu, Dec 19, 2013 at 5:01 PM, Dario Faggioli dario.faggi...@citrix.comwrote: [Moving this to libvir, libvir-users in Bcc. Also, added xen-devel]

[libvirt] [BUG] pinvcpu before migration

2013-12-20 Thread Wangyufei (James)
hi , I am confused by pinvcpu before migration. I have two physical machine. One has 12 CPUs (E5645 2*6 ) as src and the other has 8 CPUs (2*4) as des. Step 1 : VM is running on src host (E5645 2*6 CPUs) with its VCPUs pinned on some PCPUs Step 2 :Because PCPU count is different between src

Re: [libvirt] [PATCH 1/1] virsh nodecpustats erroneously returns stats for offline cpus on Linux

2013-12-20 Thread Pradipta Kumar Banerjee
[snip] for (i = 0; i *nparams; i++) { virNodeCPUStatsPtr param = params[i]; What about this? diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 1838547..aa1ad81 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -637,8 +637,9 @@ linuxNodeGetCPUStats(FILE

Re: [libvirt] [Xen-devel] Setting devid for emulated NICs (Xen 4.3.1 / libvirt 1.2.0) using libxl driver

2013-12-20 Thread Ian Campbell
On Thu, 2013-12-19 at 11:39 -0700, Jim Fehlig wrote: Stefan Bader wrote: Oh, just while talking about setdefault. Jim, this is one of the odd things when moving from xm to xl stack from libvirt: libvirt defaults to the netfront NIC when no model is specified and sets the type. The

Re: [libvirt] [Xen-devel] Setting devid for emulated NICs (Xen 4.3.1 / libvirt 1.2.0) using libxl driver

2013-12-20 Thread Stefan Bader
On 19.12.2013 18:57, Ian Campbell wrote: On Thu, 2013-12-19 at 18:06 +0100, Stefan Bader wrote: How about we: * move the init to setdefault to catch the single NIC added via hotplug case Init of devid? Yes, sorry for not being clear. Hm, would that work as I am not sure

Re: [libvirt] [PATCH] virnettlscontexttest fails with GNUTLS 3.0.28

2013-12-20 Thread Daniel P. Berrange
On Thu, Dec 19, 2013 at 01:42:37PM -0700, Eric Blake wrote: On 12/19/2013 09:23 AM, Cédric Bosdonnat wrote: Changed the constraints on gnutls to 3.1+ --- tests/virnettlscontexttest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/virnettlscontexttest.c

Re: [libvirt] [PATCH] Fix explicit usage of default video PCI slots

2013-12-20 Thread Daniel P. Berrange
On Fri, Dec 20, 2013 at 10:17:22AM +0200, Laine Stump wrote: On 12/19/2013 07:41 PM, Ján Tomko wrote: On 12/19/2013 06:18 PM, Jiri Denemark wrote: On Thu, Dec 19, 2013 at 17:43:33 +0100, Jano Tomko wrote: Don't set the PCI address of primary video to the default if it's already occupied

Re: [libvirt] [Xen-devel] Setting devid for emulated NICs (Xen 4.3.1 / libvirt 1.2.0) using libxl driver

2013-12-20 Thread Ian Campbell
On Fri, 2013-12-20 at 11:16 +0100, Stefan Bader wrote: One issue is that xl stored the guest config and then retrieves it for use in xl list -l, but libvirt != xl and therefore has no config file to save. Right, that kind of was what I tried to say in many words. :) Oh, hm probably with

[libvirt] [PATCH 1/2] CVE-2013-6436: fix crash in lxcDomainGetMemoryParameters

2013-12-20 Thread Daniel P. Berrange
From: Martin Kletzander mklet...@redhat.com The function doesn't check whether the request is made for active or inactive domain. Thus when the domain is not running it still tries accessing non-existing cgroups (priv-cgroup, which is NULL). I re-made the function in order for it to work the

[libvirt] [PATCH 0/2] Fix crash handling memory parameters in LXC

2013-12-20 Thread Daniel P. Berrange
The first of these 2 issues is a security issue CVE-2013-6436 Both patches have been pushed to GIT master. Martin Kletzander (2): CVE-2013-6436: fix crash in lxcDomainGetMemoryParameters Fix crash in lxcDomainSetMemoryParameters src/lxc/lxc_driver.c | 153

[libvirt] [PATCH 2/2] Fix crash in lxcDomainSetMemoryParameters

2013-12-20 Thread Daniel P. Berrange
From: Martin Kletzander mklet...@redhat.com The function doesn't check whether the request is made for active or inactive domain. Thus when the domain is not running it still tries accessing non-existing cgroups (priv-cgroup, which is NULL). I re-made the function in order for it to work the

Re: [libvirt] [PATCH] virnettlscontexttest fails with GNUTLS 3.0.28

2013-12-20 Thread Eric Blake
On 12/20/2013 03:16 AM, Daniel P. Berrange wrote: What distro were you on when you hit this failure? I'm a little bit reluctant to bump the minimum requirement without knowing a bit more about how common 3.0 is in practice. Adding more details in your commit log about why you needed it (not

Re: [libvirt] [PATCH 0/3] PCI device assignment bugfixes

2013-12-20 Thread Jiri Denemark
On Thu, Dec 19, 2013 at 16:53:17 +0200, Laine Stump wrote: These were all found as a result of researching Bug 1035490. Patch 1 fixes the originally reported problem, Patch 2 fixes the cause of incorrect error reporting in a later comment of that bug, and Patch 3 fixes a behavior that I

Re: [libvirt] [BUG] pinvcpu before migration

2013-12-20 Thread Dario Faggioli
On ven, 2013-12-20 at 09:09 +, Wangyufei (James) wrote: hi , I am confused by pinvcpu before migration. I have two physical machine. One has 12 CPUs (E5645 2*6 ) as src and the other has 8 CPUs (2*4) as des. Step 1 : VM is running on src host (E5645 2*6 CPUs) with its VCPUs pinned on

Re: [libvirt] [PATCH 1/3] libxl: implement virDomainGetVcpuPinInfo

2013-12-20 Thread Dario Faggioli
On gio, 2013-12-19 at 21:32 -0700, Jim Fehlig wrote: Signed-off-by: Dario Faggioli dario.faggi...@citrix.com Cc: Jim Fehlig jfeh...@suse.com Cc: Ian Jackson ian.jack...@eu.citrix.com --- src/libxl/libxl_driver.c | 83 ++ 1 file changed,

Re: [libvirt] [PATCH v3 2/4] conf: add support for panic device

2013-12-20 Thread John Ferlan
On 12/09/2013 04:11 AM, Hu Tao wrote: ...snip... +static bool +virDomainPanicCheckABIStability(virDomainPanicDefPtr src, +virDomainPanicDefPtr dst) +{ +return virDomainDeviceInfoCheckABIStability(src-info, dst-info); +} + These changes have

Re: [libvirt] [PATCH v3 2/4] conf: add support for panic device

2013-12-20 Thread Eric Blake
On 12/20/2013 06:59 AM, John Ferlan wrote: On 12/09/2013 04:11 AM, Hu Tao wrote: ...snip... +static bool +virDomainPanicCheckABIStability(virDomainPanicDefPtr src, +virDomainPanicDefPtr dst) +{ +return

[libvirt] SECURITY: CVE-2013-6436: libvirtd daemon crash when reading memory tunables for LXC guest in shutoff status

2013-12-20 Thread Daniel P. Berrange
Libvirt Security Notice === Summary: libvirtd daemon crash when reading memory tunables for LXC guest in shutoff status Reported on: 20131209 Published on: 20131220 Fixed on: 20131220 Reported by: Martin Kletzander mklet

Re: [libvirt] [PATCH v3 2/4] conf: add support for panic device

2013-12-20 Thread Daniel P. Berrange
On Fri, Dec 20, 2013 at 07:11:00AM -0700, Eric Blake wrote: On 12/20/2013 06:59 AM, John Ferlan wrote: On 12/09/2013 04:11 AM, Hu Tao wrote: ...snip... +static bool +virDomainPanicCheckABIStability(virDomainPanicDefPtr src, +

[libvirt] [PATCH v2 0/3] libxl: improve vcpu pinning

2013-12-20 Thread Dario Faggioli
Hi, Take two, with the comments from Jim on v1 fixed. Basically, that means I've added a few comments and removed some non necessary safety checking. Series available here: git://xenbits.xen.org/people/dariof/libvirt.git libxl/VcpuPinX-v2 Regards, Dario --- Dario Faggioli (3): libxl:

[libvirt] [PATCH v2 1/3] libxl: implement virDomainGetVcpuPinInfo

2013-12-20 Thread Dario Faggioli
So that it is possible to query vcpu related information of a persistent but not running domain, like it is for the QEMU driver. In fact, before this patch, we have: # virsh list --all IdName State 5

[libvirt] [PATCH v2 3/3] libxl: correctly handle affinity reset in virDomainPinVcpu[Flags]

2013-12-20 Thread Dario Faggioli
By actually removing the vcpupin element (from within the cputune section) from the XML, rather than jus update it with a fully set vcpu affinity mask. Signed-off-by: Dario Faggioli dario.faggi...@citrix.com Cc: Jim Fehlig jfeh...@suse.com Cc: Ian Jackson ian.jack...@eu.citrix.com ---

[libvirt] [PATCH v2 2/3] libxl: implement virDomainPinVcpuFlags

2013-12-20 Thread Dario Faggioli
And use it to implement libxlDomainPinVcpu(), similarly to what happens in the QEMU driver. This way, it is possible to both query and change the vcpu affinity of a persistent but not running domain. In face, before this patch, we have: # virsh list --all IdName

[libvirt] [PATCH] libxl: avoid crashing if calling `virsh numatune' on inactive domain

2013-12-20 Thread Dario Faggioli
by, in libxlDomainGetNumaParameters(), calling libxl_bitmap_init() as soon as possible, which avoids getting to 'cleanup:', where libxl_bitmap_dispose() happens, without having initialized the nodemap, and hence crashing after some invalid free()-s: # ./daemon/libvirtd -v *** Error in

[libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v3

2013-12-20 Thread Reco
Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. --- src/libvirt_private.syms |1 + src/util/virprocess.c| 63 ++ src/util/virprocess.h|6 + 3 files

[libvirt] [PATCH 2/2] Implementation deficiency in virInitctlSetRunLevel v3

2013-12-20 Thread Reco
Use helper virProcessRunInMountNamespace in lxcDomainShutdownFlags and lxcDomainReboot. --- src/lxc/lxc_driver.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index e5298d1..7f4acbe

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v3

2013-12-20 Thread Daniel P. Berrange
On Fri, Dec 20, 2013 at 07:39:21PM +0400, Reco wrote: diff --git a/src/util/virprocess.c b/src/util/virprocess.c index 9fc3207..2e8535e 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -31,6 +31,7 @@ # include sys/resource.h #endif #include sched.h +#include stdlib.h

Re: [libvirt] [PATCH 2/2] Implementation deficiency in virInitctlSetRunLevel v3

2013-12-20 Thread Daniel P. Berrange
On Fri, Dec 20, 2013 at 07:42:28PM +0400, Reco wrote: Use helper virProcessRunInMountNamespace in lxcDomainShutdownFlags and lxcDomainReboot. --- src/lxc/lxc_driver.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) diff --git

[libvirt] [PATCH 2/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Reco
Use helper virProcessRunInMountNamespace in lxcDomainShutdownFlags and lxcDomainReboot. --- src/lxc/lxc_driver.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index e5298d1..2385f5b

[libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Reco
Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. Hope it'll nail it this time. --- src/libvirt_private.syms |1 + src/util/virprocess.c| 63 ++ src/util/virprocess.h

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Daniel P. Berrange
On Fri, Dec 20, 2013 at 08:24:41PM +0400, Reco wrote: Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. Hope it'll nail it this time. --- src/libvirt_private.syms |1 + src/util/virprocess.c| 63

Re: [libvirt] [PATCH 2/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Daniel P. Berrange
On Fri, Dec 20, 2013 at 08:24:52PM +0400, Reco wrote: Use helper virProcessRunInMountNamespace in lxcDomainShutdownFlags and lxcDomainReboot. --- src/lxc/lxc_driver.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) diff --git

Re: [libvirt] [RFC PATCH] qemu: new API for tracking arbitrary monitor events

2013-12-20 Thread Michal Privoznik
On 19.12.2013 21:36, Eric Blake wrote: On 12/19/2013 09:01 AM, Daniel P. Berrange wrote: +typedef void (*virConnectDomainQemuMonitorEventCallback)(virConnectPtr conn, + virDomainPtr dom, +

Re: [libvirt] [RFC PATCH] qemu: new API for tracking arbitrary monitor events

2013-12-20 Thread Eric Blake
On 12/20/2013 09:41 AM, Michal Privoznik wrote: Ooh, just noticed that the timestamp is not part of the event data; probably worth adding another parameter to the callback function to list the event timestamp (as knowing when qemu fired an event may indeed be important to a developer using

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Eric Blake
On 12/20/2013 09:24 AM, Reco wrote: Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. Hope it'll nail it this time. This comment doesn't fit in the commit message; it's better to put review comments... --- ...here,

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Reco
Hi. On Fri, 20 Dec 2013 10:48:39 -0700 Eric Blake ebl...@redhat.com wrote: On 12/20/2013 09:24 AM, Reco wrote: Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. Hope it'll nail it this time. This comment

[libvirt] [PATCH] PanicCheckABIStability: Need to check for existence

2013-12-20 Thread John Ferlan
Commit id '4313fead' added a call to virDomainPanicCheckABIStability() which did not check whether the panic device existed before making a call to virDomainDeviceInfoCheckABIStability() which ended up segfaulting: Thread 1 (Thread 0x7f5332837700 (LWP 10964)): (src=optimized out,

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Eric Blake
On 12/20/2013 09:34 AM, Daniel P. Berrange wrote: On Fri, Dec 20, 2013 at 08:24:41PM +0400, Reco wrote: Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. Hope it'll nail it this time. Fails 'make syntax-check':

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Eric Blake
On 12/20/2013 10:53 AM, Reco wrote: At any rate, since Dan has ack'ed it, and it fixes a CVE (where we're still waiting for the number to be assigned, but the flaw is real), I'll go ahead and push this soon. Thank you for the advices, Eric, sorry I didn't followed'em to the letter. It

Re: [libvirt] [PATCH] libxl: avoid crashing if calling `virsh numatune' on inactive domain

2013-12-20 Thread Jim Fehlig
Dario Faggioli wrote: by, in libxlDomainGetNumaParameters(), calling libxl_bitmap_init() as soon as possible, which avoids getting to 'cleanup:', where libxl_bitmap_dispose() happens, without having initialized the nodemap, and hence crashing after some invalid free()-s: Yikes! ACK to

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Reco
You still haven't answered my query from an earlier version: we prefer to list a legal name in the authorship of git commits (after all, copyleft licenses work _because_ of copyright law, but the law prefers working with full names rather than nicknames). Is there something that I should

Re: [libvirt] [PATCH] PanicCheckABIStability: Need to check for existence

2013-12-20 Thread Eric Blake
On 12/20/2013 11:10 AM, John Ferlan wrote: Commit id '4313fead' added a call to virDomainPanicCheckABIStability() which did not check whether the panic device existed before making a call to virDomainDeviceInfoCheckABIStability() which ended up segfaulting: Signed-off-by: John Ferlan

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Eric Blake
On 12/20/2013 11:40 AM, Reco wrote: You still haven't answered my query from an earlier version: we prefer to list a legal name in the authorship of git commits (after all, copyleft licenses work _because_ of copyright law, but the law prefers working with full names rather than nicknames).

Re: [libvirt] [PATCH] libxl: fix segfault when domain create fail

2013-12-20 Thread Jim Fehlig
Bamvor Jian Zhang wrote: there is a segfault in libxl logging in libxl_ctx_free when domain create fail. because the log output handler vmessage is freed by xtl_logger_destroy before libxl_ctx_free in virDomainObjListRemove. move xtl_logger_destroy after libxl_ctx_free could fix this bug.

Re: [libvirt] [PATCH 2/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Eric Blake
On 12/20/2013 09:24 AM, Reco wrote: Use helper virProcessRunInMountNamespace in lxcDomainShutdownFlags and lxcDomainReboot. This fails to compile, due to [1] below: CCLD libvirt_lxc lxc/lxc_driver.c:2783:1: error: return type defaults to 'int' [-Werror] virDomainRebootCallback(pid_t

Re: [libvirt] [PATCH 2/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Eric Blake
On 12/20/2013 01:41 PM, Eric Blake wrote: On 12/20/2013 09:24 AM, Reco wrote: Use helper virProcessRunInMountNamespace in lxcDomainShutdownFlags and lxcDomainReboot. static int +virDomainShutdownCallback(pid_t pid ATTRIBUTE_UNUSED, + void *opaque ATTRIBUTE_UNUSED)

[libvirt] [PATCH 1/5] qemu: Do not access stale data in virDomainBlockStats

2013-12-20 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1043069 When virDomainDetachDeviceFlags is called concurrently to virDomainBlockStats: libvirtd may crash because qemuDomainBlockStats finds a disk in vm-def before getting a job on a domain and uses the disk pointer after getting the job. However, the

[libvirt] [PATCH 5/5] qemu: Fix job usage in virDomainGetBlockIoTune

2013-12-20 Thread Jiri Denemark
Every API that is going to begin a job should do that before fetching data from vm-def. Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/qemu/qemu_driver.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt] [PATCH 2/5] qemu: Avoid using stale data in virDomainGetBlockInfo

2013-12-20 Thread Jiri Denemark
Generally, every API that is going to begin a job should do that before fetching data from vm-def. However, qemuDomainGetBlockInfo does not know whether it will have to start a job or not before checking vm-def. To avoid using disk alias that might have been freed while we were waiting for a job,

[libvirt] [PATCH 0/5] qemu: Fix job usage in several APIs

2013-12-20 Thread Jiri Denemark
When fixing https://bugzilla.redhat.com/show_bug.cgi?id=1043069 I realized qemuDomainBlockStats is not the only API that does not acquire a job early enough. Generally, every API that is going to begin a job should do that before fetching data from vm-def. The following 5 APIs failed to do so and

[libvirt] [PATCH 3/5] qemu: Fix job usage in qemuDomainBlockJobImpl

2013-12-20 Thread Jiri Denemark
Every API that is going to begin a job should do that before fetching data from vm-def. Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/qemu/qemu_driver.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 4/5] qemu: Fix job usage in qemuDomainBlockCopy

2013-12-20 Thread Jiri Denemark
Every API that is going to begin a job should do that before fetching data from vm-def. Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/qemu/qemu_driver.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCHv6 3/3] domain: conf: Fix secret type checking

2013-12-20 Thread Adam Walters
This patch fixes the secret type checking done in the virDomainDiskDefParseXML function. Previously, it would not allow any volumes that utilized a secret. This patch is a simple bypass of the checking code for volumes. Signed-off-by: Adam Walters a...@pandorasboxen.com ---

[libvirt] [PATCHv6 2/3] qemu: conf: Implement RBD storage pool support

2013-12-20 Thread Adam Walters
This patch modifies the qemuTranslateDiskSourcePool function to add RBD storage pool support. The code is heavily based off of the existing iSCSI code, but modified for RBD support. The modification calls the qemuAddRBDPoolSourceHost from my previous patch, along with setting up the ceph user

[libvirt] [PATCHv6 0/3] Implement RBD storage pool support

2013-12-20 Thread Adam Walters
Here is a re-based re-submission of my patches to implement RBD storage pool support for QEMU domains. Nothing in it has changed other than it has been rebased against the latest. The race condition I located still exists, but I have some patches forthcoming to address that issue. The code here

[libvirt] [PATCHv6 1/3] qemu: conf: Implement qemuAddRBDPoolSourceHost function

2013-12-20 Thread Adam Walters
This function is a helper function that grabs RBD hosts from a storage pool definition, and applies them to the domain's disk defi nitions at runtime. This is a pre-requisite for RBD storage pool support in the domain XML. Signed-off-by: Adam Walters a...@pandorasboxen.com ---

[libvirt] [RFC PATCH 3/7] virterror: Adding a new VIR_FROM_ define

2013-12-20 Thread Adam Walters
This patch adds VIR_FROM_CONFIG to the virErrorDomain enum. Both of these files must be patched in unison to prevent compilation failures. Signed-off-by: Adam Walters a...@pandorasboxen.com --- include/libvirt/virterror.h | 2 ++ src/util/virerror.c | 2 ++ 2 files changed, 4

[libvirt] [RFC PATCH 2/7] config: Adding header for the config driver

2013-12-20 Thread Adam Walters
This is the header file for the config driver. Signed-off-by: Adam Walters a...@pandorasboxen.com --- src/config/config_driver.h | 44 1 file changed, 44 insertions(+) create mode 100644 src/config/config_driver.h diff --git

[libvirt] [RFC PATCH 4/7] libvirtd: Add config driver hooks

2013-12-20 Thread Adam Walters
This patch adds the config driver hooks and moves the secret driver hook definitions higher on the list. The secret driver move isn't strictly needed, but the comments state that these should be in preferred load order. Since other drivers might utilize the secret driver, it makes sense to have

[libvirt] [RFC PATCH 0/7] Adding 'config' driver

2013-12-20 Thread Adam Walters
This patchset adds a driver named 'config' that allows access to configuration data, such as secret and storage definitions. This is a pre-requisite for my next patchset which resolves the race condition on libvirtd startup and the circular dependencies between QEMU and the storage driver. The

[libvirt] [RFC PATCH 1/7] config: Adding source for the config driver

2013-12-20 Thread Adam Walters
This is the source code to the config driver. This driver is a hypervisor driver that does not support any domain operations. The sole purpose of this driver is to allow access to various bits of configuration information, such as secret or network definitions, from the initialization and

[libvirt] [RFC PATCH 6/7] configure: Add config driver to configure script

2013-12-20 Thread Adam Walters
This conditionally enables compilation of the config driver based on if we are building libvirtd or not. Since this is only needed for hypervisor modules during libvirtd startup, we don't need to bother compiling the config driver when only building the client. Signed-off-by: Adam Walters

[libvirt] [RFC PATCH 1/3] driver: Implement new state driver field

2013-12-20 Thread Adam Walters
This implements a new field in the virStateDriver struct. In order to prevent possible compilation issues, this patch also implements te new field in all of the existing drivers. Other than in driver.h, the changes are all a single line addition to the files. Signed-off-by: Adam Walters

[libvirt] [RFC PATCH 5/7] po: Add config_driver.c to POTFILES.in

2013-12-20 Thread Adam Walters
Adding config_driver.c to POTFILES.in to fix a syntax-check error. Signed-off-by: Adam Walters a...@pandorasboxen.com --- po/POTFILES.in | 1 + 1 file changed, 1 insertion(+) diff --git a/po/POTFILES.in b/po/POTFILES.in index 49dfc9c..0e23610 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@

[libvirt] [RFC PATCH 7/7] Makefile: Add config driver to src/Makefile.am

2013-12-20 Thread Adam Walters
This completes the addition of the config driver to libvirt. The final piece here is to add the config driver into the Makefile (via automake) so that the driver is actually compiled and linked. Signed-off-by: Adam Walters a...@pandorasboxen.com --- src/Makefile.am | 25

[libvirt] [RFC PATCH 2/3] storage: Fix hardcoded qemu connection

2013-12-20 Thread Adam Walters
This utilizes the config driver I submitted to resolve the hardcoded qemu connection string. With this, the storage driver no longer has a circular dependency with QEMU. Without this patch, when libvirtd is restarted, QEMU requires storage (when domains are using storage pool backings) and

[libvirt] [RFC PATCH 0/3] Implement two-tier driver loading

2013-12-20 Thread Adam Walters
This patchset implements a two-tier driver loading system. I split the hypervisor drivers out into their own tier, which is loaded after the other drivers. This has the net effect of ensuring that things like secrets, networks, etc., are initialized and auto-started before any hypervisors, such

[libvirt] [RFC PATCH 3/3] libvirt: Implement two-tier driver loading

2013-12-20 Thread Adam Walters
This implements a two-tier driver loading system into libvirt. The two classes of drivers are Libvirt drivers and Hypervisor drivers. Hypervisor drivers are fairly self-explanatory, they provide domain services. Libvirt drivers are sort of the backend drivers for those, like the secret and

Re: [libvirt] [PATCH 1/5] qemu: Do not access stale data in virDomainBlockStats

2013-12-20 Thread Eric Blake
On 12/20/2013 02:36 PM, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1043069 When virDomainDetachDeviceFlags is called concurrently to virDomainBlockStats: libvirtd may crash because qemuDomainBlockStats finds a disk in vm-def before getting a job on a domain and uses the

Re: [libvirt] [PATCH 1/1] virsh nodecpustats erroneously returns stats for offline cpus on Linux

2013-12-20 Thread Bing Bu Cao
On 12/20/2013 05:47 PM, Pradipta Kumar Banerjee wrote: [snip] for (i = 0; i *nparams; i++) { virNodeCPUStatsPtr param = params[i]; What about this? diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 1838547..aa1ad81 100644 --- a/src/nodeinfo.c +++

Re: [libvirt] [PATCH 1/2] Implementation deficiency in virInitctlSetRunLevel v4

2013-12-20 Thread Eric Blake
On 12/20/2013 11:17 AM, Eric Blake wrote: On 12/20/2013 09:34 AM, Daniel P. Berrange wrote: On Fri, Dec 20, 2013 at 08:24:41PM +0400, Reco wrote: Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. Hope it'll nail it this