Re: [libvirt] [PATCH 10/10] conf: extract disk geometry parsing code

2016-04-12 Thread Peter Krempa
On Tue, Apr 12, 2016 at 10:38:40 -0400, Cole Robinson wrote: > On 04/12/2016 09:55 AM, Peter Krempa wrote: > > --- > > src/conf/domain_conf.c | 75 > > +++--- > > 1 file changed, 46 insertions(+), 29 deletions(-) > > > > ACK Thanks for a very swift r

Re: [libvirt] [PATCH 07/10] conf: virDomainDiskDefIotuneParse: Report malformed number errors

2016-04-12 Thread Peter Krempa
On Tue, Apr 12, 2016 at 10:31:29 -0400, Cole Robinson wrote: > On 04/12/2016 09:55 AM, Peter Krempa wrote: > > Rest of the fields of the iotune data structure did not check for > > malformed integers. Use the previously defined macro to extract them > > which will simplify the code and add error re

Re: [libvirt] [PATCH] ZFS: Support sparse volumes

2016-04-12 Thread Roman Bogorodskiy
Richard Laager wrote: > On 03/16/2016 03:26 AM, Roman Bogorodskiy wrote: > > Actually, the primary question is: do we want to add extra logic on top > > of what ZFS does (i.e. disallow refres > volize, 'round' displayed > > allocation) or just make things simple and do and show whatever ZFS > >

Re: [libvirt] [libxl] shutdown a domain before it finishes starting

2016-04-12 Thread Zhangbo (Oscar)
Hi all: Suppose we have a guest domain which is pvops, for example, rhel6.4. Steps to produce the problem: 1 start the guest by virDomainCreate() 2 the API returns before the guest domain fully available, which >means, >>> the disks, network interfaces

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread Martin Kletzander
On Tue, Apr 12, 2016 at 06:24:16PM -0400, TomK wrote: On 4/12/2016 5:08 PM, John Ferlan wrote: Having/using a root squash via an NFS pool is "easy" (famous last words) Create some pool XML (taking the example I have) % cat nfs.xml rootsquash

[libvirt] 答复: How to get GCOV result of make check?

2016-04-12 Thread Zhangbo (Oscar)
>>Hi all: >>I want to get the coverage result of 'make check', here is my way: >>1. ./configure * >>2. make clean -j >>*3*. find ./ -name Makefile |xargs sed -i "s/\= gcc/= gcc -fprofile-arcs >-ftest-coverage/g" # add gcov-related cflags >>4. make check -j >>5.

Re: [libvirt] [PATCH] tests: Fix VIR_TEST_REGENERATE_OUTPUT

2016-04-12 Thread Laine Stump
On 04/12/2016 06:33 PM, Cole Robinson wrote: commit 950a90d489 mocked some virCommand handling for the qemu tests, but we were using that in the test suite to call test-wrap-argv.pl for regenerating test output. Switch the generator code to just use system() instead --- I dislike giving up the

Re: [libvirt] [PATCH 7/7] qemu: process: Wire up ACPI OST events to notify users of failed memory unplug

2016-04-12 Thread Cole Robinson
On 04/05/2016 11:09 AM, Peter Krempa wrote: > Since qemu is now able to notify us that the guest rejected the memory > unplug operation we can relay this to the user and make the API fail > right away. > > Additionally document the possible values from the ACPI docs for future > reference. > > Re

Re: [libvirt] [PATCH 6/7] qemu: monitor: Add support for ACPI_DEVICE_OST event handling

2016-04-12 Thread Cole Robinson
On 04/05/2016 11:09 AM, Peter Krempa wrote: > The event is emitted on ACPI OSPM Status Indication events. > > ACPI standard documentation describes the method as: > > This object is an optional control method that is invoked by OSPM to > indicate processing status to the platform. During device e

Re: [libvirt] [PATCH 5/7] Add VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED event

2016-04-12 Thread Cole Robinson
On 04/05/2016 11:09 AM, Peter Krempa wrote: > Since we didn't opt to use one single event for device lifecycle for a > VM we are missing one last event if the device removal failed. This > event will be emitted once we asked to eject the device but for some > reason it is not possible. > --- > dae

Re: [libvirt] [PATCH 4/7] qemu: hotplug: Add support for signalling device unplug failure

2016-04-12 Thread Cole Robinson
On 04/05/2016 11:09 AM, Peter Krempa wrote: > Similarly to the DEVICE_DELETED event we will be able to tell when > unplug of certain device types will be rejected by the guest OS. Wire up > the device deletion signalling code to allow handling this. > --- > src/qemu/qemu_domain.h | 17 +++

Re: [libvirt] [PATCH 3/7] qemu: Use domain condition for device removal singalling

2016-04-12 Thread Cole Robinson
s/singalling/signaling/ On 04/05/2016 11:09 AM, Peter Krempa wrote: > No need to keep two separate conditions. A slight juggling of return > values is needed to accomodate virDomainObjWaitUntil. > --- > src/qemu/qemu_domain.c | 4 > src/qemu/qemu_domain.h | 1 - > src/qemu/qemu_hotplug.c

Re: [libvirt] [PATCH 2/7] qemu: hotplug: Refactor semantics of qemuDomainWaitForDeviceRemoval

2016-04-12 Thread Cole Robinson
On 04/05/2016 11:09 AM, Peter Krempa wrote: > Neither of the callers cares whether the DEVICE_DELETED event isn't > supported or the event was received. Simplify the code and callers by > unifying the two values and changing the return value constants so that > a temporary variable can be omitted.

Re: [libvirt] [PATCH 1/7] qemu: hotplug: Properly handle errors in qemuDomainWaitForDeviceRemoval

2016-04-12 Thread Cole Robinson
On 04/05/2016 11:09 AM, Peter Krempa wrote: > Callers ignore if this function returns -1 and continue as though the > DEVICE_DELETED event was not received. Since we can't be sure that the > event was not received we should behave as if the event was not > supported and remove the device definition

Re: [libvirt] [PATCH 12/12] qemu: Utilize qemu secret objects for SCSI/RBD auth/secret

2016-04-12 Thread John Ferlan
[...] > configure.ac| 1 + > src/qemu/qemu_alias.c | 23 ++ > src/qemu/qemu_alias.h | 2 + > src/qemu/qemu_command.c | 126 ++ > src/qemu/qemu_command.h | 4 + > src/qemu/qemu_domain.c | 199 > +--

[libvirt] [PATCH v3] util: Add virGettextInitialize, convert the code

2016-04-12 Thread Cole Robinson
Take setlocale/gettext error handling pattern from tools/virsh-* and use it for all standalone binaries via a new shared virGettextInitialize routine. The virsh* pattern differed slightly from other callers. All users now consistently: * Ignore setlocale errors. virsh has done this forever, presum

Re: [libvirt] VIR_TEST_REGENERATE_OUTPUT is broken (Was: [PATCH] qemuxml2argvtest: Adapt to ethernet automatic tap creation)

2016-04-12 Thread Cole Robinson
On 04/12/2016 05:48 PM, Laine Stump wrote: > On 03/23/2016 11:35 AM, Michal Privoznik wrote: >> After 9c17d665fdc5 the tap device for ethernet network type is >> automatically precreated before spawning qemu. Problem is, the >> qemuxml2argvtest wasn't updated and thus is failing. Because of >> all

[libvirt] [PATCH] tests: Fix VIR_TEST_REGENERATE_OUTPUT

2016-04-12 Thread Cole Robinson
commit 950a90d489 mocked some virCommand handling for the qemu tests, but we were using that in the test suite to call test-wrap-argv.pl for regenerating test output. Switch the generator code to just use system() instead --- tests/testutils.c | 19 +-- 1 file changed, 5 insertion

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread TomK
On 4/12/2016 5:08 PM, John Ferlan wrote: On 04/12/2016 03:55 PM, TomK wrote: On 4/12/2016 3:40 PM, Martin Kletzander wrote: [ I would be way easier to reply if you didn't top-post ] On Tue, Apr 12, 2016 at 12:07:50PM -0400, TomK wrote: Hey John, Hehe, I got the right guy then. Very nice!

Re: [libvirt] [PATCH 0/2] host-validate: Don't build on Windows

2016-04-12 Thread Cole Robinson
On 04/12/2016 01:07 PM, Andrea Bolognani wrote: > On Fri, 2016-04-08 at 14:03 -0400, Cole Robinson wrote: >> On 04/08/2016 12:04 PM, Andrea Bolognani wrote: >>> >>> The recent fixes to virt-host-validate have caused the mingw >>> build to fail[1]. >>> >>> Instead of working around Windows' quirks i

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread TomK
On 4/12/2016 4:36 PM, Martin Kletzander wrote: On Tue, Apr 12, 2016 at 10:29:29PM +0200, Martin Kletzander wrote: On Tue, Apr 12, 2016 at 03:55:45PM -0400, TomK wrote: On 4/12/2016 3:40 PM, Martin Kletzander wrote: [ I would be way easier to reply if you didn't top-post ] On Tue, Apr 12, 2016

Re: [libvirt] Fixing libvirt's libxl driver breakage -- where to define LIBXL_API_VERSION?

2016-04-12 Thread Wei Liu
On Tue, Apr 12, 2016 at 03:31:46PM -0600, Jim Fehlig wrote: > Wei Liu wrote: > > Hi libvirt maintainers, > > Sorry for the delay. Slowly catching up on mail after vacation... > > > > > Xen's control library libxenlight (libxl) requires application > > (libvirt in this case) to explictily define

[libvirt] VIR_TEST_REGENERATE_OUTPUT is broken (Was: [PATCH] qemuxml2argvtest: Adapt to ethernet automatic tap creation)

2016-04-12 Thread Laine Stump
On 03/23/2016 11:35 AM, Michal Privoznik wrote: After 9c17d665fdc5 the tap device for ethernet network type is automatically precreated before spawning qemu. Problem is, the qemuxml2argvtest wasn't updated and thus is failing. Because of all the APIs that new code is calling, I had to mock a lot.

Re: [libvirt] Fixing libvirt's libxl driver breakage -- where to define LIBXL_API_VERSION?

2016-04-12 Thread Jim Fehlig
Wei Liu wrote: > Hi libvirt maintainers, Sorry for the delay. Slowly catching up on mail after vacation... > > Xen's control library libxenlight (libxl) requires application > (libvirt in this case) to explictily define LIBXL_API_VERSION. Where is this requirement written? :-) > This is > lack

Re: [libvirt] [PATCH] ZFS: Support sparse volumes

2016-04-12 Thread Richard Laager
On 03/16/2016 03:26 AM, Roman Bogorodskiy wrote: Actually, the primary question is: do we want to add extra logic on top of what ZFS does (i.e. disallow refres > volize, 'round' displayed allocation) or just make things simple and do and show whatever ZFS allows us to do and to show respectively.

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread John Ferlan
On 04/12/2016 03:55 PM, TomK wrote: > > On 4/12/2016 3:40 PM, Martin Kletzander wrote: >> [ I would be way easier to reply if you didn't top-post ] >> >> On Tue, Apr 12, 2016 at 12:07:50PM -0400, TomK wrote: >>> Hey John, >>> >>> Hehe, I got the right guy then. Very nice! And very good ideas b

Re: [libvirt] [libvirt-php PATCH 03/35] add missing arginfo (wip)

2016-04-12 Thread Neal Gompa
On Tue, Apr 12, 2016 at 11:13 AM, Michal Privoznik wrote: > This is not rebased onto current HEAD. > > Michal Hello Michal, I've rebased the patch set on the current HEAD as well as done some patch squashing to reduce the number of patches[1]. Would you like for me to resend the patch set based

Re: [libvirt] [libvirt-php PATCH 09/35] adapt add_assoc_string_ex

2016-04-12 Thread Neal Gompa
On Tue, Apr 12, 2016 at 11:13 AM, Michal Privoznik wrote: > > I'm afraid, this will not fly. While preprocessing this code, my > compiler tries to expand RETURN_STRING() macro first (with VIRT_COPY_OPT > still not expanded). Therefore it finds an argument missing and produces > an compilation erro

[libvirt] [PATCH] qemu: migration: Drop dead VNC cookie handling

2016-04-12 Thread Cole Robinson
The only caller of this code is: for (i = 0; i < dom->def->ngraphics; i++) { if (dom->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { if (!(mig->graphics = qemuMigrationCookieGraphicsAlloc(driver, dom->def->graphics[i]))) return -1

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread Martin Kletzander
On Tue, Apr 12, 2016 at 10:29:29PM +0200, Martin Kletzander wrote: On Tue, Apr 12, 2016 at 03:55:45PM -0400, TomK wrote: On 4/12/2016 3:40 PM, Martin Kletzander wrote: [ I would be way easier to reply if you didn't top-post ] On Tue, Apr 12, 2016 at 12:07:50PM -0400, TomK wrote: On 4/12/2016

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread Martin Kletzander
On Tue, Apr 12, 2016 at 03:55:45PM -0400, TomK wrote: On 4/12/2016 3:40 PM, Martin Kletzander wrote: [ I would be way easier to reply if you didn't top-post ] On Tue, Apr 12, 2016 at 12:07:50PM -0400, TomK wrote: On 4/12/2016 11:45 AM, John Ferlan wrote: What got my attention was the error me

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread TomK
On 4/12/2016 3:40 PM, Martin Kletzander wrote: [ I would be way easier to reply if you didn't top-post ] On Tue, Apr 12, 2016 at 12:07:50PM -0400, TomK wrote: Hey John, Hehe, I got the right guy then. Very nice! And very good ideas but I may need more time to reread and try them out later t

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread Martin Kletzander
[ I would be way easier to reply if you didn't top-post ] On Tue, Apr 12, 2016 at 12:07:50PM -0400, TomK wrote: Hey John, Hehe, I got the right guy then. Very nice! And very good ideas but I may need more time to reread and try them out later tonight. I'm fully in agreement about providing m

[libvirt] [PATCH v3 2/6] vz: introduce new vzDriver lockable structure and use it

2016-04-12 Thread Maxim Nestratov
This patch introduces a new 'vzDriver' lockable object and provides helper functions to allocate/destroy it and we pass it to prlsdkXxx functions instead of virConnectPtr. Now we store domain related objects such as domain list, capabitilies etc. within a single vz_driver vzDriver structure, which

Re: [libvirt] [PATCH 01/10] util: Rename and move virStrIsPrint to virStringIsPrintable

2016-04-12 Thread Jiri Denemark
On Tue, Apr 12, 2016 at 15:55:35 +0200, Peter Krempa wrote: > --- > src/conf/domain_conf.c | 4 ++-- > src/libvirt_private.syms | 2 +- > src/util/virstring.c | 18 ++ > src/util/virstring.h | 2 ++ > src/util/virutil.c | 12 > src/util/virutil.h

[libvirt] [PATCH v3 3/6] vz: lock driver when a new domain is created in prlsdkNewDomainByHandle

2016-04-12 Thread Maxim Nestratov
there can be a race with vzDomainDefineXMLFlags Signed-off-by: Maxim Nestratov --- src/vz/vz_sdk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index db14e78..dcc2703 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -1257,6 +1257,7 @@ prlsdkNewDoma

[libvirt] [PATCH v3 4/6] vz: implement connectGetSysinfo hypervisor callback

2016-04-12 Thread Maxim Nestratov
Signed-off-by: Maxim Nestratov --- src/vz/vz_driver.c | 25 + src/vz/vz_utils.h | 1 + 2 files changed, 26 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 7564b6a..03b3aa8 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -179,6 +179,7

[libvirt] [PATCH v3 1/6] vz: build driver as module and don't register it on client's side

2016-04-12 Thread Maxim Nestratov
Make it possible to build vz driver as a module and don't link it with libvirt.so statically. Remove registering it on client's side as far as we start relying on daemon Signed-off-by: Maxim Nestratov --- daemon/Makefile.am | 4 daemon/libvirtd.c| 9 + src/Makefile.a

[libvirt] [PATCH v3 6/6] vz: minor cleanup

2016-04-12 Thread Maxim Nestratov
remove unnecessary vzConnectClose prototype and make local structure vzDomainDefParserConfig be static Signed-off-by: Maxim Nestratov --- src/vz/vz_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 81fb130..ce50919 100644

[libvirt] [PATCH v3 0/6] vz: change vz driver to be stateful driver and other enhancements

2016-04-12 Thread Maxim Nestratov
There is no benefit in providing two ways of connecting to vz driver: by connecting via daemon and directly from client. Both ways finally come to a host where vz daemon sits. Always connecting via daemon allows us to have a single list of domains and share it among all connections. Since v1: rem

[libvirt] [PATCH v3 5/6] vz: remove vzDriverLock/Unlock function

2016-04-12 Thread Maxim Nestratov
We don't need them anymore as all pointers within vzDriver structure are not changed during the time it exists. Where we still need to synchronize we use virObjectLock/Unlock as far as vzDriver is lockable object. Signed-off-by: Maxim Nestratov --- src/vz/vz_driver.c | 40 ---

Re: [libvirt] [PATCH v2 06/10] vz: introduce new vzDriver lockable structure and use it

2016-04-12 Thread Maxim Nestratov
12.04.2016 14:11, Nikolay Shirokovskiy пишет: On 07.04.2016 23:09, Maxim Nestratov wrote: This patch introduces a new 'vzDriver' lockable object and provides helper functions to allocate/destroy it and we pass it to prlsdkXxx functions instead of virConnectPtr. Now we store domain related objec

Re: [libvirt] [PATCH v2 04/10] vz: add Hypervisor prefix to vz and parallels Driver structures

2016-04-12 Thread Maxim Nestratov
12.04.2016 17:04, Nikolay Shirokovskiy пишет: On 07.04.2016 23:09, Maxim Nestratov wrote: --- src/vz/vz_driver.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 9de88cd..f2bbf1e 100644 --- a/src/vz/vz_driver.c +++

Re: [libvirt] [PATCH 0/2] host-validate: Don't build on Windows

2016-04-12 Thread Andrea Bolognani
On Fri, 2016-04-08 at 14:03 -0400, Cole Robinson wrote: > On 04/08/2016 12:04 PM, Andrea Bolognani wrote: > > > > The recent fixes to virt-host-validate have caused the mingw > > build to fail[1]. > > > > Instead of working around Windows' quirks in the tool, just > > stop building it altogether

[libvirt] [PATCH v2] util: Add virGettextInitialize, convert the code

2016-04-12 Thread Cole Robinson
Take setlocale/gettext error handling pattern from tools/virsh-* and use it for all standalone binaries via a new shared virGettextInitialize routine. The virsh* pattern differed slightly from other callers. All users now consistently: * Ignore setlocale errors. virsh has done this forever, presum

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread TomK
Hey John, Hehe, I got the right guy then. Very nice! And very good ideas but I may need more time to reread and try them out later tonight. I'm fully in agreement about providing more details. Can't be accurate in a diagnosis if there isn't much data to go on. This pool option is new to

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread John Ferlan
On 04/12/2016 10:58 AM, TomK wrote: > Hey Martin, > > Thanks very much. Appreciate you jumping in on this thread. Can you provide some more details with respect to which libvirt version you have installed. I know I've made changes in this space in more recent versions (not the most recent). I'

Re: [libvirt] [libvirt-php PATCH 03/35] add missing arginfo (wip)

2016-04-12 Thread Michal Privoznik
On 09.04.2016 00:08, Neal Gompa wrote: > From: Remi Collet > > --- > src/libvirt-php.c | 458 > +++--- > 1 file changed, 371 insertions(+), 87 deletions(-) > This is not rebased onto current HEAD. Michal -- libvir-list mailing list libvir-list

Re: [libvirt] [libvirt-php PATCH 09/35] adapt add_assoc_string_ex

2016-04-12 Thread Michal Privoznik
On 09.04.2016 00:08, Neal Gompa wrote: > From: Remi Collet > > --- > src/libvirt-php.c | 299 > ++ > 1 file changed, 99 insertions(+), 200 deletions(-) > > diff --git a/src/libvirt-php.c b/src/libvirt-php.c > index d37fd6f..0459bb9 100644 > -

Re: [libvirt] [libvirt-php PATCH 04/35] fix typo in config.m4

2016-04-12 Thread Michal Privoznik
On 09.04.2016 00:08, Neal Gompa wrote: > From: Remi Collet > > --- > install-sh| 366 > +++--- > missing | 2 +- > src/config.m4 | 12 +- > 3 files changed, 204 insertions(+), 176 deletions(-) This looks very suspicious. Why is

Re: [libvirt] [libvirt-php PATCH 01/35] add config.m4 to allow standard PHP extension build system

2016-04-12 Thread Michal Privoznik
On 09.04.2016 00:08, Neal Gompa wrote: > From: Remi Collet > > --- > src/config.m4 | 52 > 1 file changed, 52 insertions(+) > create mode 100644 src/config.m4 > > diff --git a/src/config.m4 b/src/config.m4 > new file mode 100644 > index

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread TomK
Hey Martin, Thanks very much. Appreciate you jumping in on this thread. You see, that's just it. I've configured libvirt .conf files to run as oneadmin.oneadmin (non previlidged) for that NFS share and I can access all the files on that share as oneadmin without error, including the one you

Re: [libvirt] [PATCH v2 10/10] vz: change vzConnectIsAlive behavior

2016-04-12 Thread Nikolay Shirokovskiy
On 07.04.2016 23:10, Maxim Nestratov wrote: > Now it detects if a connection to vz dispatcher is up or not by > comparing current driver to connection stored pointer. > > Signed-off-by: Maxim Nestratov > --- > src/vz/vz_driver.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > >

[libvirt] [PATCH 06/12] qemu: hotplug: Assume support for -device for attach virtio disk

2016-04-12 Thread John Ferlan
Since support for QEMU_CAPS_DEVICE is not assumed, let's drop the legacy code to make life easier going forward. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 79 + 1 file changed, 33 insertions(+), 46 deletions(-) diff --git a/src/qemu

Re: [libvirt] [PATCH 08/15] conf: utility function to convert PCI controller model into connect type

2016-04-12 Thread Laine Stump
On 04/05/2016 08:33 AM, Ján Tomko wrote: On Thu, Mar 24, 2016 at 03:25:43PM -0400, Laine Stump wrote: There are two places in qemu_domain_address.c where we have a switch statement to convert PCI controller models (VIR_DOMAIN_CONTROLLER_MODEL_PCI*) into the connection type flag that is matched w

[libvirt] [PATCH 09/12] qemu: hotplug: Adjust error path for attach hostdev scsi disk

2016-04-12 Thread John Ferlan
Shortly a new object could be added making this code even more confusing, so let's just adjust the exit path now to make it clearer. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 56 ++--- 1 file changed, 34 insertions(+), 22 deletions(-) d

[libvirt] [PATCH 02/12] qemu: Introduce qemuDomainSecretPrepare and Destroy

2016-04-12 Thread John Ferlan
Rather than needing to pass the conn parameter to various command line building API's, add qemuDomainSecretPrepare just prior to the qemuProcessLaunch which calls qemuBuilCommandLine. The function must be called after qemuProcessPrepareHost since it's expected to eventually need the domain masterKe

[libvirt] [PATCH 10/12] qemu: hotplug: Fix possible memory leak of props

2016-04-12 Thread John Ferlan
If we failed to build the aliases or attach the chardev, then the props would be leaked - fix that. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b6cf196..c82d455 100644 --- a/

[libvirt] [PATCH 08/12] qemu: hotplug: Adjust error path for attach scsi disk

2016-04-12 Thread John Ferlan
Shortly a new object could be added making this code even more confusing, so let's just adjust the exit path now to make it clearer. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/sr

[libvirt] [PATCH 04/12] qemu: Introduce qemuDomainSecretHostdevPrepare and Destroy

2016-04-12 Thread John Ferlan
Similar to the qemuDomainSecretDiskPrepare, generate the secret for the Hostdev's prior to call qemuProcessLaunch which calls qemuBuildCommandLine. Additionally, since the secret is not longer added as part of building the command, the hotplug code will need to make the call to add the secret in th

[libvirt] [PATCH 11/12] qemu: Introduce qemuDomainSecretIV

2016-04-12 Thread John Ferlan
Add the data structure and infrastructure to support an initialization vector (IV) secret. The IV secret generation will need to have access to the domain private master key, so let's make sure the prepare disk and hostdev functions can accept that now. Anywhere that needs to make a decision over

[libvirt] [PATCH 07/12] qemu: hotplug: Adjust error path for attach virtio disk

2016-04-12 Thread John Ferlan
Shortly a new object could be added making this code even more confusing, so let's just adjust the exit path now to make it clearer. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 55 - 1 file changed, 32 insertions(+), 23 deletions(-) d

[libvirt] [PATCH 05/12] qemu: Use qemuDomainSecretInfoPtr in qemuBuildNetworkDriveURI

2016-04-12 Thread John Ferlan
Rather than take username and password as parameters, now take a qemuDomainSecretInfoPtr and decode within the function. NB: Having secinfo implies having the username for a plain type from a successful virSecretGetSecretString Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 40 +++

[libvirt] [PATCH 12/12] qemu: Utilize qemu secret objects for SCSI/RBD auth/secret

2016-04-12 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1182074 If they're available and we need to pass secrets to qemu, then use the qemu domain secret object in order to pass the secrets for iSCSI and RBD volumes instead of passing plaintext or base64 encoded secrets on the command line. New APIs: qemu

[libvirt] [PATCH 01/12] qemu: Introduce qemuDomainSecretInfo

2016-04-12 Thread John Ferlan
Introduce a new private structure to hold qemu domain auth/secret data. This will be stored in the qemuDomainDiskPrivate as a means to store the auth and fetched secret data rather than generating during building of the command line. The initial changes will handle the current username and secret

[libvirt] [PATCH 03/12] qemu: Introduce qemuDomainHostdevPrivatePtr

2016-04-12 Thread John Ferlan
Modeled after the qemuDomainDiskPrivatePtr logic, create a privateData pointer in the _virDomainHostdevDef to allow storage of private data for a hypervisor in order to at least temporarily store auth/secrets data for usage during qemuBuildCommandLine. NB: Since the qemu_parse_command (qemuParseCo

[libvirt] [PATCH 00/12] Add IV Secret Object support

2016-04-12 Thread John Ferlan
The first 5 patches handle changing the current mechanism of getting the secret while building the command line into a mechanism where the secret is built and stored as part of the disk or hostdev private data and then parsed during command line generation. The end result is to remove the 'conn' p

Re: [libvirt] [PATCH v2 09/10] vz: minor cleanup

2016-04-12 Thread Nikolay Shirokovskiy
On 07.04.2016 23:10, Maxim Nestratov wrote: > remove unnecessary vzConnectClose prototype and make > local structure vzDomainDefParserConfig be static > > Signed-off-by: Maxim Nestratov > --- > src/vz/vz_driver.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/v

Re: [libvirt] [PATCH 09/10] conf: Refactor virDomainDiskDefMirrorParse

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > Now that the mirror parsing code is not crammed in the main disk parser > we can employ better coding style. > --- > src/conf/domain_conf.c | 75 > +- > 1 file changed, 31 insertions(+), 44 deletions(-)

Re: [libvirt] [PATCH 10/10] conf: extract disk geometry parsing code

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > --- > src/conf/domain_conf.c | 75 > +++--- > 1 file changed, 46 insertions(+), 29 deletions(-) > ACK - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/lib

Re: [libvirt] [PATCH 06/10] conf: virDomainDiskDefIotuneParse: simplfiy parsing

2016-04-12 Thread Ján Tomko
s/simplfiy/simplify/ in the commit summary. Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 08/10] vz: remove vzDriverLock/Unlock function

2016-04-12 Thread Nikolay Shirokovskiy
On 07.04.2016 23:10, Maxim Nestratov wrote: > We don't need them anymore as all pointers within vzDriver structure > are not changed during the time it exists. > Where we still need to synchronize we use virObjectLock/Unlock as far > as vzDriver is lockable object. > > Signed-off-by: Maxim Nestr

Re: [libvirt] [PATCH 08/10] conf: disk: Split out parsing of disk mirror data

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > Changes are indentation and 'cleanup' label instead of 'error'. > --- > src/conf/domain_conf.c | 192 > ++--- > 1 file changed, 104 insertions(+), 88 deletions(-) > ACK - Cole -- libvir-list mailing list

Re: [libvirt] [PATCH 07/10] conf: virDomainDiskDefIotuneParse: Report malformed number errors

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > Rest of the fields of the iotune data structure did not check for > malformed integers. Use the previously defined macro to extract them > which will simplify the code and add error reporting. > --- > src/conf/domain_conf.c | 50 >

Re: [libvirt] [PATCH 06/10] conf: virDomainDiskDefIotuneParse: simplfiy parsing

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > Since the structure was pre-initialized to 0 we don't need to set every > single member to 0 if it's not present in the XML. Additionally if we > put the name of the field into the error message the code can be > simplified using a macro to parse the me

Re: [libvirt] [PATCH 05/10] conf: disk: Remove error label from virDomainDiskDefIotuneParse

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > Since this function isn't doing any cleanup, the label is not necessary. > --- > src/conf/domain_conf.c | 23 ++- > 1 file changed, 10 insertions(+), 13 deletions(-) > ACK - Cole -- libvir-list mailing list libvir-list@redhat.co

Re: [libvirt] [PATCH v2 07/10] vz: implement connectGetSysinfo hypervisor callback

2016-04-12 Thread Nikolay Shirokovskiy
On 07.04.2016 23:09, Maxim Nestratov wrote: > Signed-off-by: Maxim Nestratov > --- > src/vz/vz_driver.c | 25 + > src/vz/vz_utils.h | 1 + > 2 files changed, 26 insertions(+) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listin

Re: [libvirt] [PATCH 04/10] conf: disk: Extract iotune parsing into a separate func

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > --- > src/conf/domain_conf.c | 312 > ++--- > 1 file changed, 163 insertions(+), 149 deletions(-) > ACK - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/l

Re: [libvirt] [PATCH 0/7] Add notification for memory hot-unplug failure

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:53 AM, Peter Krempa wrote: > On Tue, Apr 05, 2016 at 17:09:16 +0200, Peter Krempa wrote: >> Add a new libvirt event VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED that will >> handle failure to unplug a device if we are certain that it will not be >> unplugged >> and wire up the ACPI_D

Re: [libvirt] [PATCH v2 04/10] vz: add Hypervisor prefix to vz and parallels Driver structures

2016-04-12 Thread Nikolay Shirokovskiy
On 07.04.2016 23:09, Maxim Nestratov wrote: > --- > src/vz/vz_driver.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c > index 9de88cd..f2bbf1e 100644 > --- a/src/vz/vz_driver.c > +++ b/src/vz/vz_driver.c > @@ -1491,7

Re: [libvirt] [PATCH] Be consistent with setlocale error handling

2016-04-12 Thread Cole Robinson
On 04/12/2016 10:10 AM, Daniel P. Berrange wrote: > On Tue, Apr 12, 2016 at 10:00:48AM -0400, Cole Robinson wrote: >> Take setlocale/gettext error handling pattern from tools/virsh-* >> and use it in all the other standalone binaries. The changes are >> >> * Ignore setlocale errors. virsh has done

Re: [libvirt] [PATCH] Be consistent with setlocale error handling

2016-04-12 Thread Daniel P. Berrange
On Tue, Apr 12, 2016 at 10:00:48AM -0400, Cole Robinson wrote: > Take setlocale/gettext error handling pattern from tools/virsh-* > and use it in all the other standalone binaries. The changes are > > * Ignore setlocale errors. virsh has done this forever, presumably for > good reason. This has

Re: [libvirt] [PATCH 03/10] conf: disk: Remove one unnecessary level of indentation

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > Also simplify the code by switching to a for loop. > --- > src/conf/domain_conf.c | 737 > - > 1 file changed, 368 insertions(+), 369 deletions(-) > git show -w makes it clear: diff --git a/src/conf/d

Re: [libvirt] [PATCH 02/10] conf: disk: Don't initialize fields allocated by calloc

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > All the fields were initialized to 0. > --- > src/conf/domain_conf.c | 8 > 1 file changed, 8 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 0320691..aa96bac 100644 > --- a/src/conf/domain_conf.c > +++ b

[libvirt] [PATCH] Libvirt: virTypedParamsValidate: Fix detection of multiple parameters

2016-04-12 Thread Jason J. Herne
virTypedParamsValidate currently uses an index based check to find duplicate parameters. This check does not work. Consider the following simple example: We have only 2 keys A (multiples allowed) B (multiples NOT allowed) We are given the following list of parameters to check: A A B If you wor

Re: [libvirt] [PATCH 01/10] util: Rename and move virStrIsPrint to virStringIsPrintable

2016-04-12 Thread Cole Robinson
On 04/12/2016 09:55 AM, Peter Krempa wrote: > --- > src/conf/domain_conf.c | 4 ++-- > src/libvirt_private.syms | 2 +- > src/util/virstring.c | 18 ++ > src/util/virstring.h | 2 ++ > src/util/virutil.c | 12 > src/util/virutil.h | 2 -- > 6

[libvirt] [PATCH 01/10] util: Rename and move virStrIsPrint to virStringIsPrintable

2016-04-12 Thread Peter Krempa
--- src/conf/domain_conf.c | 4 ++-- src/libvirt_private.syms | 2 +- src/util/virstring.c | 18 ++ src/util/virstring.h | 2 ++ src/util/virutil.c | 12 src/util/virutil.h | 2 -- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git

Re: [libvirt] [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path

2016-04-12 Thread Martin Kletzander
On Mon, Apr 11, 2016 at 08:02:04PM -0400, TomK wrote: Hey All, Wondering if anyone had any suggestions on this topic? The only thing I can come up with is: '/var/lib/one//datastores/0/38/disk.1': Permission denied ... that don't have access to that file. Could you elaborate on that? I thin

[libvirt] [PATCH 04/10] conf: disk: Extract iotune parsing into a separate func

2016-04-12 Thread Peter Krempa
--- src/conf/domain_conf.c | 312 ++--- 1 file changed, 163 insertions(+), 149 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f359e95..c2ac8d6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6676,6 +

Re: [libvirt] [PATCH v2 03/10] vz: remove drivername field from vzConn structure

2016-04-12 Thread Nikolay Shirokovskiy
On 07.04.2016 23:09, Maxim Nestratov wrote: > No need to remember connection name and have corresponding > domain type to keep backward compatibility with former > 'parallels' driver. It is enough to be able to accept 'parallels' > uri and domain types. > > Signed-off-by: Maxim Nestratov > ---

[libvirt] [PATCH] Be consistent with setlocale error handling

2016-04-12 Thread Cole Robinson
Take setlocale/gettext error handling pattern from tools/virsh-* and use it in all the other standalone binaries. The changes are * Ignore setlocale errors. virsh has done this forever, presumably for good reason. This has been partially responsible for some bug reports: https://bugzilla.redh

Re: [libvirt] [PATCH] tests: fix xen-related tests

2016-04-12 Thread Pavel Hrdina
On Tue, Apr 12, 2016 at 03:04:07PM +0200, Ján Tomko wrote: > My commit 6879be4 moved the addition of the implicit video device > from the XML parser to the PostParse function, but did not regenerate > all the tests. > --- ACK, Pavel -- libvir-list mailing list libvir-list@redhat.com https://www.r

[libvirt] [PATCH] vz: correct iomode check

2016-04-12 Thread Mikhail Feoktistov
Virtuozzo hypervisor supports native iomode. So we should allow to add disk with iomode "native" or "default". --- src/vz/vz_utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index fed48a5..a89cf73 100644 --- a/src/vz/vz_utils.c

[libvirt] [PATCH 07/10] conf: virDomainDiskDefIotuneParse: Report malformed number errors

2016-04-12 Thread Peter Krempa
Rest of the fields of the iotune data structure did not check for malformed integers. Use the previously defined macro to extract them which will simplify the code and add error reporting. --- src/conf/domain_conf.c | 50 -- 1 file changed, 8 inserti

[libvirt] [PATCH 02/10] conf: disk: Don't initialize fields allocated by calloc

2016-04-12 Thread Peter Krempa
All the fields were initialized to 0. --- src/conf/domain_conf.c | 8 1 file changed, 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0320691..aa96bac 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6737,14 +6737,6 @@ virDomainDiskDe

[libvirt] [PATCH 06/10] conf: virDomainDiskDefIotuneParse: simplfiy parsing

2016-04-12 Thread Peter Krempa
Since the structure was pre-initialized to 0 we don't need to set every single member to 0 if it's not present in the XML. Additionally if we put the name of the field into the error message the code can be simplified using a macro to parse the members. --- src/conf/domain_conf.c | 81 +---

[libvirt] [PATCH 09/10] conf: Refactor virDomainDiskDefMirrorParse

2016-04-12 Thread Peter Krempa
Now that the mirror parsing code is not crammed in the main disk parser we can employ better coding style. --- src/conf/domain_conf.c | 75 +- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_co

[libvirt] [PATCH 08/10] conf: disk: Split out parsing of disk mirror data

2016-04-12 Thread Peter Krempa
Changes are indentation and 'cleanup' label instead of 'error'. --- src/conf/domain_conf.c | 192 ++--- 1 file changed, 104 insertions(+), 88 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 64561df..802a6fe 100644 --- a/s

[libvirt] [PATCH 10/10] conf: extract disk geometry parsing code

2016-04-12 Thread Peter Krempa
--- src/conf/domain_conf.c | 75 +++--- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e64471d..b5f2b91 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6838,6 +68

[libvirt] [PATCH 05/10] conf: disk: Remove error label from virDomainDiskDefIotuneParse

2016-04-12 Thread Peter Krempa
Since this function isn't doing any cleanup, the label is not necessary. --- src/conf/domain_conf.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c2ac8d6..ac464d3 100644 --- a/src/conf/domain_conf

  1   2   >