[libvirt] [PATCH 0/4] bhyve integration: pie, blk, MAC, host API

2014-03-20 Thread Wojciech Macek
Hi, I'm working on enabling OpenStack/libvirt support for FreeBSD hosts. Please look into some patches I'd like to submit for rewiev. 1. PIE-flag: on some FreeBSD-10 the clang toolchain is broken and cannot build executables with PIE option, so I added the flag to let the user choose. 2. bhyve

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

2014-03-20 Thread Wojciech Macek
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 Bootable disk must be present on the first place in XML file. --- src/bhyve/bhyve_command.c | 86

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

2014-03-20 Thread Wojciech Macek
New functionalities: - connectGetMaxVcpus - on bhyve hardcode this value to 16 - nodeGetFreeMemory - do not use physmem_get on FreeBSD, since it might get wrong value on systems with more than 100GB of RAM - nodeGetCPUMap - wrapper only for mapping

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

2014-03-20 Thread Wojciech Macek
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(-) diff --git a/configure.ac b/configure.ac index 62b74c5..96a7038 100644

[libvirt] [PATCH 2/4] bhyve: MAC address configuration

2014-03-20 Thread Wojciech Macek
Add support for MAC address configuration no network bridge interface. --- src/bhyve/bhyve_command.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 15029cd..42cab10 100644 --- a/src/bhyve/bhyve_command.c +++

Re: [libvirt] [PATCH v2] daemon: Enhance documentation for changing NOFILE limit

2014-03-20 Thread Jiri Denemark
On Wed, Mar 19, 2014 at 09:38:56 -0600, Eric Blake wrote: On 03/19/2014 09:32 AM, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- daemon/libvirtd.sysconf | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/daemon/libvirtd.sysconf

Re: [libvirt] [PATCH] Fix virQEMUCapsLoadCache leaks

2014-03-20 Thread Ján Tomko
On 03/19/2014 06:33 PM, Martin Kletzander wrote: On Wed, Mar 19, 2014 at 05:17:40PM +0100, Ján Tomko wrote: Valgrind reported leaking of maxCpus and arch strings from virXPathString, as well as the leak of the machineMaxCpus array. Use 'tmp' for the strings we don't want to free, to allow

Re: [libvirt] [PATCH V2 13/13] libxl: add migration support

2014-03-20 Thread Michal Privoznik
On 19.03.2014 23:52, Jim Fehlig wrote: Michal Privoznik wrote: On 13.03.2014 23:11, Jim Fehlig wrote: This patch adds initial migration support to the libxl driver, using the VIR_DRV_FEATURE_MIGRATION_PARAMS family of migration functions. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: -

[libvirt] [PATCH] Fix unitialized data in virSocketAddrMask

2014-03-20 Thread Daniel P. Berrange
The virSocketAddrMask method did not initialize all fields in the sockaddr_in6 struct. In paticular the 'sin6_scope_id' field could contain random garbage, which would in turn affect the result of any later virSocketAddrFormat calls. This led to ip6tables rules in the FORWARD chain which matched

Re: [libvirt] [PATCH] Fix unitialized data in virSocketAddrMask

2014-03-20 Thread Michal Privoznik
On 20.03.2014 11:34, Daniel P. Berrange wrote: The virSocketAddrMask method did not initialize all fields in the sockaddr_in6 struct. In paticular the 'sin6_scope_id' field could contain random garbage, which would in turn affect the result of any later virSocketAddrFormat calls. This led to

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

2014-03-20 Thread Daniel P. Berrange
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 functions should be avoided by default, since it prevents

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

2014-03-20 Thread Daniel P. Berrange
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 users

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

2014-03-20 Thread Daniel P. Berrange
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 it might get wrong value on systems with

Re: [libvirt] [PATCH 2/4] bhyve: MAC address configuration

2014-03-20 Thread Daniel P. Berrange
On Thu, Mar 20, 2014 at 09:39:21AM +0100, Wojciech Macek wrote: Add support for MAC address configuration no network bridge interface. --- src/bhyve/bhyve_command.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_command.c

[libvirt] [PATCH 0/6] Misc improvements and fixes to dbus APIs

2014-03-20 Thread Daniel P. Berrange
This series is a bunch of fixes improvements to the dbus APIs needed for the forthcoming new firewall APIs. Daniel P. Berrange (6): Refactor dbus helper methods for method calls Add DBus helper methods for creating reply messages Remove bogus unref in virDBusMessageRead Remove bogus call

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

2014-03-20 Thread Daniel P. Berrange
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 berra...@redhat.com --- src/libvirt_private.syms | 2 ++ src/util/virdbus.c | 60

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

2014-03-20 Thread Daniel P. Berrange
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 berra...@redhat.com --- src/util/virdbus.c | 1 - 1 file changed, 1

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

2014-03-20 Thread Daniel P. Berrange
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 for decoding messages when you don't know how many

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

2014-03-20 Thread Daniel P. Berrange
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-off-by: Daniel P. Berrange berra...@redhat.com ---

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

2014-03-20 Thread Daniel P. Berrange
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 object, instead of creating an error message

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

2014-03-20 Thread Daniel P. Berrange
Split the virDBusMethodCall method into a couple of new methods virDBusCall, virDBusCreateMethod and virDBusCreateMethodV. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 3 + src/util/virdbus.c | 207 +++

[libvirt] [Question] Start VMs coincidently failed

2014-03-20 Thread Wangyufei (James)
Hello, When I start multi VMs coincidently and any of the cgroup directories named machine doesn't exist. There's a chance that VM start failed. And the errors reported are: 1. Unable to initialize /machine cgroup: File exists 2. Unable to create cgroup for sit_vm_16: No such file or directory

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

2014-03-20 Thread Wangyufei (James)
From 0163328efa67da1d63e504c86e323db5affa378f Mon Sep 17 00:00:00 2001 From: Wang Yufei james.wangyu...@huawei.com 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 directories named machine

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

2014-03-20 Thread Amos Kong
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). [ Important Note ] The QemuOptsList member name values are

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

2014-03-20 Thread Michal Privoznik
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 getting 'virsh event' working first, so it missed the last

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

2014-03-20 Thread Roman Bogorodskiy
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 it might get wrong value on

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 Fri, Mar 07, 2014 at 10:54:09AM +0100, Markus Armbruster wrote: Eric Blake ebl...@redhat.com 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 options which have no argument aren't added to

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 Tue, Mar 11, 2014 at 10:04:56AM +0100, Markus Armbruster wrote: Eric Blake ebl...@redhat.com writes: On 03/07/2014 02:54 AM, Markus Armbruster wrote: Eric Blake ebl...@redhat.com writes: On 03/05/2014 07:36 PM, Amos Kong wrote: vm_config_groups[] only contains part of the options

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

[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 jdene...@redhat.com ---

[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 jdene...@redhat.com --- src/lxc/lxc_driver.c | 20

[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

[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 jdene...@redhat.com --- src/conf/domain_conf.c | 79

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

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 ebl...@redhat.com writes: On 03/05/2014 07:36 PM, Amos Kong wrote: vm_config_groups[] only contains part of the options which have argument, and

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] [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 file

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 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 -- |:

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 zhouyi...@huawei.com --- src/util/virlog.c | 2 +- 1

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] [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. ---

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 +1,52 @@

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 in

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 ---

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] string 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.

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]

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] string 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.

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 v2 01/16] Use KR 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 mklet...@redhat.com --- tests/commandhelper.c| 5 +++-- tests/qemuargv2xmltest.c | 3 ++- tests/shunloadhelper.c | 5 +++-- tests/testutils.c| 15 +-

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 qiaonuo...@cn.fujitsu.com ---

Re: [libvirt] [PATCH v2 02/16] Use KR 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 mklet...@redhat.com --- src/xen/xen_driver.c | 6 -- src/xen/xen_hypervisor.c | 5 +++-- src/xen/xm_internal.c | 10 +++--- src/xenapi/xenapi_utils.c | 5 +++--

Re: [libvirt] [PATCH v2 03/16] Use KR 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 mklet...@redhat.com --- src/util/vircgroup.c | 9 ++--- src/util/virconf.c | 5 +++-- src/util/virdbus.c | 8 +--- src/util/virerror.c

Re: [libvirt] [PATCH v2 04/16] Use KR 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 mklet...@redhat.com --- src/rpc/virnetserver.c | 8 +--- src/rpc/virnetserverclient.c | 5 +++-- src/rpc/virnettlscontext.c | 5 +++-- 3 files changed, 11 insertions(+), 7

Re: [libvirt] [PATCH v2 05/16] Use KR 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 mklet...@redhat.com --- src/conf/domain_conf.c | 9 +--- src/conf/domain_nwfilter.c | 13 +++ src/conf/interface_conf.c | 54 ++

Re: [libvirt] [PATCH v2 07/16] Use KR 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 mklet...@redhat.com --- src/storage/storage_backend_fs.c | 12 --- src/storage/storage_driver.c | 78 ++-- 2 files changed, 60 insertions(+), 30

Re: [libvirt] [PATCH v2 09/16] Use KR 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 mklet...@redhat.com --- src/nwfilter/nwfilter_driver.c| 32 +++- src/nwfilter/nwfilter_ebiptables_driver.c | 3 ++- src/nwfilter/nwfilter_learnipaddr.c |

Re: [libvirt] [PATCH v2 10/16] Use KR 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 mklet...@redhat.com --- src/test/test_driver.c | 135 - 1 file changed, 90 insertions(+), 45 deletions(-) ACK Regards, Daniel -- |:

Re: [libvirt] [PATCH v2 08/16] Use KR 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 mklet...@redhat.com --- src/openvz/openvz_conf.c | 15 ++- src/openvz/openvz_driver.c | 45 ++--- 2 files changed, 40 insertions(+), 20

Re: [libvirt] [PATCH v2 06/16] Use KR 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 mklet...@redhat.com --- src/qemu/qemu_agent.c| 5 ++- src/qemu/qemu_command.c | 6 ++- src/qemu/qemu_driver.c | 94 +---

Re: [libvirt] [PATCH v2 14/16] Use KR 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 mklet...@redhat.com --- src/vbox/vbox_driver.c | 5 +- src/vbox/vbox_tmpl.c | 188 + 2 files changed, 132 insertions(+), 61 deletions(-)

Re: [libvirt] [PATCH v2 11/16] Use KR 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 mklet...@redhat.com --- src/uml/uml_conf.c | 5 ++-- src/uml/uml_driver.c | 78 ++-- 2 files changed, 55 insertions(+), 28 deletions(-)

Re: [libvirt] [PATCH v2 12/16] Use KR 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 mklet...@redhat.com --- src/lxc/lxc_driver.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-

Re: [libvirt] [PATCH v2 13/16] Use KR 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 mklet...@redhat.com --- src/network/bridge_driver.c | 54 ++--- 1 file changed, 36 insertions(+), 18 deletions(-) ACK Regards, Daniel -- |:

Re: [libvirt] [PATCH v2 16/16] Require KR 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 KR (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 all

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

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 -

[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:

Re: [libvirt] [PATCH v2 03/16] Use KR 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 mklet...@redhat.com --- src/util/vircgroup.c | 9 ++--- src/util/virconf.c | 5 +++--

[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] 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 james.wangyu...@huawei.com Date: Thu, 20 Mar 2014 07:14:01 + Subject: [PATCH] cgroup: Fix start VMs coincidently failed When I start multi VMs coincidently

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.

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.

[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

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 as

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

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 try to

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 berra...@redhat.com ---

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 berra...@redhat.com --- src/libvirt_private.syms | 3 + src/util/virdbus.c | 207

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.

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 james.wangyu...@huawei.com Date: Thu, 20 Mar 2014 07:14:01 + Subject: [PATCH] cgroup: Fix

[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 +++

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

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 pointer

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 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 berra...@redhat.com --- src/libvirt_private.syms |

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/viriscsitest.c index

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 with the

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 default. I

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 VolOpenCheckMode is

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-off-by:

[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 +++

[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

[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

[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

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 me.

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 process of

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

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/libvirt-override.c

  1   2   >