Re: [libvirt] [PATCH sandbox v5 00/20] Docker image support

2015-09-10 Thread Daniel P. Berrange
I have now pushed all these patches except the volume one and the man page one. Eren, thank you very much for all the time you invested in working on this feature. It is great to finally have this ability in libvirt-sandbox ! Regards, Daniel On Tue, Sep 08, 2015 at 05:29:31PM +0100, Daniel P.

[libvirt] [PATCH v2] virsh: Teach attach-interface to --print-xml

2015-09-10 Thread Michal Privoznik
We have the same argument to many other commands that produce an XML based on what user typed. But unfortunately attach-interface was missing it. Maybe nobody had needed it yet. Well, I did just now. Signed-off-by: Michal Privoznik --- Diff to v1: - Commit message grammar

Re: [libvirt] [PATCH v3 0/4] Try several possible default network devices

2015-09-10 Thread Andrea Bolognani
On Wed, 2015-09-09 at 21:43 +0200, Martin Kletzander wrote: > > Andrea Bolognani (4): > > qemu: Introduce QEMU_CAPS_DEVICE_RTL8139 > > qemu: Introduce QEMU_CAPS_DEVICE_E1000 > > qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_NET > > qemu: Try several network devices when looking for a default > >

[libvirt] [PATCH] docs: Update devguide.html to point to the new Python dev guide

2015-09-10 Thread Daniel P. Berrange
We have a new libvirt-appdev-guide-python which we need to promote to users. Rewrite the existing page to mention it too. Also use the new URL location which is automatically refreshed once a day. Signed-off-by: Daniel P. Berrange --- docs/devguide.html.in | 56

[libvirt] [PATCH v2 4/4] security_selinux: Take @privileged into account

2015-09-10 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1124841 If running in session mode it may happen that we fail to set correct SELinux label, but the image may still be readable to the qemu process. Take this into account. Signed-off-by: Michal Privoznik ---

[libvirt] [PATCH v2 0/4] Be tolerant to relabel errors for session mode

2015-09-10 Thread Michal Privoznik
This is a reworked version of my previous patch: https://www.redhat.com/archives/libvir-list/2015-July/msg00576.html Michal Privoznik (4): virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType security_selinux: Replace SELinuxSCSICallbackData with proper struct

[libvirt] [PATCH v2 1/4] virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType

2015-09-10 Thread Michal Privoznik
The check is done in virSecuritySELinuxSetFilecon itself. There's no need to check it again. Signed-off-by: Michal Privoznik --- src/security/security_selinux.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/security/security_selinux.c

[libvirt] [PATCH v2 3/4] virSecurityManager: Track if running as privileged

2015-09-10 Thread Michal Privoznik
We may want to do some decisions in drivers based on fact if we are running as privileged user or not. Propagate this info there. Signed-off-by: Michal Privoznik --- src/lxc/lxc_controller.c | 2 +- src/lxc/lxc_driver.c | 3 ++- src/qemu/qemu_driver.c

[libvirt] [PATCH v2 2/4] security_selinux: Replace SELinuxSCSICallbackData with proper struct

2015-09-10 Thread Michal Privoznik
We have plenty of callbacks in the driver. Some of these callbacks require more than one argument to be passed. For that we currently have a data type (struct) per each callback. Well, so far for only one - SELinuxSCSICallbackData. But lets turn it into more general name so it can be reused in

[libvirt] [PATCH v2 0/12] migration: support all toURI and proto combos

2015-09-10 Thread Nikolay Shirokovskiy
Current implementation of 'toURI' migration interfaces does not support all combinations of interface versions and protocol versions. For example 'toURI2' with p2p flag will not migrate if driver supports only v3params proto. This is not convinient as drivers that starts to support migration have

[libvirt] [PATCH v2 12/12] migration: refactor: one return in forURI family functions

2015-09-10 Thread Nikolay Shirokovskiy
May be a matter of a taste but this version with one return point in every function looks simplier to understand and to exetend too. Anyway after such a heavy refactoring a little cleanup will not hurt. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c |

[libvirt] [PATCH v2 03/12] migration: move implementation check to branches in p2p

2015-09-10 Thread Nikolay Shirokovskiy
This is more structured code so it will be easier to add branch for _PARAMS protocol here. It is not a pure refactoring strictly speaking as we remove scenarios for broken cases when driver defines V3 feature and implements perform function. So it is additionally a more solid code. Signed-off-by:

[libvirt] [PATCH v2 01/12] migration: refactor: get rid of use_params p2p_full

2015-09-10 Thread Nikolay Shirokovskiy
'useParams' parameter usage is an example of contol coupling. Most of the work inside the function is done differently for different value of this flag except for the uri check. Lets split this function into 2, one with extensible parameters set and one with hardcoded parameter set. Common uri

[libvirt] [PATCH v2 10/12] migration: refactor: prepare to reuse flag vs feature checks

2015-09-10 Thread Nikolay Shirokovskiy
All toURI functions have same checks for flags and features compatibility for direct and p2p case. Let's factor this checks out before we reuse common code in toURI functions family. As a side affect we have a more clear code representation of uri passing conventions for p2p and direct cases.

[libvirt] [PATCH v2 08/12] migration: refactor: gather parameters compatibility checks

2015-09-10 Thread Nikolay Shirokovskiy
Checks for migration's parameter set and support by protocol are slightly scattered in code. Let's put it in one place, namely every protocol function should check it's parameter set. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 56

[libvirt] [PATCH v2 06/12] migration: refactor: introduce params version of unmanaged

2015-09-10 Thread Nikolay Shirokovskiy
Let's put main functionality into params version of virDomainMigrateUnmanaged as a preparation step for merging it with virDomainMigratePeer2PeerParams. virDomainMigrateUnmanaged then does nothing more then just adapting arguments. Signed-off-by: Nikolay Shirokovskiy

[libvirt] [PATCH v2 02/12] migration: refactor: reuse p2p url check

2015-09-10 Thread Nikolay Shirokovskiy
As promised in previous patch. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 43 +++ 1 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index

[libvirt] [PATCH v2 11/12] migration: reuse flags vs features checks in toURI family

2015-09-10 Thread Nikolay Shirokovskiy
Introduce a new function for the check. virDomainMigrateUnmanagedParams is not a good candidate for this functionality as it is used by migrate family functions too and its have its own checks that are superset of extracted and we don't need to check twice. Actually name of the function is

[libvirt] [PATCH v2 09/12] migration: merge all proto branches into single function

2015-09-10 Thread Nikolay Shirokovskiy
Finally on this step we get what we were aimed for - toURI{1, 2} (and migration{*} APIs too) now can work thru V3_PARAMS protocol. Execution path goes thru unchanged virDomainMigrateUnmanaged adapter function which is called by all target places. Note that we keep the fact that direct migration

[libvirt] [PATCH v2 07/12] migration: refactor: extract parameter adaption functions

2015-09-10 Thread Nikolay Shirokovskiy
Extract parametes adapdation and checking which is protocol dependent into designated functions. Leave only branching and common checks in virDomainMigrateUnmanagedParams. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 84

[libvirt] [PATCH v2 04/12] migration: remove direct migration dependency on version1 of driver

2015-09-10 Thread Nikolay Shirokovskiy
From: Michal Privoznik Direct migration should work if *perform3 is present but *perform is not. This is situation when driver migration is implemented after new version of driver function is introduced. We should not be forced to support old version too as its parameter

Re: [libvirt] [PATCH] docs: Update devguide.html to point to the new Python dev guide

2015-09-10 Thread Michal Privoznik
On 10.09.2015 13:17, Daniel P. Berrange wrote: > We have a new libvirt-appdev-guide-python which we need to > promote to users. Rewrite the existing page to mention it > too. Also use the new URL location which is automatically > refreshed once a day. > > Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH v2 05/12] migration: refactor: merge direct and p2p into unmanaged

2015-09-10 Thread Nikolay Shirokovskiy
p2p plain and direct function are good candidates for code reuse. Their main function is same - to branch among different versions of migration protocol and implementation of this function is also same. Also they have other common functionality in lesser aspects. So let's merge them. But as they

[libvirt] [PATCH LIBVIRT] libxl: don't end job for ephemeal domain on start failure

2015-09-10 Thread Ian Campbell
commit 4b53d0d4ac9c "libxl: don't remove persistent domain on start failure" cleans up the vm object and sets it to NULL if the vm is not persistent, however at end job vm (now NULL) is dereferenced via the call to libxlDomainObjEndJob. Avoid this by skipping "endjob" and going straight to

[libvirt] [PATCH] qemu: command: Report stderr from qemu-bridge-helper

2015-09-10 Thread Cole Robinson
There's a couple reports of things failing in this area (bug 1259070), but it's tough to tell what's going wrong without stderr from qemu-bridge-helper. So let's report stderr in the error message Couple new examples: virbr0 is inactive: internal error: /usr/libexec/qemu-bridge-helper --use-vnet

Re: [libvirt] [PATCH] qemu: command: Report stderr from qemu-bridge-helper

2015-09-10 Thread Laine Stump
On 09/10/2015 12:35 PM, Cole Robinson wrote: There's a couple reports of things failing in this area (bug 1259070), but it's tough to tell what's going wrong without stderr from qemu-bridge-helper. So let's report stderr in the error message Couple new examples: virbr0 is inactive: internal

[libvirt] [java] [PATCH 1/2] Fix compilation error for unreported exceptions

2015-09-10 Thread Claudio Bley
In Java 1.6 source mode, javac reported the error: ``` src/main/java/org/libvirt/Library.java:93: unreported exception java.lang.Exception; must be caught or declared to be thrown ``` Since the code inside the try block does not throw any checked exceptions, we only need to handle unchecked

[libvirt] [java] [PATCH 2/2] Fix compilation error when using -source 1.x

2015-09-10 Thread Claudio Bley
When using JDK 1.8 with the compiler option `-source 1.6` or `-source 1.7` or JDK 1.7 with the `-source 1.6` compiler option, compilation failed with: ``` src/main/java/org/libvirt/event/DomainEvent.java:63: error: incompatible types: inference variable T#1 has incompatible upper bounds

[libvirt] [java] [PATCH 0/2] Fix a few compilation problems

2015-09-10 Thread Claudio Bley
Initially reported by Wido den Hollander here[1]. [1]: http://www.redhat.com/archives/libvir-list/2015-September/msg00052.html Claudio Bley (2): Fix compilation error for unreported exceptions Fix compilation error when using -source 1.x src/main/java/org/libvirt/Library.java

Re: [libvirt] [PATCH libvirt-java] Require at least Java 8

2015-09-10 Thread Claudio Bley
At Mon, 7 Sep 2015 11:36:38 +0200, Wido den Hollander wrote: > > > On 04-09-15 07:12, Claudio Bley wrote: > > The thing is: the code compiles just fine with an actual Java 7 > > compiler (OpenJDK 1.7.0_85), but not when using a Java 8 compiler > > (OpenJDK 1.8.0_60) with the `-source 1.7`