[libvirt] [PATCH] qemu: fix migration flags undefinesource cannot work

2015-10-27 Thread Luyao Huang
In commit f41be296, we moved vm->persistent check into qemuDomainRemoveInactive, but we didn't change the vm->persistent before call qemuDomainRemoveInactive in some place before and just call it to remove the inactive vm. Signed-off-by: Luyao Huang ---

[libvirt] [PATCH] libvirt-domain: fix no error report when p2p migrate fail

2015-10-27 Thread Luyao Huang
After commit a26669d7, we only jump to error when virDomainMigrateUnmanagedParams return a value less than -1. this will make the migrate result always be success even we meet some problem. Signed-off-by: Luyao Huang --- src/libvirt-domain.c | 2 +- 1 file changed, 1

[libvirt] [PATCH] libvirt-domain: fix the error reporting when use the localhost as target uri

2015-10-27 Thread Luyao Huang
Remove the extra %s in error message when call virReportInvalidArg(). Signed-off-by: Luyao Huang --- src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 14aeb09..de7eb04 100644 ---

Re: [libvirt] [PATCH v2 0/5] qemu: hostdev: Unify naming

2015-10-27 Thread Andrea Bolognani
On Mon, 2015-10-26 at 18:15 -0400, John Ferlan wrote: > > hostdev: Rename virHostdevUpdateDomainActiveDevices() > > qemu: hostdev: Unify naming for qemuHostdevPrepare*Devices() > > qemu: hostdev: Unify naming for qemuHostdevReAttach*Devices() > > qemu: hostdev: Unify naming for

Re: [libvirt] [PATCH] domain-conf: reorder usb controllers so the master is first

2015-10-27 Thread Ján Tomko
On Mon, Oct 26, 2015 at 05:28:21PM +0100, Pavel Hrdina wrote: > USB controllers can share the same 'index' which indicates, that there > is some sort of master-companion relationship. Reorder the controllers > in XML in to place the master controller before its companions. This is > required by

[libvirt] [PATCH v2 1/2] domain-conf: reorder usb controllers so the master is first

2015-10-27 Thread Pavel Hrdina
USB controllers can share the same 'index' which indicates, that there is some sort of master-companion relationship. Reorder the controllers in XML in to place the master controller before its companions. This is required by QEMU to not fail with error message: error: internal error: process

[libvirt] [PATCH v2 0/2] reorder usb controllers correctly

2015-10-27 Thread Pavel Hrdina
new in v2: - used git format-patch -b - added a test case Pavel Hrdina (2): domain-conf: reorder usb controllers so the master is first test: add test case for usb controller order src/conf/domain_conf.c | 21 +

Re: [libvirt] [PATCH v2 0/2] reorder usb controllers correctly

2015-10-27 Thread Peter Krempa
On Tue, Oct 27, 2015 at 10:37:27 +0100, Pavel Hrdina wrote: > new in v2: > - used git format-patch -b I think Jan meant that it was hard to review with that option due to the fact that it contains both whitespace and functional changes, not that you should actually use it to send patches. They

Re: [libvirt] [PATCH 0/4] HACKING: Improve handling

2015-10-27 Thread Ján Tomko
On Mon, Oct 26, 2015 at 05:05:49PM +0100, Andrea Bolognani wrote: > On Mon, 2015-10-26 at 16:25 +0100, Michal Privoznik wrote: > > On 26.10.2015 16:03, Andrea Bolognani wrote: > > > Generate the HACKING file at dist time like we're already doing for > > > NEWS, AUTHORS and ChangeLog. > > > > > >

Re: [libvirt] [PATCH] locking: Add io_timeout to sanlock

2015-10-27 Thread Martin Kletzander
On Fri, Oct 23, 2015 at 01:37:54PM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1251190 So, if domain loses access to storage, sanlock tries to kill it after some timeout. So far, the default is 80 seconds. But for some scenarios this might not be enough. We should

[libvirt] [PATCH v2 2/2] test: add test case for usb controller order

2015-10-27 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- .../qemuxml2argv-controller-usb-order.xml | 32 .../qemuxml2xmlout-controller-usb-order.xml| 34 ++ tests/qemuxml2xmltest.c| 1 + 3 files changed, 67

Re: [libvirt] [PATCH] qemu: fix migration flags undefinesource cannot work

2015-10-27 Thread Martin Kletzander
On Tue, Oct 27, 2015 at 04:53:59PM +0800, Luyao Huang wrote: In commit f41be296, we moved vm->persistent check into qemuDomainRemoveInactive, but we didn't change the vm->persistent before call qemuDomainRemoveInactive in some place before and just call it to remove the inactive vm.

Re: [libvirt] [PATCH] util: implement virProcessGetStartTime on GNU/kFreeBSD

2015-10-27 Thread Martin Kletzander
On Thu, Oct 15, 2015 at 01:50:42PM +0200, Pino Toscano wrote: Use the virProcessGetStartTime implementation also when only the kernel is FreeBSD, such as on GNU/kFreeBSD. --- src/util/virprocess.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virprocess.c

Re: [libvirt] [PATCH] conf: Add serial target type to ABI stability check

2015-10-27 Thread Martin Kletzander
On Wed, Oct 21, 2015 at 03:14:03PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1273686 There is no ABI check for serial target type attribute, just add it. Signed-off-by: Luyao Huang --- src/conf/domain_conf.c | 8 1 file changed, 8

Re: [libvirt] [PATCH] util: implement virProcessGetStartTime on GNU/kFreeBSD

2015-10-27 Thread Andrea Bolognani
On Tue, 2015-10-27 at 14:54 +0300, Roman Bogorodskiy wrote: > > Weak ACK -- I have nowhere to try it and I'm lazy to install such > > machine just for trying out this patch, but I can clearly see it > > won't > > break anything that works right now, so... > > FWIW, it also looks fine to me

Re: [libvirt] [PATCH] util: implement virProcessGetStartTime on GNU/kFreeBSD

2015-10-27 Thread Roman Bogorodskiy
Martin Kletzander wrote: > On Thu, Oct 15, 2015 at 01:50:42PM +0200, Pino Toscano wrote: > >Use the virProcessGetStartTime implementation also when only the kernel > >is FreeBSD, such as on GNU/kFreeBSD. > >--- > > src/util/virprocess.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3

[libvirt] [PATCH 2/5] qemu: Rename cleanup label in qemuProcessStart

2015-10-27 Thread Jiri Denemark
Current "cleanup" label is only used in error path, thus it should rather be called "error". Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 178 1 file changed, 89 insertions(+), 89 deletions(-) diff --git

[libvirt] [PATCH 1/5] qemu: Use correct type when calling qemuPrepareNVRAM

2015-10-27 Thread Jiri Denemark
qemuProcessStart was passing char * migrateFrom as the third argument to qemuPrepareNVRAM. We should explicitly convert the pointer to bool which is what the function expects. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1

[libvirt] [PATCH v2 0/3] improve virsh attach-interface

2015-10-27 Thread Pavel Hrdina
new in v2: - removed netdev name as an option for --source parameter - removed --driver parameter, the default is vfio for new qemu and that's good enough Pavel Hrdina (3): virsh-nodedev: makes struct and functions for NodeDevice list available virsh-domain: update attach-interface to

[libvirt] [PATCH v2 1/3] virsh-nodedev: makes struct and functions for NodeDevice list available

2015-10-27 Thread Pavel Hrdina
Next patch will use those function to collect NodeDevice list and find a specific device. Make functions virshNodeDeviceListCollect() and virshNodeDeviceListFree() together with struct virshNodeDeviceList available to reuse existing code. Signed-off-by: Pavel Hrdina ---

[libvirt] [PATCH v2 3/3] virsh.pod: update and improve a attach-interface section

2015-10-27 Thread Pavel Hrdina
Rewrite the attach-interface section in man page to be more readable and add the new hostdev functionality. Signed-off-by: Pavel Hrdina --- tools/virsh.pod | 82 +++-- 1 file changed, 50 insertions(+), 32 deletions(-) diff

[libvirt] [PATCH 5/5] qemu: Fix memory leak in qemuProcessStart

2015-10-27 Thread Jiri Denemark
nodeset should be freed in both success and failure paths. While tmppath is freed immediately after it's consumed, moving it from error to cleanup label is a bit more consistent and robust. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 4 ++-- 1 file changed,

[libvirt] [PATCH 4/5] qemu: Introduce cleanup label in qemuProcessStart

2015-10-27 Thread Jiri Denemark
Remove code duplication by moving common cleanup code in a dedicated label. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index

[libvirt] [PATCH] Remove new lines from debug messages

2015-10-27 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/nwfilter/nwfilter_gentech_driver.c | 2 +- src/nwfilter/nwfilter_learnipaddr.c| 10 +- src/rpc/virnetsocket.c | 2 +- src/util/virfile.c | 2 +- src/util/virhash.c |

[libvirt] [PATCH v2] locking: Add io_timeout to sanlock

2015-10-27 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1251190 So, if domain loses access to storage, sanlock tries to kill it after some timeout. So far, the default is 80 seconds. But for some scenarios this might not be enough. We should allow users to adjust the timeout according to their needs.

[libvirt] [PATCH v2 2/3] virsh-domain: update attach-interface to support type=hostdev

2015-10-27 Thread Pavel Hrdina
Adding this feature will allow users to easily attach a hostdev network interface using PCI passthrough. The interface can be attached using --type=hostdev and PCI address or as --source. This command also allows you to tell, whether the interface should be managed. Resolves:

Re: [libvirt] [PATCH] bhyve: implement domainGetOSType

2015-10-27 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 20.10.2015 19:37, Roman Bogorodskiy wrote: > > --- > > src/bhyve/bhyve_driver.c | 22 ++ > > 1 file changed, 22 insertions(+) > > > > diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c > > index d44cf2c..efba0ae 100644 > > ---

Re: [libvirt] [PATCH] util: implement virProcessGetStartTime on GNU/kFreeBSD

2015-10-27 Thread Roman Bogorodskiy
Andrea Bolognani wrote: > On Tue, 2015-10-27 at 14:54 +0300, Roman Bogorodskiy wrote: > > > Weak ACK -- I have nowhere to try it and I'm lazy to install such > > > machine just for trying out this patch, but I can clearly see it > > > won't > > > break anything that works right now, so... > >

Re: [libvirt] [PATCH] Remove new lines from debug messages

2015-10-27 Thread Andrea Bolognani
On Tue, 2015-10-27 at 16:29 +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/nwfilter/nwfilter_gentech_driver.c | 2 +- > src/nwfilter/nwfilter_learnipaddr.c| 10 +- > src/rpc/virnetsocket.c | 2 +- > src/util/virfile.c

Re: [libvirt] [PATCH] qemu: Resolve agent deadlock

2015-10-27 Thread John Ferlan
On 10/27/2015 01:00 AM, Peter Krempa wrote: > On Mon, Oct 26, 2015 at 17:28:57 -0400, John Ferlan wrote: >> >> >> On 10/26/2015 11:37 AM, Peter Krempa wrote: >>> On Mon, Oct 26, 2015 at 11:06:21 -0400, John Ferlan wrote: If we have a shutdown of a VM by a qemu agent while an agent EOF

Re: [libvirt] [PATCH] util: implement virProcessGetStartTime on GNU/kFreeBSD

2015-10-27 Thread Roman Bogorodskiy
Martin Kletzander wrote: > On Thu, Oct 15, 2015 at 01:50:42PM +0200, Pino Toscano wrote: > >Use the virProcessGetStartTime implementation also when only the kernel > >is FreeBSD, such as on GNU/kFreeBSD. > >--- > Weak ACK -- I have nowhere to try it and I'm lazy to install such > machine just

[libvirt] Plan for next release

2015-10-27 Thread Daniel Veillard
I'm a bit late, sorry, but I think we should freeze on Thursday for the next release, and then shoot for middle of next week for the actual release, I hope this last moment warning isn't a problem, thanks, Daniel -- Daniel Veillard | Open Source and Standards, Red Hat

[libvirt] [PATCH 0/5] Some qemuProcessStart cleanups

2015-10-27 Thread Jiri Denemark
Jiri Denemark (5): qemu: Use correct type when calling qemuPrepareNVRAM qemu: Rename cleanup label in qemuProcessStart qemu: Rename ret variable in qemuProcessStart qemu: Introduce cleanup label in qemuProcessStart qemu: Fix memory leak in qemuProcessStart src/qemu/qemu_process.c | 215

[libvirt] [PATCH 3/5] qemu: Rename ret variable in qemuProcessStart

2015-10-27 Thread Jiri Denemark
Generally, we use "ret" variable for storing the value we are going to return at the and of a function, but this is not the case in qemuProcessStart. Let's rename "ret" as "rv". Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 16 1 file changed,

Re: [libvirt] [PATCH v2] locking: Add io_timeout to sanlock

2015-10-27 Thread Jiri Denemark
On Tue, Oct 27, 2015 at 16:29:51 +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1251190 > > So, if domain loses access to storage, sanlock tries to kill it > after some timeout. So far, the default is 80 seconds. But for > some scenarios this might not be enough. We

[libvirt] [PATCH v2] Remove new lines from debug messages

2015-10-27 Thread Jiri Denemark
VIR_DEBUG will automatically add a new line to the message, having "\n" at the end or at the beginning of the message results in empty lines. Signed-off-by: Jiri Denemark --- src/nwfilter/nwfilter_dhcpsnoop.c | 2 +- src/nwfilter/nwfilter_gentech_driver.c | 2 +-

[libvirt] [libvirt-glib] gobject: Add wrapper virDomainSetTime()

2015-10-27 Thread Zeeshan Ali (Khattak)
--- libvirt-gobject/libvirt-gobject-domain.c | 126 +++ libvirt-gobject/libvirt-gobject-domain.h | 25 ++ libvirt-gobject/libvirt-gobject.sym | 9 +++ 3 files changed, 160 insertions(+) diff --git a/libvirt-gobject/libvirt-gobject-domain.c

Re: [libvirt] [PATCH] Remove new lines from debug messages

2015-10-27 Thread Jiri Denemark
On Tue, Oct 27, 2015 at 17:18:40 +0100, Andrea Bolognani wrote: > On Tue, 2015-10-27 at 16:29 +0100, Jiri Denemark wrote: > > Signed-off-by: Jiri Denemark > > --- > > src/nwfilter/nwfilter_gentech_driver.c | 2 +- > > src/nwfilter/nwfilter_learnipaddr.c| 10 +- >

Re: [libvirt] [PATCH] rbd: Remove snapshots if the DELETE_WITH_SNAPSHOTS flag has been provided

2015-10-27 Thread John Ferlan
On 10/27/2015 10:16 AM, Wido den Hollander wrote: > When a RBD volume has snapshots it can not be removed. > > This patch introduces a new flag to force volume removal, > VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS. > > With this flag any existing snapshots will be removed prior to > removing the

Re: [libvirt] [PATCH] qemu_agent: fix deadlock in qemuProcessHandleAgentEOF

2015-10-27 Thread John Ferlan
On 10/02/2015 08:17 AM, John Ferlan wrote: > > > On 09/26/2015 08:18 AM, Wang Yufei wrote: >> We shutdown a VM A by qemu agent,meanwhile an agent EOF >> of VM A happened, there's a chance that deadlock occurred: >> >> qemuProcessHandleAgentEOF in main thread >> A) priv->agent = NULL; //A

Re: [libvirt] [PATCH v2 2/3] virsh-domain: update attach-interface to support type=hostdev

2015-10-27 Thread John Ferlan
On 10/27/2015 11:01 AM, Pavel Hrdina wrote: > Adding this feature will allow users to easily attach a hostdev network > interface using PCI passthrough. > > The interface can be attached using --type=hostdev and PCI address or > as --source. This command also allows you to tell, whether the

Re: [libvirt] [PATCH v2 3/3] virsh.pod: update and improve a attach-interface section

2015-10-27 Thread John Ferlan
On 10/27/2015 11:01 AM, Pavel Hrdina wrote: > Rewrite the attach-interface section in man page to be more readable and > add the new hostdev functionality. > > Signed-off-by: Pavel Hrdina > --- > tools/virsh.pod | 82 >

Re: [libvirt] [PATCH v2 1/3] virsh-nodedev: makes struct and functions for NodeDevice list available

2015-10-27 Thread John Ferlan
$SUBJ: Expose virshNodeDeviceList{Collect|Free} and virshNodeDeviceList struct On 10/27/2015 11:01 AM, Pavel Hrdina wrote: > Next patch will use those function to collect NodeDevice list and find a > specific device. Make functions virshNodeDeviceListCollect() and > virshNodeDeviceListFree()

Re: [libvirt] [PATCH] conf: Add serial target type to ABI stability check

2015-10-27 Thread lhuang
On 10/27/2015 05:45 PM, Martin Kletzander wrote: On Wed, Oct 21, 2015 at 03:14:03PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1273686 There is no ABI check for serial target type attribute, just add it. Signed-off-by: Luyao Huang ---

Re: [libvirt] [PATCH] qemu: fix migration flags undefinesource cannot work

2015-10-27 Thread lhuang
On 10/27/2015 05:45 PM, Martin Kletzander wrote: On Tue, Oct 27, 2015 at 04:53:59PM +0800, Luyao Huang wrote: In commit f41be296, we moved vm->persistent check into qemuDomainRemoveInactive, but we didn't change the vm->persistent before call qemuDomainRemoveInactive in some place before and

Re: [libvirt] [PATCH 0/5] Some qemuProcessStart cleanups

2015-10-27 Thread John Ferlan
On 10/27/2015 11:27 AM, Jiri Denemark wrote: > Jiri Denemark (5): > qemu: Use correct type when calling qemuPrepareNVRAM > qemu: Rename cleanup label in qemuProcessStart > qemu: Rename ret variable in qemuProcessStart > qemu: Introduce cleanup label in qemuProcessStart > qemu: Fix

[libvirt] [PATCH] rbd: Remove snapshots if the DELETE_WITH_SNAPSHOTS flag has been provided

2015-10-27 Thread Wido den Hollander
When a RBD volume has snapshots it can not be removed. This patch introduces a new flag to force volume removal, VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS. With this flag any existing snapshots will be removed prior to removing the volume. No existing mechanism in libvirt allowed us to pass such

Re: [libvirt] [PATCH 1/4] virsh-domain: use correct base for virStrToLong_ui

2015-10-27 Thread Pavel Hrdina
On Mon, Oct 26, 2015 at 09:48:20AM -0400, Laine Stump wrote: > On 10/26/2015 05:53 AM, Pavel Hrdina wrote: > > The current situation is not ideal, it's not documented anywhere and for > > users > > you can only try the command and see what happens. Yes, it can and probably > > will break some

Re: [libvirt] [PATCH] locking: Add io_timeout to sanlock

2015-10-27 Thread Michal Privoznik
On 27.10.2015 10:23, Martin Kletzander wrote: > On Fri, Oct 23, 2015 at 01:37:54PM +0200, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1251190 >> >> So, if domain loses access to storage, sanlock tries to kill it >> after some timeout. So far, the default is 80 seconds.