Re: [libvirt] [PATCH v1 09/23] lock_protocol: Add two new remote procedures

2015-10-16 Thread John Ferlan
On 10/16/2015 10:54 AM, Michal Privoznik wrote: > On 16.10.2015 09:17, Peter Krempa wrote: >> On Mon, Oct 12, 2015 at 12:25:54 +0200, Michal Privoznik wrote: >>> These procedures will be used to store and bring back security >>> labels. So far, the idea is that tuple (path, model, label) is >>> e

[libvirt] [PATCH v2 5/9] admin: Do not generate remoteAdminConnect{Open, Close}

2015-10-16 Thread Erik Skultety
As we plan to add more and more logic to remote connecting methods, these cannot be generated from admin_protocol.x anymore. Instead, this patch implements these to methods explicitly. --- src/admin/admin_protocol.x | 4 ++-- src/admin/admin_remote.c | 45 +++

[libvirt] [PATCH v2 6/9] admin: Add URI support and introduce virAdmGetDefaultURI

2015-10-16 Thread Erik Skultety
Since virt-admin should be able to connect to various admin servers on hosted different daemons, we need to provide URI support to libvirt-admin. --- include/libvirt/libvirt-admin.h | 2 + src/datatypes.c | 2 + src/datatypes.h | 1 + src/libvirt-admin.c

[libvirt] [PATCH v2 9/9] virt-admin: Provide a man page for virt-admin

2015-10-16 Thread Erik Skultety
--- tools/Makefile.am| 8 +- tools/virt-admin.pod | 278 +++ 2 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 tools/virt-admin.pod diff --git a/tools/Makefile.am b/tools/Makefile.am index e68fe84..d8cc1e7 100644 --- a/tool

[libvirt] [PATCH v2 2/9] virt-admin: Introduce first working skeleton

2015-10-16 Thread Erik Skultety
This patch introduces virt-admin client which is based on virsh client, but had to reimplement several methods to meet virt-admin specific needs or remove unnecessary virsh specific logic. --- .gitignore | 1 + daemon/libvirtd.c | 1 - po/POTFILES.in | 1 + tools/Makefile.am |

[libvirt] [PATCH v2 8/9] admin: Introduce virAdmConnectGetLibVersion

2015-10-16 Thread Erik Skultety
Introduce a new API to get libvirt version. It is worth noting, that libvirt-admin and libvirt share the same version number. Unfortunately, our existing API isn't generic enough to be used with virAdmConnectPtr as well. Also this patch wires up this API to the virt-admin client as a generic cmdVer

[libvirt] [PATCH v2 7/9] admin: Add support for connection close callbacks

2015-10-16 Thread Erik Skultety
As we need a client disconnect handler, we also need a mechanism to register such handlers for a client. This patch introduced both the close callbacks and also the client vshAdmCatchDisconnect handler to be registered with it. By registering the handler we still need to make sure the client can re

[libvirt] [PATCH v2 0/9] Introduce virt-admin client

2015-10-16 Thread Erik Skultety
v1: 1/9 - ACKed if adjusted 6/9 - ACKed 8/9 - ACKed if squashed into 4/9 --> resolves 7/9 v2: - double empty line in private.syms is preserved (1/9) - adjusted authors of virt-admin modules (2/9) - removed unnecessary includes from virt-admin module (2/9) - replaced "int" disconnected type

[libvirt] [PATCH v2 3/9] admin: Introduce virAdmConnectIsAlive

2015-10-16 Thread Erik Skultety
Since most of our APIs rely on an acive functional connection to a daemon and we have such a mechanism in libvirt already, there's need to have such a way in libvirt-admin as well. By introducing a new public API, this patch provides support to check for an active connection. --- include/libvirt/l

[libvirt] [PATCH v2 1/9] libvirt: Export libvirt config getters by moving them to util

2015-10-16 Thread Erik Skultety
virConnectGetConfig and virConnectGetConfigPath were static libvirt methods, merely because there hasn't been any need for having them internally exported yet. Since libvirt-admin also needs to reference libvirt config file, 'xGetConfig' should be exported. Besides moving, this patch also renames t

[libvirt] [PATCH v2 4/9] admin: Move remote admin API version to a separate module

2015-10-16 Thread Erik Skultety
By moving the remote version into a separate module, we gain a slightly better maintainability in the long run than just by leaving it in one place with the existing libvirt-admin library which can start getting pretty messy later on. --- src/admin/admin_remote.c | 136

Re: [libvirt] [PATCHv3 1/2] network: added waiting for DAD to finish for bridge address.

2015-10-16 Thread Laine Stump
On 10/16/2015 12:51 PM, Maxim Perevedentsev wrote: On 10/15/2015 09:03 PM, Laine Stump wrote: This loop *really* bothers me, because there is no failsafe to terminate it if we never get positive notification that DAD has completed. This would lock up the network driver startup, which would loc

Re: [libvirt] [PATCHv3 1/2] network: added waiting for DAD to finish for bridge address.

2015-10-16 Thread Maxim Perevedentsev
On 10/15/2015 09:03 PM, Laine Stump wrote: This loop *really* bothers me, because there is no failsafe to terminate it if we never get positive notification that DAD has completed. This would lock up the network driver startup, which would lock up libvirtd startup. I think we need to decide on

Re: [libvirt] [PATCH v1 12/23] virtlockd: Work virSeclabelSpace in

2015-10-16 Thread Michal Privoznik
On 16.10.2015 09:32, Peter Krempa wrote: > On Mon, Oct 12, 2015 at 12:25:57 +0200, Michal Privoznik wrote: > > A rather sparse commit message. > >> Signed-off-by: Michal Privoznik >> --- >> src/locking/lock_daemon.c | 44 ++ >> src/locking/lock_daemon.h

Re: [libvirt] [PATCH v1 00/23] Keep original seclabel

2015-10-16 Thread Michal Privoznik
On 12.10.2015 12:25, Michal Privoznik wrote: > So, you may be familiar with this already. Well, I've tried to get these > patches in like a year ago (or even more). Point is, these ones are new, > written from scratch. However, still based on idea, that virtlockd will keep > the track of the origin

Re: [libvirt] [PATCH v1 09/23] lock_protocol: Add two new remote procedures

2015-10-16 Thread Michal Privoznik
On 16.10.2015 09:17, Peter Krempa wrote: > On Mon, Oct 12, 2015 at 12:25:54 +0200, Michal Privoznik wrote: >> These procedures will be used to store and bring back security >> labels. So far, the idea is that tuple (path, model, label) is >> enough. Well, certainly for DAC and SELinux. The function

Re: [libvirt] [PATCH v1 04/23] security_dac: Introduce remember/recall stubs

2015-10-16 Thread Michal Privoznik
On 16.10.2015 07:43, Peter Krempa wrote: > On Mon, Oct 12, 2015 at 12:25:49 +0200, Michal Privoznik wrote: >> These stubs will be worked in later. They merely lay out the >> structure of the feature. >> >> Signed-off-by: Michal Privoznik >> --- >> src/security/security_dac.c | 45 >>

Re: [libvirt] [PATCH v1 09/23] lock_protocol: Add two new remote procedures

2015-10-16 Thread John Ferlan
On 10/12/2015 06:25 AM, Michal Privoznik wrote: > These procedures will be used to store and bring back security > labels. So far, the idea is that tuple (path, model, label) is > enough. Well, certainly for DAC and SELinux. The functions are: > > VIR_LOCK_SPACE_PROTOCOL_PROC_REMEMBER_SECLABEL

Re: [libvirt] [PATCH 2/9] virt-admin: Introduce first working skeleton

2015-10-16 Thread Martin Kletzander
On Wed, Oct 14, 2015 at 01:25:13PM +0200, Michal Privoznik wrote: On 13.10.2015 15:38, Erik Skultety wrote: This patch introduces virt-admin client which is based on virsh client, but had to reimplement several methods to meet virt-admin specific needs or remove unnecessary virsh specific logic.

[libvirt] [PATCH 06/10] qemu: command: Move dimm device checks from formatter to checker

2015-10-16 Thread Peter Krempa
Aggregate the checks of the dimm device into the verification function rather than having them in the formatter. --- src/qemu/qemu_command.c | 65 ++ src/qemu/qemu_command.h | 4 +-- src/qemu/qemu_domain.c | 83 -

[libvirt] [PATCH 02/10] conf: Turn targetNode in struct virDomainMemoryDef to signed

2015-10-16 Thread Peter Krempa
Later on, we will need to know whether the user specified the target node or not. Turn the variable into a signed value. We already treat it as signed in various parts of the qemu driver. --- src/conf/domain_conf.c | 10 ++ src/conf/domain_conf.h | 2 +- 2 files changed, 7 insertions(+),

[libvirt] [PATCH 10/10] qemu: ppc64: Support memory hotplug without NUMA enabled

2015-10-16 Thread Peter Krempa
ppc64 guests don't require adding a NUMA node for hotplug memory to work. Lift the requirement and add test cases. --- src/qemu/qemu_domain.c | 32 ++ .../qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 19 +++ .../qemuxml2argv-memory-hotplug-pp

[libvirt] [PATCH 07/10] qemu: domain: Remove memory device check from post parse callback

2015-10-16 Thread Peter Krempa
We check that is present when we have memory devices at the time we start the VM or add the device, so we can remove it from the post parse callback to be more tolerant to users. --- src/qemu/qemu_domain.c | 8 1 file changed, 8 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qem

[libvirt] [PATCH 09/10] qemu: command: Prepare memory device def formatter for missing target node

2015-10-16 Thread Peter Krempa
Prepare the command line generator for the possibility that in some configurations the target NUMA node info will be missing. --- src/qemu/qemu_command.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5e7b052..98

[libvirt] [PATCH 03/10] qemu: command: Make qemuBuildMemoryBackendStr usable without NUMA

2015-10-16 Thread Peter Krempa
Make the function usable so that -1 can be passed to it as cell ID so that we can later enable memory hotplug on non-NUMA guests for certain architectures. I've inspected all functions that take guestNode as an argument to verify that they are eiter safe to be called or are not called at all. ---

[libvirt] [PATCH 04/10] qemu: command: Always execute memory device formatter

2015-10-16 Thread Peter Krempa
Since we already make sure before that the domain configuration is valid we may execute it always at the cost of doing 0 iterations of the for loop. This patch will simplify later refactor as it will avoid whitespace changes. --- src/qemu/qemu_command.c | 47 +++---

[libvirt] [PATCH 00/10] Allow memory hotplug without NUMA on ppc64

2015-10-16 Thread Peter Krempa
Peter Krempa (10): conf: Make @def const in virDomainDefGetMemoryInitial conf: Turn targetNode in struct virDomainMemoryDef to signed qemu: command: Make qemuBuildMemoryBackendStr usable without NUMA qemu: command: Always execute memory device formatter qemu: domain: Add common function t

[libvirt] [PATCH 08/10] conf: Prepare making memory device target node optional

2015-10-16 Thread Peter Krempa
Adjust the config code so that it does not enforce that target memory node is specified. To avoid breakage, adjust the qemu memory hotplug config checker to disallow such config for now. --- docs/formatdomain.html.in | 5 +++-- docs/schemas/domaincommon.rng | 8 +--- src/conf/domain_conf

[libvirt] [PATCH 05/10] qemu: domain: Add common function to perform memory hotplug checks

2015-10-16 Thread Peter Krempa
Add a function that will aggregate various checks related to memory hotplug so that they aren't scattered accross various parts of the code. --- src/qemu/qemu_command.c | 26 ++--- src/qemu/qemu_domain.c | 77 + src/qemu/qemu_domain.h |

[libvirt] [PATCH 01/10] conf: Make @def const in virDomainDefGetMemoryInitial

2015-10-16 Thread Peter Krempa
Keep const correctness and allow to use this function in cases where @def is const in the caller. --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 217179d..002bf13

Re: [libvirt] [PATCH v3] Close the source fd if the destination qemu exits during tunnelled migration

2015-10-16 Thread Jiri Denemark
On Thu, Oct 15, 2015 at 14:02:24 +0530, Shivaprasad bhat wrote: > On Tue, Oct 13, 2015 at 4:51 PM, Shivaprasad bhat > wrote: > > On Mon, Oct 12, 2015 at 8:03 PM, Jiri Denemark wrote: > >> On Thu, Oct 08, 2015 at 17:59:07 +0530, Shivaprasad G Bhat wrote: > >>> Tunnelled migration can hang if the d

Re: [libvirt] [PATCH v2 0/4] Fix a couple of iothread bugs

2015-10-16 Thread John Ferlan
On 10/15/2015 04:43 PM, John Ferlan wrote: ... > > John Ferlan (4): > qemu: Use 'niothreadids' instead of 'iothreads' > qemu: Check for niothreads == 0 in qemuSetupCgroupForIOThreads > qemu: Fix qemu startup check for QEMU_CAPS_OBJECT_IOTHREAD > conf: Optimize the iothreadid initiali

Re: [libvirt] [PATCH] virsh: Use 'format' argument only when specified

2015-10-16 Thread Peter Krempa
On Fri, Oct 16, 2015 at 09:34:51 +0200, Martin Kletzander wrote: > On Fri, Oct 16, 2015 at 09:03:09AM +0200, Peter Krempa wrote: > >The condition checking whether --format was specified was incorrect. > >virsh crashed if the following format was used: > > > > virsh dump VM dump --format '' --memory

Re: [libvirt] [PATCH 0/3] NEWS: Split releases by year

2015-10-16 Thread Andrea Bolognani
On Fri, 2015-10-16 at 09:47 +0200, Martin Kletzander wrote: > On Thu, Oct 15, 2015 at 04:12:07PM +0200, Andrea Bolognani wrote: > > As agreed, I've followed up with the cleanups by splitting > > the huge news.html.in file into separate, smaller files, > > one per year. > > > > Along with the split

Re: [libvirt] [PATCH v1 21/23] security_dac: Restore original owner more often

2015-10-16 Thread Peter Krempa
On Mon, Oct 12, 2015 at 12:26:06 +0200, Michal Privoznik wrote: > Now that we know what label we should restore and we do have > reference counter to each seclabel, we restore the original > seclabel only after the last domain is torn down. Therefore, we > can safely try to restore labels even for

Re: [libvirt] [PATCH 0/3] NEWS: Split releases by year

2015-10-16 Thread Martin Kletzander
On Thu, Oct 15, 2015 at 04:12:07PM +0200, Andrea Bolognani wrote: As agreed, I've followed up with the cleanups by splitting the huge news.html.in file into separate, smaller files, one per year. Along with the split I've also included a fixed XSLT stylesheet so that we can start shipping a mean

Re: [libvirt] [PATCH v1 16/23] lock_manager: Implement remember & recall APIs

2015-10-16 Thread Peter Krempa
On Mon, Oct 12, 2015 at 12:26:01 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/libvirt_private.syms | 2 ++ > src/locking/lock_manager.c | 32 > src/locking/lock_manager.h | 9 + > 3 files changed, 43 insertions(+) > [.

Re: [libvirt] [PATCH] virsh: Use 'format' argument only when specified

2015-10-16 Thread Martin Kletzander
On Fri, Oct 16, 2015 at 09:03:09AM +0200, Peter Krempa wrote: The condition checking whether --format was specified was incorrect. virsh crashed if the following format was used: virsh dump VM dump --format '' --memory-only Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1272301 --- tools

Re: [libvirt] [PATCH v1 13/23] virLockDriver: Introduce virLockDriverRemember and virLockDriverRecall

2015-10-16 Thread Peter Krempa
On Mon, Oct 12, 2015 at 12:25:58 +0200, Michal Privoznik wrote: > These are just internal APIs that will pass the data back and > forth to and from virtlockd. > > Signed-off-by: Michal Privoznik > --- > src/locking/lock_driver.h | 36 > 1 file changed, 36 ins

Re: [libvirt] [PATCH v1 12/23] virtlockd: Work virSeclabelSpace in

2015-10-16 Thread Peter Krempa
On Mon, Oct 12, 2015 at 12:25:57 +0200, Michal Privoznik wrote: A rather sparse commit message. > Signed-off-by: Michal Privoznik > --- > src/locking/lock_daemon.c | 44 ++ > src/locking/lock_daemon.h | 8 + > src/locking/lock_daemon_dispatch.c | 6

Re: [libvirt] [PATCH v1 09/23] lock_protocol: Add two new remote procedures

2015-10-16 Thread Peter Krempa
On Mon, Oct 12, 2015 at 12:25:54 +0200, Michal Privoznik wrote: > These procedures will be used to store and bring back security > labels. So far, the idea is that tuple (path, model, label) is > enough. Well, certainly for DAC and SELinux. The functions are: I'm afraid that a 'path' per-se isn't

[libvirt] [PATCH] virsh: Use 'format' argument only when specified

2015-10-16 Thread Peter Krempa
The condition checking whether --format was specified was incorrect. virsh crashed if the following format was used: virsh dump VM dump --format '' --memory-only Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1272301 --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 dele