Re: [libvirt] [PATCH] virlog: Modify virLogParseDefaultPriority's comment of return value

2014-03-20 Thread Wangrui (K)
>From 918f814aacb258ea9641ed1bb9e48baf2d93082a Mon Sep 17 00:00:00 2001 From: Zhou Yimin Date: Fri, 21 Mar 2014 14:52:40 +0800 Subject: [PATCH] virlog: Modify virLogParseDefaultPriority's comment of return value virLogParseDefaultPriority's successful return value is the same as virLogSetDefault

[libvirt] same issue on selinux Re: [PATCH 1/2] apparmor: Allow access to filesystem mounts

2014-03-20 Thread Hiroshi Miura
Hi, Thanks for merging the apparmor handle 9pfs patch! On 2014 03 10 00:03, Felix Geyer wrote:> > On 28.02.2014 21:36, Serge Hallyn wrote: >> a separate patch was posted to a new launchpad bug which does a >> bit more sanity checking on the values passed in, so I went >> ahead and merged the two

Re: [libvirt] [PATCH v4] Add helper program to create custom leases

2014-03-20 Thread Nehal J Wani
>> @@ -1120,6 +1135,10 @@ networkBuildDhcpDaemonCommandLine(virNetworkObjPtr >> network, >> >> cmd = virCommandNew(dnsmasqCapsGetBinaryPath(caps)); >> virCommandAddArgFormat(cmd, "--conf-file=%s", configfile); >> + >> +/* This helper is used to create custom leases file for libvirt *

[libvirt] Planning for next release

2014-03-20 Thread Daniel Veillard
If we want to have 1.2.3 at the end of the month, I think we need to enter freeze next week, possibly early on Wednesday to get sufficient time. Do we really want a 1.2.3 on April Fool ? :-) Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome

Re: [libvirt] [PATCH v7 4/4] allow "virsh dump --memory-only" specify dump format

2014-03-20 Thread qiaonuo...@cn.fujitsu.com
On 03/20/2014 11:07 PM, Daniel P. Berrange wrote: >> > +{.name = "compression-format", >> > + .type = VSH_OT_DATA, >> > + .help = N_("specify the compression format of kdump-compressed >> > format") >> > +}, > ...I actually think this second arg should just be called 'format' >

Re: [libvirt] [PATCH] cgroup: Fix start VMs coincidently failed

2014-03-20 Thread Wangyufei (James)
Yes, it's just a race condition here. It's not LXC, it's just qemu-driver, and it's not using systemd for cgroup management. (Running hypervisor: QEMU 1.5.1) We can run these two command to clear cgroup dirctory 'machine' first: service cgconfig restart service cgred restart Then we start multi

Re: [libvirt] [PATCH 3/3] Check boot order on device attach

2014-03-20 Thread Jiri Denemark
On Thu, Mar 20, 2014 at 14:05:15 -0600, Eric Blake wrote: > On 03/20/2014 08:42 AM, Jiri Denemark wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1007754 > > > > When attaching a new device, we need to check if its boot order > > configuration is compatible with current domain definition. >

Re: [libvirt] Adding support to limit client connections for vnc/spice display driver

2014-03-20 Thread Patil, Tushar
On Wed, Mar 19, 2014 at 06:41:16PM +, Patil, Tushar wrote: > > >> We are using KVM hypervisor driver for running OpenStack IaaS. Couple >> of months back we have reported one security issue [1] in OS. Basically >> we want to limit on the number of vnc client connections that can be >> opened by

Re: [libvirt] [PATCH] tests: Set abs_*dir in a consistent way

2014-03-20 Thread Jiri Denemark
On Thu, Mar 20, 2014 at 15:01:35 -0600, Eric Blake wrote: > On 03/19/2014 07:50 AM, Jiri Denemark wrote: > > Use $(shell cd $(...) && pwd) to set abs_*dir variables similarly to > > what src/Makefile.am does. > > > > Signed-off-by: Jiri Denemark > > --- > > tests/Makefile.am | 16 ++-

Re: [libvirt] [PATCH] qemu: Return meaningful error when qemu dies early

2014-03-20 Thread Jiri Denemark
On Thu, Mar 20, 2014 at 15:51:44 +0100, Michal Privoznik wrote: > On 17.03.2014 13:21, Jiri Denemark wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=844378 > > > > When qemu dies early after connecting to its monitor but before we > > actually try to read something from the monitor, we would

Re: [libvirt] CPU Topology in Libvirt Java 0.51

2014-03-20 Thread Jiri Denemark
On Thu, Mar 20, 2014 at 12:55:07 -0600, Eric Blake wrote: > On 03/20/2014 11:54 AM, Vikas Kokare wrote: > > We are trying to get the cpu topology data (cores, sockets, threads) using > > the Java binding of the libvirt API, after connecting to a hypervisor. We > > are expecting the domain (vm) XML

Re: [libvirt] [PATCH v4] Add helper program to create custom leases

2014-03-20 Thread Eric Blake
On 03/17/2014 03:30 PM, Nehal J Wani wrote: > Introduce helper program to catch events from dnsmasq and maintain a custom > lease file per network. It supports dhcpv4 and dhcpv6. The file is saved as > ".status". > > @@ -243,6 +253,7 @@ networkRemoveInactive(virNetworkDriverStatePtr driver, >

Re: [libvirt] [PATCH] tests: Set abs_*dir in a consistent way

2014-03-20 Thread Eric Blake
On 03/19/2014 07:50 AM, Jiri Denemark wrote: > Use $(shell cd $(...) && pwd) to set abs_*dir variables similarly to > what src/Makefile.am does. > > Signed-off-by: Jiri Denemark > --- > tests/Makefile.am | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > AM_CFLAGS = \

Re: [libvirt] [PATCH v3 for 2.0] update names in option tables to match with actual command-line spelling

2014-03-20 Thread Eric Blake
On 03/20/2014 07:07 AM, Amos Kong wrote: > We want to establish a mapping between option name and option table, > then we can search related option table by option name. > > This patch makes all the member name of QemuOptsList to match with > actual command-line spelling(option name). > > [ Impor

Re: [libvirt] [PATCH 3/3] Check boot order on device attach

2014-03-20 Thread Eric Blake
On 03/20/2014 08:42 AM, Jiri Denemark wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1007754 > > When attaching a new device, we need to check if its boot order > configuration is compatible with current domain definition. > > Signed-off-by: Jiri Denemark > --- > src/conf/domain_conf.c |

Re: [libvirt] [PATCH 2/3] Pass action to virDomainDefCompatibleDevice

2014-03-20 Thread Eric Blake
On 03/20/2014 08:42 AM, Jiri Denemark wrote: > When checking compatibility of a device with a domain definition, we > should know what we're going to do with the device. Because we may need > to check for different things when we're attaching a new device versus > detaching an existing device. > >

Re: [libvirt] [PATCH 1/3] Fix usage of virDomainDefCompatibleDevice

2014-03-20 Thread Eric Blake
On 03/20/2014 08:42 AM, Jiri Denemark wrote: > A device needs to be checked for compatibility with the domain > definition it corresponds to. Specifically, for VIR_DOMAIN_AFFECT_CONFIG > case we should check against persistent def rather than active def. > > Signed-off-by: Jiri Denemark > --- >

Re: [libvirt] [PATCHv2 0/7] arbitrary qemu monitor events

2014-03-20 Thread Eric Blake
On 03/20/2014 07:44 AM, Michal Privoznik wrote: > On 12.03.2014 16:20, Eric Blake wrote: >> v1 was here: >> https://www.redhat.com/archives/libvir-list/2014-February/msg0.html >> >> Many of the patches in the series were acked back then, but the >> 'virsh' changes were made conditional on getti

Re: [libvirt] CPU Topology in Libvirt Java 0.51

2014-03-20 Thread Eric Blake
On 03/20/2014 11:54 AM, Vikas Kokare wrote: > We are trying to get the cpu topology data (cores, sockets, threads) using > the Java binding of the libvirt API, after connecting to a hypervisor. We > are expecting the domain (vm) XML payload to contain the element with > the sub-element, but it is

Re: [libvirt] Question about VIR_ALLOC vs vshMalloc

2014-03-20 Thread Eric Blake
On 03/20/2014 12:02 PM, Solly Ross wrote: > I was wondering what the reason was for seemingly near-duplicate code. > VIR_ALLOC and vshMalloc (and similar methods for calloc, etc), seem to be > roughly identical in function, with the only difference being that VIR_ALLOC > and friends are used in

Re: [libvirt] [PATCH] is_selinux_enabled returns -1 on error, account for this.

2014-03-20 Thread Scott Sullivan
On 03/20/2014 11:27 AM, Michal Privoznik wrote: On 18.03.2014 18:02, Scott Sullivan wrote: Per the documentation, is_selinux_enabled() returns -1 on error. Account for this. Previously when -1 was being returned the condition would still be true. I was noticing this because on my system that has

Re: [libvirt] [PATCH python] override: Return NULL on python failure in getCPUModelNames

2014-03-20 Thread Cole Robinson
On 03/20/2014 02:06 PM, Eric Blake wrote: > On 03/20/2014 11:58 AM, Cole Robinson wrote: >> Eric pointed this out on the last patch, but I pushed it before noticing >> his message. >> --- >> libvirt-override.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libvirt-over

Re: [libvirt] [PATCH python] override: Return NULL on python failure in getCPUModelNames

2014-03-20 Thread Eric Blake
On 03/20/2014 11:58 AM, Cole Robinson wrote: > Eric pointed this out on the last patch, but I pushed it before noticing > his message. > --- > libvirt-override.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libvirt-override.c b/libvirt-override.c > index 71e241e..25324

[libvirt] [PATCH python] override: Return NULL on python failure in getCPUModelNames

2014-03-20 Thread Cole Robinson
Eric pointed this out on the last patch, but I pushed it before noticing his message. --- libvirt-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override.c b/libvirt-override.c index 71e241e..2532400 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @

[libvirt] Question about VIR_ALLOC vs vshMalloc

2014-03-20 Thread Solly Ross
I was wondering what the reason was for seemingly near-duplicate code. VIR_ALLOC and vshMalloc (and similar methods for calloc, etc), seem to be roughly identical in function, with the only difference being that VIR_ALLOC and friends are used in libvirt proper, whereas vshMalloc and friends are

Re: [libvirt] [PATCH 3/4] bhyve: multiple virtio-blk devices support

2014-03-20 Thread Laine Stump
On 03/20/2014 06:03 AM, Daniel P. Berrange wrote: > On Thu, Mar 20, 2014 at 09:39:22AM +0100, Wojciech Macek wrote: >> Add support for multiple virtio-blk devices. Current implementation >> offers room for up to 8 disks and enumerates them as functions on >> PCI bus: 2:0, 2:1 ... 2:7 > Use of PCI f

[libvirt] CPU Topology in Libvirt Java 0.51

2014-03-20 Thread Vikas Kokare
We are trying to get the cpu topology data (cores, sockets, threads) using the Java binding of the libvirt API, after connecting to a hypervisor. We are expecting the domain (vm) XML payload to contain the element with the sub-element, but it is not present. Penryn Intel ... --

Re: [libvirt] [PATCH python] override: GetCPUModelNames should return None on failure

2014-03-20 Thread Eric Blake
On 03/20/2014 11:52 AM, Eric Blake wrote: > On 03/20/2014 11:28 AM, Cole Robinson wrote: >> Right now, on failure, libvirt.py doesn't raise an exception and just >> returns -1 to the user. >> --- >> libvirt-override.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libv

Re: [libvirt] [PATCH python] override: GetCPUModelNames should return None on failure

2014-03-20 Thread Cole Robinson
On 03/20/2014 01:52 PM, Eric Blake wrote: > On 03/20/2014 11:28 AM, Cole Robinson wrote: >> Right now, on failure, libvirt.py doesn't raise an exception and just >> returns -1 to the user. >> --- >> libvirt-override.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libv

Re: [libvirt] [PATCH python] override: GetCPUModelNames should return None on failure

2014-03-20 Thread Eric Blake
On 03/20/2014 11:28 AM, Cole Robinson wrote: > Right now, on failure, libvirt.py doesn't raise an exception and just > returns -1 to the user. > --- > libvirt-override.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libvirt-override.c b/libvirt-override.c > index 7f746e

Re: [libvirt] [PATCH 2/6] Add DBus helper methods for creating reply messages

2014-03-20 Thread Eric Blake
On 03/20/2014 11:28 AM, Daniel P. Berrange wrote: > On Thu, Mar 20, 2014 at 06:16:08PM +0100, Michal Privoznik wrote: >> On 20.03.2014 13:28, Daniel P. Berrange wrote: >>> The test suites often have to create DBus method reply messages >>> with payloads. Create two helpers for simplifying the proce

Re: [libvirt] [PATCH 0/2] bhyve: add xml2args unittest

2014-03-20 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: > Add testing for xml -> args generation. It's largely based on the > similar test for qemu. As it's my first experience with unit testing > in libvirt and in unit testing in C in general, I'm not sure I haven't > miss some important pieces, but it works as expected for

[libvirt] [PATCH 1/2] Move virBhyveTapGetRealDeviceName to virnetdevtap

2014-03-20 Thread Roman Bogorodskiy
To ease mocking for bhyve unit tests move virBhyveTapGetRealDeviceName() out of bhyve_command.c to virnetdevtap and rename it to virNetDevTapGetRealDeviceName(). --- src/bhyve/bhyve_command.c | 70 + src/libvirt_private.syms | 1 + src/util/virnetdevtap.c

[libvirt] [PATCH 2/2] bhyve: add xml2args unittest

2014-03-20 Thread Roman Bogorodskiy
At this point unittest covers 3 basic cases: - minimal working XML for bhyve - same as above, but with virtio disk - ACPI and APIC args test --- src/util/virnetdevtap.c| 1 - tests/Makefile.am | 25 .../bhyvexml2argvdata/bhyv

[libvirt] [PATCH 0/2] bhyve: add xml2args unittest

2014-03-20 Thread Roman Bogorodskiy
Add testing for xml -> args generation. It's largely based on the similar test for qemu. As it's my first experience with unit testing in libvirt and in unit testing in C in general, I'm not sure I haven't miss some important pieces, but it works as expected for me. I'm also not sure about the lic

[libvirt] [PATCH python] override: GetCPUModelNames should return None on failure

2014-03-20 Thread Cole Robinson
Right now, on failure, libvirt.py doesn't raise an exception and just returns -1 to the user. --- libvirt-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override.c b/libvirt-override.c index 7f746ed..9fed299 100644 --- a/libvirt-override.c +++ b/libvirt-over

Re: [libvirt] [PATCH 2/6] Add DBus helper methods for creating reply messages

2014-03-20 Thread Daniel P. Berrange
On Thu, Mar 20, 2014 at 06:16:08PM +0100, Michal Privoznik wrote: > On 20.03.2014 13:28, Daniel P. Berrange wrote: > >The test suites often have to create DBus method reply messages > >with payloads. Create two helpers for simplifying the process > >of creating replies with payloads. > > > >Signed-

Re: [libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Laine Stump
On 03/20/2014 10:50 AM, Ján Tomko wrote: > On 03/20/2014 05:19 PM, Laine Stump wrote: >> On 03/20/2014 09:57 AM, Ján Tomko wrote: >>> If we cannot stat/open a file on pool refresh, returning -1 aborts >>> the refresh and the pool is undefined. >>> >>> Don't treat missing files as fatal unless VolOp

Re: [libvirt] [PATCH] Ignore char devices in storage pools by default

2014-03-20 Thread Ján Tomko
On 03/20/2014 05:45 PM, Eric Blake wrote: > On 03/20/2014 10:08 AM, Ján Tomko wrote: >> Without this, using /dev/mapper as a directory pool >> fails in virStorageBackendUpdateVolTargetInfoFD: >> cannot seek to end of file '/dev/mapper/control': Illegal seek >> >> Skip over character devices by defa

Re: [libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Ján Tomko
On 03/20/2014 05:23 PM, Martin Kletzander wrote: > On Thu, Mar 20, 2014 at 04:57:35PM +0100, Ján Tomko wrote: >> If we cannot stat/open a file on pool refresh, returning -1 aborts >> the refresh and the pool is undefined. >> >> Don't treat missing files as fatal unless VolOpenCheckMode is called >>

Re: [libvirt] [PATCHv2 8/8] Add test for virISCSIScanTargets

2014-03-20 Thread Ján Tomko
On 03/20/2014 04:01 PM, Daniel P. Berrange wrote: > On Wed, Mar 19, 2014 at 04:52:33PM +0100, Ján Tomko wrote: >> --- >> tests/viriscsitest.c | 82 >> >> 1 file changed, 82 insertions(+) >> >> diff --git a/tests/viriscsitest.c b/tests/viriscsit

Re: [libvirt] [PATCH 2/6] Add DBus helper methods for creating reply messages

2014-03-20 Thread Michal Privoznik
On 20.03.2014 13:28, Daniel P. Berrange wrote: The test suites often have to create DBus method reply messages with payloads. Create two helpers for simplifying the process of creating replies with payloads. Signed-off-by: Daniel P. Berrange --- src/libvirt_private.syms | 2 ++ src/util/vir

Re: [libvirt] [PATCH 5/6] Introduce alternate way to encode/decode arrays in DBus messages

2014-03-20 Thread Daniel P. Berrange
On Thu, Mar 20, 2014 at 06:15:48PM +0100, Michal Privoznik wrote: > On 20.03.2014 13:28, Daniel P. Berrange wrote: > >Currently the DBus helper APIs require the values for an array > >to be passed inline in the variadic argument list. This change > >introduces support for passing arrays using a poi

Re: [libvirt] [PATCH] virNetClientSetTLSSession: Restore original signal mask

2014-03-20 Thread Michal Privoznik
On 20.03.2014 18:13, Eric Blake wrote: On 03/19/2014 11:42 AM, Eric Blake wrote: On 03/19/2014 11:29 AM, Michal Privoznik wrote: Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling poll(). This is okay, as we don't want poll() to be interrupted. However, then - immediately as we

Re: [libvirt] [PATCH 5/6] Introduce alternate way to encode/decode arrays in DBus messages

2014-03-20 Thread Michal Privoznik
On 20.03.2014 13:28, Daniel P. Berrange wrote: Currently the DBus helper APIs require the values for an array to be passed inline in the variadic argument list. This change introduces support for passing arrays using a pointer to a plain C array of the basic type. This is of particular benefit fo

[libvirt] [PATCH] Fix indentation in iscsi storage backend

2014-03-20 Thread Ján Tomko
--- Pushed as trivial. src/storage/storage_backend_iscsi.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 7e7ffad..fde2b4b 100644 --- a/src/storage/storage_backend_iscsi.c +++ b/sr

Re: [libvirt] [PATCH] cgroup: Fix start VMs coincidently failed

2014-03-20 Thread Daniel P. Berrange
On Thu, Mar 20, 2014 at 05:04:13PM +0100, Michal Privoznik wrote: > On 20.03.2014 08:24, Wangyufei (James) wrote: > >>From 0163328efa67da1d63e504c86e323db5affa378f Mon Sep 17 00:00:00 2001 > >From: Wang Yufei > >Date: Thu, 20 Mar 2014 07:14:01 + > >Subject: [PATCH] cgroup: Fix start VMs coinci

Re: [libvirt] [PATCH 4/6] Remove bogus call to dbus_set_error_from_message

2014-03-20 Thread Michal Privoznik
On 20.03.2014 13:28, Daniel P. Berrange wrote: The dbus_connection_send_with_reply_and_block method will automatically call dbus_set_error_from_message for us. We mistakenly thought we had todo it because of a flaw in the systemd unit test mock impl. The latter should have directly set the error

Re: [libvirt] [PATCH 6/6] Allow caller to handle DBus error messages

2014-03-20 Thread Michal Privoznik
On 20.03.2014 13:28, Daniel P. Berrange wrote: The caller may not want all DBus error conditions to be turned into libvirt errors, so provide a way for the caller to get back the full DBusError object. They can then check the errors and only report those that they consider to be fatal. Signed-of

Re: [libvirt] [PATCH 1/6] Refactor dbus helper methods for method calls

2014-03-20 Thread Michal Privoznik
On 20.03.2014 13:28, Daniel P. Berrange wrote: Split the virDBusMethodCall method into a couple of new methods virDBusCall, virDBusCreateMethod and virDBusCreateMethodV. Signed-off-by: Daniel P. Berrange --- src/libvirt_private.syms | 3 + src/util/virdbus.c | 207 +++

Re: [libvirt] [PATCH 3/6] Remove bogus unref in virDBusMessageRead

2014-03-20 Thread Michal Privoznik
On 20.03.2014 13:28, Daniel P. Berrange wrote: The virDBusMessageRead method should not have side-effects on the message parameter passed in, so unref'ing it is wrong. The caller should unref only when they decided they are done with it. Signed-off-by: Daniel P. Berrange --- src/util/virdbus.

Re: [libvirt] [PATCH] virNetClientSetTLSSession: Restore original signal mask

2014-03-20 Thread Eric Blake
On 03/19/2014 11:42 AM, Eric Blake wrote: > On 03/19/2014 11:29 AM, Michal Privoznik wrote: >> Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling >> poll(). This is okay, as we don't want poll() to be interrupted. >> However, then - immediately as we fall out from the poll() - we tr

Re: [libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Ján Tomko
On 03/20/2014 05:19 PM, Laine Stump wrote: > On 03/20/2014 09:57 AM, Ján Tomko wrote: >> If we cannot stat/open a file on pool refresh, returning -1 aborts >> the refresh and the pool is undefined. >> >> Don't treat missing files as fatal unless VolOpenCheckMode is called >> with the VIR_STORAGE_VO

Re: [libvirt] [PATCH] Ignore char devices in storage pools by default

2014-03-20 Thread Eric Blake
On 03/20/2014 10:08 AM, Ján Tomko wrote: > Without this, using /dev/mapper as a directory pool > fails in virStorageBackendUpdateVolTargetInfoFD: > cannot seek to end of file '/dev/mapper/control': Illegal seek > > Skip over character devices by default. I agree that character devices can't serve

[libvirt] Outreach Program for Women application deadline extended

2014-03-20 Thread Stefan Hajnoczi
Good news! The deadline for Outreach Program for Women applications to work on QEMU, KVM, or libvirt for 12 weeks this summer has been extended to March 31st 19:00 UTC: https://wiki.gnome.org/OutreachProgramForWomen/2014/MayAugust#Participating_Organizations Outreach Program for Women was started

Re: [libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Martin Kletzander
On Thu, Mar 20, 2014 at 04:57:35PM +0100, Ján Tomko wrote: > If we cannot stat/open a file on pool refresh, returning -1 aborts > the refresh and the pool is undefined. > > Don't treat missing files as fatal unless VolOpenCheckMode is called > with the VIR_STORAGE_VOL_OPEN_ERROR flag. > > https://b

Re: [libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Laine Stump
On 03/20/2014 09:57 AM, Ján Tomko wrote: > If we cannot stat/open a file on pool refresh, returning -1 aborts > the refresh and the pool is undefined. > > Don't treat missing files as fatal unless VolOpenCheckMode is called > with the VIR_STORAGE_VOL_OPEN_ERROR flag. > > https://bugzilla.redhat.com

Re: [libvirt] [PATCH] cgroup: Fix start VMs coincidently failed

2014-03-20 Thread Michal Privoznik
On 20.03.2014 08:24, Wangyufei (James) wrote: From 0163328efa67da1d63e504c86e323db5affa378f Mon Sep 17 00:00:00 2001 From: Wang Yufei Date: Thu, 20 Mar 2014 07:14:01 + Subject: [PATCH] cgroup: Fix start VMs coincidently failed When I start multi VMs coincidently and any of the cgroup direct

[libvirt] [PATCH] Ignore char devices in storage pools by default

2014-03-20 Thread Ján Tomko
Without this, using /dev/mapper as a directory pool fails in virStorageBackendUpdateVolTargetInfoFD: cannot seek to end of file '/dev/mapper/control': Illegal seek Skip over character devices by default. https://bugzilla.redhat.com/show_bug.cgi?id=710866 --- src/storage/storage_backend.h | 1 -

Re: [libvirt] [PATCH v2 03/16] Use K&R style for curly braces in src/util/

2014-03-20 Thread Martin Kletzander
On Thu, Mar 20, 2014 at 03:20:52PM +, Daniel P. Berrange wrote: > On Wed, Mar 19, 2014 at 12:18:43PM +0100, Martin Kletzander wrote: > > Signed-off-by: Martin Kletzander > > --- > > src/util/vircgroup.c | 9 ++--- > > src/util/virconf.c | 5 +++-- > > src/util/

[libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Ján Tomko
If we cannot stat/open a file on pool refresh, returning -1 aborts the refresh and the pool is undefined. Don't treat missing files as fatal unless VolOpenCheckMode is called with the VIR_STORAGE_VOL_OPEN_ERROR flag. https://bugzilla.redhat.com/show_bug.cgi?id=977706 --- v1: https://www.redhat.co

Re: [libvirt] [PATCH] bhyve: add domainCreateWithFlags support

2014-03-20 Thread Michal Privoznik
On 18.03.2014 10:31, Roman Bogorodskiy wrote: > The only supported flag for now is 'autodestroy'. In order to > support 'autodestroy', add support for close callbacks. > --- > src/bhyve/bhyve_driver.c | 28 +--- > src/bhyve/bhyve_process.c | 29 ++

Re: [libvirt] [PATCH] is_selinux_enabled returns -1 on error, account for this.

2014-03-20 Thread Michal Privoznik
On 18.03.2014 18:02, Scott Sullivan wrote: Per the documentation, is_selinux_enabled() returns -1 on error. Account for this. Previously when -1 was being returned the condition would still be true. I was noticing this because on my system that has selinux disabled I was getting this in the libvi

Re: [libvirt] [PATCH v2 16/16] Require K&R styled curly braces around function bodies

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:56PM +0100, Martin Kletzander wrote: > Although not explicitly requested, we are using K&R (or Kernel) > indentation for curly braces around functions in HACKING file and most > of the code. Using grep -P, this patch add the syntax-check rule for > it (while skipping

Re: [libvirt] [PATCH v2 13/16] Use K&R style for curly braces in src/network/bridge_driver.c

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:53PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/network/bridge_driver.c | 54 > ++--- > 1 file changed, 36 insertions(+), 18 deletions(-) ACK Regards, Daniel -- |: http://berrange.com

Re: [libvirt] [PATCH v2 12/16] Use K&R style for curly braces in src/lxc/lxc_driver.c

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:52PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/lxc/lxc_driver.c | 30 -- > 1 file changed, 20 insertions(+), 10 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flic

Re: [libvirt] [PATCH v2 11/16] Use K&R style for curly braces in src/uml/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:51PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/uml/uml_conf.c | 5 ++-- > src/uml/uml_driver.c | 78 > ++-- > 2 files changed, 55 insertions(+), 28 deletions(-) ACK Regards, D

Re: [libvirt] [PATCH v2 14/16] Use K&R style for curly braces in src/vbox/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:54PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/vbox/vbox_driver.c | 5 +- > src/vbox/vbox_tmpl.c | 188 > + > 2 files changed, 132 insertions(+), 61 deletions(-) ACK Regards,

Re: [libvirt] [PATCH v2 06/16] Use K&R style for curly braces in src/qemu/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:46PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/qemu/qemu_agent.c| 5 ++- > src/qemu/qemu_command.c | 6 ++- > src/qemu/qemu_driver.c | 94 > +--- > src/qemu/qemu_migrat

Re: [libvirt] [PATCH v2 08/16] Use K&R style for curly braces in src/openvz/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:48PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/openvz/openvz_conf.c | 15 ++- > src/openvz/openvz_driver.c | 45 ++--- > 2 files changed, 40 insertions(+), 20 deletions(-) ACK

Re: [libvirt] [PATCH v2 10/16] Use K&R style for curly braces in src/test/test_driver.c

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:50PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/test/test_driver.c | 135 > - > 1 file changed, 90 insertions(+), 45 deletions(-) ACK Regards, Daniel -- |: http://berrange.com

Re: [libvirt] [PATCH v2 09/16] Use K&R style for curly braces in src/nwfilter/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:49PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/nwfilter/nwfilter_driver.c| 32 +++- > src/nwfilter/nwfilter_ebiptables_driver.c | 3 ++- > src/nwfilter/nwfilter_learnipaddr.c | 41 >

Re: [libvirt] [PATCH v2 07/16] Use K&R style for curly braces in src/storage/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:47PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/storage/storage_backend_fs.c | 12 --- > src/storage/storage_driver.c | 78 > ++-- > 2 files changed, 60 insertions(+), 30 deletions(-) A

Re: [libvirt] [PATCH v2 05/16] Use K&R style for curly braces in src/conf/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:45PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/conf/domain_conf.c | 9 +--- > src/conf/domain_nwfilter.c | 13 +++ > src/conf/interface_conf.c | 54 > ++ > src/conf/nw

Re: [libvirt] [PATCH v2 04/16] Use K&R style for curly braces in src/rpc/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:44PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/rpc/virnetserver.c | 8 +--- > src/rpc/virnetserverclient.c | 5 +++-- > src/rpc/virnettlscontext.c | 5 +++-- > 3 files changed, 11 insertions(+), 7 deletions(-) ACK R

Re: [libvirt] [PATCH v2 03/16] Use K&R style for curly braces in src/util/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:43PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/util/vircgroup.c | 9 ++--- > src/util/virconf.c | 5 +++-- > src/util/virdbus.c | 8 +--- > src/util/virerror.c | 3 +

Re: [libvirt] [PATCH v2 02/16] Use K&R style for curly braces in src/xen*/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:42PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/xen/xen_driver.c | 6 -- > src/xen/xen_hypervisor.c | 5 +++-- > src/xen/xm_internal.c | 10 +++--- > src/xenapi/xenapi_utils.c | 5 +++-- > src/xenxs/xen_xm.c

Re: [libvirt] [PATCH v7 2/4] qemu: add qemuMonitorGetDumpGuestMemoryCapability

2014-03-20 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 07:12:02AM +, qiaonuo...@cn.fujitsu.com wrote: > This patch adds qemuMonitorGetDumpGuestMemoryCapability, which is used to > check > whether the specified dump-guest-memory format is supported by qemu. > > Signed-off-by: Qiao Nuohan > --- > src/qemu/qemu_monitor.c

Re: [libvirt] [PATCH v2 01/16] Use K&R style for curly braces in tests/

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:18:41PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > tests/commandhelper.c| 5 +++-- > tests/qemuargv2xmltest.c | 3 ++- > tests/shunloadhelper.c | 5 +++-- > tests/testutils.c| 15 +- > tests/testutilslxc.c

Re: [libvirt] [PATCH v7 3/4] qemu: add support for virDomainCoreDumpWithFormat API

2014-03-20 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 07:12:03AM +, qiaonuo...@cn.fujitsu.com wrote: > static int qemuDumpToFd(virQEMUDriverPtr driver, virDomainObjPtr vm, > -int fd, enum qemuDomainAsyncJob asyncJob) > +int fd, enum qemuDomainAsyncJob asyncJob, > +

Re: [libvirt] [PATCH v7 4/4] allow "virsh dump --memory-only" specify dump format

2014-03-20 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 07:12:03AM +, qiaonuo...@cn.fujitsu.com wrote: > This patch adds "[--compression-format] " to "virsh dump > --memory-only", > which is changed to use the new virDomainCoreDumpWithFormat API. And > "--compress" is added as an alias for "--compression-format zlib". > > S

Re: [libvirt] [PATCHv2 7/8] Add test for virISCSIGetSession

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:32PM +0100, Ján Tomko wrote: > Parse iscsiadm output with and without the recently introduced > flashnode info. [1] > > This should check that commits like 57e17a7 (fixing [2]) do > not break iscsiadm output parsing. > > [1] https://github.com/mikechristie/open-iscsi

Re: [libvirt] [PATCH v7 4/4] allow "virsh dump --memory-only" specify dump format

2014-03-20 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 07:12:03AM +, qiaonuo...@cn.fujitsu.com wrote: > This patch adds "[--compression-format] " to "virsh dump > --memory-only", > which is changed to use the new virDomainCoreDumpWithFormat API. And > "--compress" is added as an alias for "--compression-format zlib". > > S

Re: [libvirt] [PATCHv2 8/8] Add test for virISCSIScanTargets

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:33PM +0100, Ján Tomko wrote: > --- > tests/viriscsitest.c | 82 > > 1 file changed, 82 insertions(+) > > diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c > index 0b09834..16a40c7 100644 > --- a/tests/viris

Re: [libvirt] [PATCH v7 1/4] add new virDomainCoreDumpWithFormat API

2014-03-20 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 07:12:02AM +, qiaonuo...@cn.fujitsu.com wrote: > --memory-only option is introduced without compression supported. Now qemu has > support dumping domain's memory in kdump-compressed format. This patch is > adding > new virDomainCoreDumpWithFormat API, so that the format

Re: [libvirt] [PATCHv2 6/8] Move functions using iscsiadm to viriscsi.c

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:35:31PM +, Daniel P. Berrange wrote: > On Wed, Mar 19, 2014 at 04:52:31PM +0100, Ján Tomko wrote: > > diff --git a/src/util/viriscsi.h b/src/util/viriscsi.h > > new file mode 100644 > > index 000..462e56a > > --- /dev/null > > +++ b/src/util/viriscsi.h > > @@ -0,0

Re: [libvirt] [PATCHv2 5/8] Remove storage pool from the arguments of a few functions

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:30PM +0100, Ján Tomko wrote: > virStorageBackendISCSISession only needs the path of the source > device and virStorageBackendISCSIRescanLUNs doesn't need the pool > at all. > > This will allow the functions to be moved to src/util. > --- > src/storage/storage_backend

Re: [libvirt] [PATCHv2 2/8] Move virStorageBackendRun to vircommand

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:27PM +0100, Ján Tomko wrote: > The only storage-specific parameter is the pool object, which > is only used for passing to the callback function. > --- > src/libvirt_private.syms | 2 + > src/storage/storage_backend.c | 249 > --

Re: [libvirt] [PATCH] virlog: Modify virLogParseDefaultPriority's comment of return value

2014-03-20 Thread Michal Privoznik
On 17.03.2014 13:31, Wangrui (K) wrote: virLogParseDefaultPriority's successful return value is the same as virLogSetDefaultPriority's successful return value. So it should be 0 rather than the parsed log level. Signed-off-by: Zhou Yimin --- src/util/virlog.c | 2 +- 1 file changed, 1 inser

Re: [libvirt] [PATCHv2 4/8] Don't create iscsiadm command line in ISCSIPool{Start, Stop}

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:29PM +0100, Ján Tomko wrote: > Create ISCSIConnection{Login,Logout} wrappers for that. > --- > src/storage/storage_backend_iscsi.c | 34 -- > 1 file changed, 24 insertions(+), 10 deletions(-) ACK Regards, Daniel -- |: http://berrang

Re: [libvirt] [PATCHv2 1/8] Sort includes in storage_backend_iscsi.c

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:26PM +0100, Ján Tomko wrote: > --- > src/storage/storage_backend_iscsi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/storage/storage_backend_iscsi.c > b/src/storage/storage_backend_iscsi.c > index 2a4e669..0feeb5f 100644 > ---

Re: [libvirt] [PATCHv2 3/8] Switch virCommandRunRegex to use virStringSplit

2014-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:28PM +0100, Ján Tomko wrote: > Instead of running the command asynchronously and reading the output > via fgets, let virCommand collect the output and split it with > virStringSplit. > --- > src/util/vircommand.c | 41 +++-- > 1 fil

Re: [libvirt] [PATCH 1/4] pie: add Position-Independent-Executable flag

2014-03-20 Thread Daniel P. Berrange
On Thu, Mar 20, 2014 at 09:39:20AM +0100, Wojciech Macek wrote: > Add possibility to choose whether the code is compiled with PIE > or without. New configuration flags: > --enable-pie (default) > --disable-pie > --- > configure.ac | 14 +- > 1 file changed, 13 insertions(+), 1 deletion

Re: [libvirt] [Qemu-devel] [PATCH v4 2/2] query-command-line-options: query all the options in qemu-options.hx

2014-03-20 Thread Amos Kong
On Thu, Mar 20, 2014 at 10:03:12PM +0800, Amos Kong wrote: > On Fri, Mar 07, 2014 at 10:54:09AM +0100, Markus Armbruster wrote: > > Eric Blake writes: > > > > > On 03/05/2014 07:36 PM, Amos Kong wrote: > > >> vm_config_groups[] only contains part of the options which have > > >> argument, and all

Re: [libvirt] [PATCH] qemu: Return meaningful error when qemu dies early

2014-03-20 Thread Michal Privoznik
On 17.03.2014 13:21, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=844378 When qemu dies early after connecting to its monitor but before we actually try to read something from the monitor, we would just fail domain start with useless message: "An error occurred, but the

[libvirt] [PATCH 0/3] Check boot order on device attach

2014-03-20 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1007754 When attaching a new device, we need to check if its boot order configuration is compatible with current domain definition. Jiri Denemark (3): Fix usage of virDomainDefCompatibleDevice Pass action to virDomainDefCompatibleDevice Check boot

[libvirt] [PATCH 3/3] Check boot order on device attach

2014-03-20 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1007754 When attaching a new device, we need to check if its boot order configuration is compatible with current domain definition. Signed-off-by: Jiri Denemark --- src/conf/domain_conf.c | 79 ++ src/co

[libvirt] [PATCH 1/3] Fix usage of virDomainDefCompatibleDevice

2014-03-20 Thread Jiri Denemark
A device needs to be checked for compatibility with the domain definition it corresponds to. Specifically, for VIR_DOMAIN_AFFECT_CONFIG case we should check against persistent def rather than active def. Signed-off-by: Jiri Denemark --- src/lxc/lxc_driver.c | 20 +++- src/qemu/

[libvirt] [PATCH 2/3] Pass action to virDomainDefCompatibleDevice

2014-03-20 Thread Jiri Denemark
When checking compatibility of a device with a domain definition, we should know what we're going to do with the device. Because we may need to check for different things when we're attaching a new device versus detaching an existing device. Signed-off-by: Jiri Denemark --- src/conf/domain_conf.

Re: [libvirt] [PATCH 4/4] bhyve: host API support

2014-03-20 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: > Daniel P. Berrange wrote: > > > On Thu, Mar 20, 2014 at 09:39:23AM +0100, Wojciech Macek wrote: > > > New functionalities: > > > - connectGetMaxVcpus - on bhyve hardcode this value to 16 > > > - nodeGetFreeMemory - do not use physmem_get on FreeBSD, since > > >

  1   2   >