[libvirt] qemu: lifecycle: reboot + shutdown, unexpected vm status.

2015-04-16 Thread zhang bo
Steps: 1 virsh reboot guest1 --mode=acpi 2 virsh shutdown guest1 --mode=agent Expected result: As the SHUTDOWN job is after REBOOT, we expected the guest to be *shutoff*. (Do you think so?) Exacted result: After the 2 steps above, the guest got *rebooted*. The reason to this

Re: [libvirt] util: client: shall libvirtd record task histories?

2015-04-16 Thread zhang bo
On 2015/4/10 15:54, Jiri Denemark wrote: On Wed, Apr 08, 2015 at 15:40:36 +0800, zhang bo wrote: We recently encountered a problem: 1) migrate a domain 2) the client unexpectedly got *crashed* (let's take it as virsh command) 3) *libvirtd still kept migrating the domain* 4)

[libvirt] [PATCH] nwfilter: Partly initialize driver even for non-privileged users

2015-04-16 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1211436 This reverts commit b7829f959b33c6e3242a9ed745c0da7dc696. The previous fix was not correct. Like everywhere else, a driver is a global variable allocated in stateInitialize function (or something similar for stateless drivers). Later, when

[libvirt] [PATCH 3/5] qemuProcessStop: wake up pending sync block jobs

2015-04-16 Thread Michael Chapman
Other threads may be blocked in qemuBlockJobSyncWait. Ensure that they're woken up when the domain is stopped. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/qemu/qemu_process.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_process.c

[libvirt] [PATCH 2/5] qemuBlockJobSync*: introduce sync block job helpers

2015-04-16 Thread Michael Chapman
qemuBlockJobSyncBegin and qemuBlockJobSyncEnd delimit a region of code where block job events are processed synchronously. qemuBlockJobSyncWait and qemuBlockJobSyncWaitWithTimeout wait for an event generated by a block job. The Wait* functions may be called multiple times while the synchronous

[libvirt] [PATCH 5/5] qemu: migration: use sync block job helpers

2015-04-16 Thread Michael Chapman
In qemuMigrationDriveMirror we can start all disk mirrors in parallel. We wait until they are all ready, or one of them aborts. In qemuMigrationCancelDriveMirror, we wait until all mirrors are properly stopped. This is necessary to ensure that destination VM is fully in sync with the (paused)

[libvirt] Building libvirt under Windows

2015-04-16 Thread Pavel Fedin
Hello! I am currently building libvirt under Windows64, and i would like to ask for correct way to do it. The first thing to resolve is absence of RPC XDR library. From configure source i figured out that portablexdr library may help. I have downloaded it, but it comes with a different RPC

[libvirt] [PATCH 1/5] qemuBlockJobEventProcess: move to new source file

2015-04-16 Thread Michael Chapman
We will want to use synchronous block jobs from qemu_migration as well, so split this function out into a new source file. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/Makefile.am | 1 + src/qemu/qemu_blockjob.c | 167 +++

[libvirt] building xen and libvirt with odd --prefix fails

2015-04-16 Thread Olaf Hering
My xen is configured with --prefix=/odd/path --enable-rpath. My libvirt is configured with env PKG_CONFIG_PATH=/odd/path/share/pkgconfig bash -x autogen.sh --without-xen --with-libxl. Now make in libvirt fails to find xen/xen.h needed by xenconfig/xen_common.c, I think it expects it in

Re: [libvirt] [PATCH] Add source check before attaching device

2015-04-16 Thread Jiri Denemark
On Thu, Apr 16, 2015 at 16:51:52 +0800, zhang bo wrote: Source device/file is not unique now, we should check it when attach device. The check is vary fragile and unreliable. It would be very hard (perhaps even impossible) to really detect that the two disks/filesystems point to the same source,

Re: [libvirt] util: client: shall libvirtd record task histories?

2015-04-16 Thread Martin Kletzander
On Thu, Apr 16, 2015 at 02:28:52PM +0800, zhang bo wrote: On 2015/4/10 15:54, Jiri Denemark wrote: On Wed, Apr 08, 2015 at 15:40:36 +0800, zhang bo wrote: We recently encountered a problem: 1) migrate a domain 2) the client unexpectedly got *crashed* (let's take it as virsh command)

Re: [libvirt] [PATCH] qemu: bulk stats: Ignore errors from missing/inaccessible disks

2015-04-16 Thread Peter Krempa
On Wed, Apr 15, 2015 at 10:25:35 -0600, Eric Blake wrote: On 04/15/2015 10:19 AM, Peter Krempa wrote: Rather than erroring out make the best attempt to retrieve other data if disks are inaccessible or missing. The failure will still be logged though. Since the bulk stats API is called

[libvirt] [PATCH 0/5] Use synchronous block job events in qemu_migration

2015-04-16 Thread Michael Chapman
This patch series converts qemu_migration to use the synchronous block job event code introduced in commit 630ee5ac. It fixes two problems: - Drive mirroring has been broken since that commit, since the event indicating mirror readiness isn't processed while the VM object is locked. -

[libvirt] [PATCH] virCondWaitUntil: calculate timespec correctly

2015-04-16 Thread Michael Chapman
ts.tv_nsec was off by a factor of 1000, making timeouts less than a second in the future often expiring immediately. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/util/virthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virthread.c

[libvirt] [PATCH] Add source check before attaching device

2015-04-16 Thread zhang bo
Source device/file is not unique now, we should check it when attach device. Signed-off-by: YueWenyuan yueweny...@huawei.com Signed-off-by: Zhang Bo oscar.zhan...@huawei.com --- src/conf/domain_conf.c | 15 +++ src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 +

[libvirt] [PATCH 4/5] qemuDomainBlockJobAbort: use sync block job helpers

2015-04-16 Thread Michael Chapman
The !modern code path needs to call qemuBlockJobEventProcess directly. the modern code path will call it via qemuBlockJobSyncWait. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/qemu/qemu_driver.c | 56 ++ 1 file changed, 20

Re: [libvirt] Building libvirt under Windows

2015-04-16 Thread Matthias Bolte
2015-04-16 11:52 GMT+02:00 Pavel Fedin p.fe...@samsung.com: Hello! I am currently building libvirt under Windows64, and i would like to ask for correct way to do it. The first thing to resolve is absence of RPC XDR library. From configure source i figured out that portablexdr library may

Re: [libvirt] [PATCHv2] virBitmap: Place virBitmapIsAllClear check after virBitmapParse calls

2015-04-16 Thread Erik Skultety
On 04/14/2015 12:27 PM, John Ferlan wrote: On 04/13/2015 08:01 AM, Erik Skultety wrote: This patch adds checks for empty bitmaps right after the calls of virBitmapParse. These only include spots where set API's are called and where domain's XML is parsed. Also, it partially reverts

Re: [libvirt] [PATCH] daemon: Prefix sysctl configuration file with numbers

2015-04-16 Thread Michal Privoznik
On 15.04.2015 13:12, Jiri Denemark wrote: Apparently, files in /usr/lib/sysctl.d are usually prefixed with numbers for easier ordering. Let's be consistent with this. I chose 60 for libvirtd so that it goes after 50-default.conf. https://bugzilla.redhat.com/show_bug.cgi?id=1084876

Re: [libvirt] building xen and libvirt with odd --prefix fails

2015-04-16 Thread Olaf Hering
On Thu, Apr 16, Olaf Hering wrote: And initially I did not pass the matching --prefix to libvirts configure. Even with matching --prefix libvirt does not look in $prefix/include for xen/xen.h, even with --includedir=$prefix/include. Using env CFLAGS=-I/odd/path/include

Re: [libvirt] [PATCH v3 2/4] refactor virStorageBackendSCSINewLun

2015-04-16 Thread Ján Tomko
On Tue, Apr 07, 2015 at 04:21:01PM -0400, John Ferlan wrote: This could use some comment about inverting the logic of the retval variable. Signed-off-by: John Ferlan jfer...@redhat.com --- src/storage/storage_backend_scsi.c | 55 ++ 1 file changed, 20

Re: [libvirt] [PATCH] daemon: Prefix sysctl configuration file with numbers

2015-04-16 Thread Eric Blake
On 04/15/2015 05:12 AM, Jiri Denemark wrote: Apparently, files in /usr/lib/sysctl.d are usually prefixed with numbers for easier ordering. Let's be consistent with this. I chose 60 for libvirtd so that it goes after 50-default.conf. https://bugzilla.redhat.com/show_bug.cgi?id=1084876

Re: [libvirt] [PATCHv3] qemu: monitor: Refactor and fix monitor checking

2015-04-16 Thread Peter Krempa
On Thu, Apr 16, 2015 at 14:38:25 +0200, Jiri Denemark wrote: On Wed, Apr 15, 2015 at 16:27:35 +0200, Peter Krempa wrote: Among all the monitor APIs some where checking if mon is NULL and some were not. Since it's possible to have mon equal to NULL in case a second call is attempted once

Re: [libvirt] [PATCH v3 1/4] storage: Split out the valid path check

2015-04-16 Thread Ján Tomko
On Tue, Apr 07, 2015 at 04:21:00PM -0400, John Ferlan wrote: For virStorageBackendStablePath, in order to make decisions in other code split out the checks regarding whether the pool's target is empty, using /dev, using /dev/, or doesn't start with /dev Signed-off-by: John Ferlan

Re: [libvirt] [PATCH] daemon: Prefix sysctl configuration file with numbers

2015-04-16 Thread Jiri Denemark
On Thu, Apr 16, 2015 at 06:45:44 -0600, Eric Blake wrote: On 04/15/2015 05:12 AM, Jiri Denemark wrote: Apparently, files in /usr/lib/sysctl.d are usually prefixed with numbers for easier ordering. Let's be consistent with this. I chose 60 for libvirtd so that it goes after 50-default.conf.

Re: [libvirt] qemu: lifecycle: reboot + shutdown, unexpected vm status.

2015-04-16 Thread Michal Privoznik
On 16.04.2015 08:02, zhang bo wrote: Steps: 1 virsh reboot guest1 --mode=acpi 2 virsh shutdown guest1 --mode=agent Expected result: As the SHUTDOWN job is after REBOOT, we expected the guest to be *shutoff*. (Do you think so?) Exacted result: After the 2 steps

Re: [libvirt] [PATCHv3] qemu: monitor: Refactor and fix monitor checking

2015-04-16 Thread Jiri Denemark
On Wed, Apr 15, 2015 at 16:27:35 +0200, Peter Krempa wrote: Among all the monitor APIs some where checking if mon is NULL and some were not. Since it's possible to have mon equal to NULL in case a second call is attempted once entered the monitor. This requires that every single API checks for

Re: [libvirt] Building libvirt under Windows

2015-04-16 Thread Eric Blake
On 04/16/2015 03:52 AM, Pavel Fedin wrote: Hello! I am currently building libvirt under Windows64, and i would like to ask for correct way to do it. The first thing to resolve is absence of RPC XDR library. From configure source i figured out that portablexdr library may help. I have

Re: [libvirt] [PATCH] virCondWaitUntil: calculate timespec correctly

2015-04-16 Thread Michal Privoznik
On 16.04.2015 11:27, Michael Chapman wrote: ts.tv_nsec was off by a factor of 1000, making timeouts less than a second in the future often expiring immediately. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/util/virthread.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH] virCondWaitUntil: calculate timespec correctly

2015-04-16 Thread Martin Kletzander
On Thu, Apr 16, 2015 at 03:48:25PM +0200, Martin Kletzander wrote: On Thu, Apr 16, 2015 at 07:27:36PM +1000, Michael Chapman wrote: ts.tv_nsec was off by a factor of 1000, making timeouts less than a second in the future often expiring immediately. Signed-off-by: Michael Chapman

Re: [libvirt] [PATCH v3 4/4] scsi: Adjust return values from processLU

2015-04-16 Thread Ján Tomko
On Tue, Apr 07, 2015 at 04:21:03PM -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1171933 Adjust the processLU error returns to be a bit more logical. Currently, the calling code cannot determine the difference between a non disk/lun volume and a processed/found

Re: [libvirt] [PATCH v4 4/9] virstoragefile: Always use virStorageSourceSetBackingStore to set backing store

2015-04-16 Thread John Ferlan
From 937126fd4075194f9fe24c46ff2d4312b8eddeea Mon Sep 17 00:00:00 2001 From: Matthias Gatto matthias.ga...@outscale.com Date: Tue, 17 Mar 2015 20:25:37 +0100 Subject: [PATCH 4/5] virstoragefile: Always use virStorageSourceSetBackingStore to set backing store Replace the parts of the code where a

Re: [libvirt] unclear docs about scsi hostdev

2015-04-16 Thread Olaf Hering
On Wed, Apr 15, Olaf Hering wrote: The scsi host example in https://libvirt.org/formatdomain.html does not make it clear what adapter name='scsi_host0'/ refers to. It implies that any host #0 will be used. Since the index numbers for each host are dynamic an unexpected device may be used by

[libvirt] [PATCH 10/15] Add XML files with admin API specification

2015-04-16 Thread Martin Kletzander
No online docs are build from it since it doesn't really fit into our document structure and new page will need to be created for it, but this is at least a heads-up commit for easier parsing in order to build some documentation (or python bindings) later on. Signed-off-by: Martin Kletzander

[libvirt] [PATCH 06/15] Add admin protocol

2015-04-16 Thread Martin Kletzander
For now there's only CONNECT_OPEN procedure. Signed-off-by: Martin Kletzander mklet...@redhat.com --- .gitignore | 1 + cfg.mk | 2 +- src/Makefile.am| 13 +- src/admin/admin_protocol.x | 60 ++

[libvirt] [EXAMPLE PATCH 14/15] admin: Add virAdmHello function

2015-04-16 Thread Martin Kletzander
Just one of the simplest functions that returns string Clients: X where X is the number of connected clients to daemon's first subserver (the original one), so it can be tested using virsh, ipython, etc. The subserver is gathered by incrementing its reference counter (similarly to getting qemu

[libvirt] [EXAMPLE PATCH 15/15] Example virt-admin

2015-04-16 Thread Martin Kletzander
You had only one job. That's what you can say about this example binary. In future, parts of virsh that are usable for this binary should be split into separate shell-utils and virt-admin should gain all the cool features of virsh without too much code addition. Signed-off-by: Martin Kletzander

[libvirt] [PATCH 05/15] Teach gendispatch how to handle admin dispatching files

2015-04-16 Thread Martin Kletzander
Since this is just a new option for gendispatch, it looks more like a cleanup. The only differences handled by it are connect pointers, private pointers and API naming customs. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/rpc/gendispatch.pl | 128

[libvirt] [PATCH 02/15] util: Add virabstracts file for keeping abstract classes

2015-04-16 Thread Martin Kletzander
The first class in this file is going to be an abstract connection class that holds a per-connection error inside. virConnect will be the first child class inheriting from this one. This is a separate file because virerror.c is going to depend on it and putting it into datatypes along with other

[libvirt] [PATCH 12/15] Add support for admin API in libvirt daemon

2015-04-16 Thread Martin Kletzander
For this to pe properly separated from other protocols used by the server, there is second subserver added which allows access to the whole virNetServer to its clients. Signed-off-by: Martin Kletzander mklet...@redhat.com --- cfg.mk| 3 ++ daemon/Makefile.am| 33

[libvirt] [PATCH 08/15] Add admin error domain

2015-04-16 Thread Martin Kletzander
Just the addition of VIR_FROM_ADMIN to the enum of error domains. Signed-off-by: Martin Kletzander mklet...@redhat.com --- include/libvirt/virterror.h | 3 ++- src/util/virerror.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/libvirt/virterror.h

[libvirt] [PATCH 03/15] datatypes: Use abstract connect class in virConnect

2015-04-16 Thread Martin Kletzander
Make virConnectClass be a child of virAbstractConnectClass and adapt all error handling functions to that. This will allow us to create new connect classes that will just work with our error reporting. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/Makefile.am | 1 +

[libvirt] [PATCH 01/15] util: add virJSONValueCopy

2015-04-16 Thread Martin Kletzander
Faster version of virJSONValueFromString(virJSONValueToString()). Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virjson.c | 65 ++- src/util/virjson.h | 4 +- tests/jsontest.c | 111

[libvirt] [RFCv2 PoCv1 PATCH 00/15] Just Admin API

2015-04-16 Thread Martin Kletzander
*** BLURB *** ... Just kidding :) Sooo... After very very VERY long time, here's a draft of an admin interface that is supposed to open up new possibilities to be done on a live daemon. The aim here is to create some first inches of that API in order to open up the possibility of new API

[libvirt] [PATCH 09/15] Add libvirt-admin library

2015-04-16 Thread Martin Kletzander
Initial scratch of the admin library. It has its own virAdmConnectPtr that inherits from virAbstractConnectPtr and thus trivially supports error reporting. Configuration option --with-admin is added to control whether the admin library should be built or not (set to 'yes' by default). There's

[libvirt] [EXAMPLE PATCH 13/15] rpc: Add virNetSubServerGetNClients

2015-04-16 Thread Martin Kletzander
This function accesses the number of connected clients while properly locking the subserver it returns the data about. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/libvirt_remote.syms | 1 + src/rpc/virnetsubserver.c | 10 ++ src/rpc/virnetsubserver.h | 2 ++ 3 files

[libvirt] [PATCH 04/15] Break virNetServer into virNetSubServers

2015-04-16 Thread Martin Kletzander
Each subserver has its own RPC programs, services, workers, keepalive, clients etc. Hence (possible) multiple subservers are properly separated. The part in remote.c is just mechanical, the same applies to most of the code movement from virnetserver.c to virnetsubserver.c. Signed-off-by: Martin

[libvirt] [PATCH 11/15] Add configuration options for permissions on daemon's admin socket

2015-04-16 Thread Martin Kletzander
This is not going to be very widely used, but for some corner cases and easier (unsafe) debugging, it might be nice. Signed-off-by: Martin Kletzander mklet...@redhat.com --- daemon/libvirtd-config.c | 5 - daemon/libvirtd-config.h | 1 + daemon/libvirtd.aug | 1 +

[libvirt] [PATCH 07/15] Build client headers for admin protocol

2015-04-16 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- .gitignore | 1 + cfg.mk | 5 - src/Makefile.am | 9 - 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 56916cf..0f8b3d6 100644 --- a/.gitignore +++ b/.gitignore @@

Re: [libvirt] [PATCH 2/2] lxc: move wireless PHYs to a network namespace

2015-04-16 Thread Michal Privoznik
On 14.04.2015 18:21, Lubomir Rintel wrote: The 802.11 interfaces can not be moved by themselves, their Phy has to move too. If there are other interfaces, they have to move too -- hopefully it's not too confusing. This is a less-invasive alternative to defining a new hostdev type for PHYs.

[libvirt] [PATCH] lxc: move wireless PHYs to a network namespace

2015-04-16 Thread Michal Privoznik
From: Lubomir Rintel lkund...@v3.sk The 802.11 interfaces can not be moved by themselves, their Phy has to move too. If there are other interfaces, they have to move too -- hopefully it's not too confusing. This is a less-invasive alternative to defining a new hostdev type for PHYs.

Re: [libvirt] [PATCH] virNetSocketNewConnectUNIX: Don't unlink(NULL)

2015-04-16 Thread John Ferlan
On 04/16/2015 10:28 AM, Michal Privoznik wrote: There is a possibility that we jump onto error label with @lockpath still initialized to NULL. Here, the @lockpath should be unlink()-ed, but passing there a NULL is not a good idea. Don't do that. In fact, we should call unlink() only if we

Re: [libvirt] [PATCH 4/7] virNetDevBandwidthSet: Add priority to filter

2015-04-16 Thread Laine Stump
On 04/14/2015 12:59 PM, Michal Privoznik wrote: Currently, when constructing traffic shaping rules, the ingress filter is created without any priority specified on the command line. This makes kernel to make up one. While this works, it simplifies things a big if we provide the filter

Re: [libvirt] [PATCH 3/7] virDomainActualNetDefContentsFormat: Format class_id more frequently

2015-04-16 Thread Laine Stump
On 04/14/2015 12:59 PM, Michal Privoznik wrote: After a360912179 the formatting of virDomainActualNetDefPtr was changed a bit. However, during the function rewrite, iface's class_id is not formatted as frequently as it could be. In fact, after rewrite it's formatted only for iface of type

Re: [libvirt] [PATCH] lxc: move wireless PHYs to a network namespace

2015-04-16 Thread Daniel P. Berrange
On Thu, Apr 16, 2015 at 05:22:55PM +0200, Michal Privoznik wrote: From: Lubomir Rintel lkund...@v3.sk The 802.11 interfaces can not be moved by themselves, their Phy has to move too. If there are other interfaces, they have to move too -- hopefully it's not too confusing. This is a

Re: [libvirt] [PATCH] nwfilter: Partly initialize driver even for non-privileged users

2015-04-16 Thread Laine Stump
On 04/16/2015 04:45 AM, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1211436 This reverts commit b7829f959b33c6e3242a9ed745c0da7dc696. Well, not exactly - it adds something too :-) The previous fix was not correct. Like everywhere else, a driver is a global

Re: [libvirt] [PATCH v3 2/4] refactor virStorageBackendSCSINewLun

2015-04-16 Thread John Ferlan
On 04/16/2015 08:35 AM, Ján Tomko wrote: On Tue, Apr 07, 2015 at 04:21:01PM -0400, John Ferlan wrote: This could use some comment about inverting the logic of the retval variable. Signed-off-by: John Ferlan jfer...@redhat.com --- src/storage/storage_backend_scsi.c | 55

Re: [libvirt] [PATCH 0/2] Re: libvirtd live-locking on CTX_LOCK when doing 'virsh domid save /tmp/blah' with guest corrupting memory (on purpose).

2015-04-16 Thread Jim Fehlig
On 04/14/2015 11:31 AM, Ian Jackson wrote: Konrad Rzeszutek Wilk writes (libvirtd live-locking on CTX_LOCK when doing 'virsh domid save /tmp/blah' with guest corrupting memory (on purpose).): It looks like thread #10 is blocking in libxl_read_exactly waiting for 'libxl-save-helper'. Said

[libvirt] [PATCH] virbuffer: fix build on rhel-6

2015-04-16 Thread Pavel Hrdina
On rhel-6 is broken gcc that reports this warning: util/virbuffer.c:500: error: logical '' with non-zero constant will always evaluate as true [-Wlogical-op] Move the pragma directive before function virBufferEscapeString because since commit aeb5262e this function uses 'strchr' too.

Re: [libvirt] [PATCH] virCondWaitUntil: calculate timespec correctly

2015-04-16 Thread Martin Kletzander
On Thu, Apr 16, 2015 at 07:27:36PM +1000, Michael Chapman wrote: ts.tv_nsec was off by a factor of 1000, making timeouts less than a second in the future often expiring immediately. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/util/virthread.c | 2 +- 1 file changed, 1

Re: [libvirt] [PATCH v3 3/4] scsi: Adjust return value for virStorageBackendSCSINewLun

2015-04-16 Thread Ján Tomko
On Tue, Apr 07, 2015 at 04:21:02PM -0400, John Ferlan wrote: Use virStorageBackendPoolUseDevPath API to determine whether creation of stable target path is possible for the volume. If not, then return failure. This will differentiate a failed virStorageBackendStablePath which won't need to

Re: [libvirt] [PATCH v4 0/9] qemu: Add quorum support to libvirt

2015-04-16 Thread John Ferlan
On 03/17/2015 03:25 PM, Matthias Gatto wrote: The purpose of these patches is to introduce quorum for libvirt I've try to follow this proposal: http://www.redhat.com/archives/libvir-list/2014-May/msg00533.html Before we reach a year waiting on this and so we make some progress... I

Re: [libvirt] [PATCH v4 3/9] virstoragefile: Add virStorageSourceSetBackingStore

2015-04-16 Thread John Ferlan
From 052a5b1a87c090093fda1d6591fb4d37a1cb8c3c Mon Sep 17 00:00:00 2001 From: Matthias Gatto matthias.ga...@outscale.com Date: Tue, 17 Mar 2015 20:25:36 +0100 Subject: [PATCH 3/5] virstoragefile: Add virStorageSourceSetBackingStore As explained for virStorageSourceGetBackingStore, quorum allows

Re: [libvirt] [PATCH v4 2/9] virstoragefile: Always use virStorageSourceGetBackingStore to get backing store

2015-04-16 Thread John Ferlan
From fe29212011d9a20e2f7a47de9c66572bfb55bc8e Mon Sep 17 00:00:00 2001 From: Matthias Gatto matthias.ga...@outscale.com Date: Tue, 17 Mar 2015 20:25:35 +0100 Subject: [PATCH 2/5] virstoragefile: Always use virStorageSourceGetBackingStore to get backing store Uniformize backing store usage by

[libvirt] [PATCH] virNetSocketNewConnectUNIX: Don't unlink(NULL)

2015-04-16 Thread Michal Privoznik
There is a possibility that we jump onto error label with @lockpath still initialized to NULL. Here, the @lockpath should be unlink()-ed, but passing there a NULL is not a good idea. Don't do that. In fact, we should call unlink() only if we created the lock file successfully. Reported-by: John

Re: [libvirt] [PATCH 0/2] Re: libvirtd live-locking on CTX_LOCK when doing 'virsh domid save /tmp/blah' with guest corrupting memory (on purpose).

2015-04-16 Thread Ian Jackson
Jim Fehlig writes (Re: [PATCH 0/2] Re: libvirtd live-locking on CTX_LOCK when doing 'virsh domid save /tmp/blah' with guest corrupting memory (on purpose).): On 04/14/2015 11:31 AM, Ian Jackson wrote: I have produced what I think are two patches that will fix this. I have compiled them but

Re: [libvirt] [PATCH 5/7] virnetdevbandwidth.c: Separate tc filter creation to a function

2015-04-16 Thread Laine Stump
On 04/14/2015 12:59 PM, Michal Privoznik wrote: Not only this simplifies the code a bit, it prepares the environment for upcoming patches. The new virNetDevBandwidthManipulateFilter() function is capable of both removing a filter and adding a new one. At the same time! Yeah, this is not

[libvirt] [PATCH] qemu: Always refresh capabilities if no guests found (bz 1000116)

2015-04-16 Thread Cole Robinson
- Remove all qemu emulators - Restart libvirtd - Install qemu emulators - Call 'virsh version' - errors The only thing that will force the qemu driver to refresh it's cached capablities info is an explict API call to GetCapabilities. However in the case when the initial caps lookup at driver

[libvirt] [PATCH] spec: If installing default network, reload libvirtd (bz 867546)

2015-04-16 Thread Cole Robinson
If libvirt-daemon-config-network is installed while libvirtd is already running, the daemon needs to be restarted to pick up the change. Instead let's trigger a daemon reload when the package is first installed. Then the default network is available immediately if libvirtd was already running.

Re: [libvirt] [PATCH] util: set MAC address for VF via netlink message to PF + VF# when possible

2015-04-16 Thread Laine Stump
On 04/15/2015 02:47 PM, John Ferlan wrote: On 04/10/2015 01:47 PM, Laine Stump wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1113474 When we set the MAC address of a network device as a part of setting up macvtap passthrough mode (where the domain has an emulated netdev

Re: [libvirt] [Xen-devel] [PATCH] libxl: Disallow save or migrate when host devices are assigned to a guest.

2015-04-16 Thread Dario Faggioli
On Tue, 2015-04-14 at 20:15 -0600, Jim Fehlig wrote: Konrad Rzeszutek Wilk wrote: -static bool -libxlDomainMigrationIsAllowed(virDomainDefPtr def) -{ -/* Migration is not allowed if definition contains any hostdevs */ -if (def-nhostdevs 0) { -

Re: [libvirt] [PATCH v3 3/4] scsi: Adjust return value for virStorageBackendSCSINewLun

2015-04-16 Thread John Ferlan
On 04/16/2015 09:14 AM, Ján Tomko wrote: On Tue, Apr 07, 2015 at 04:21:02PM -0400, John Ferlan wrote: Use virStorageBackendPoolUseDevPath API to determine whether creation of stable target path is possible for the volume. If not, then return failure. This will differentiate a failed

Re: [libvirt] [PATCH v3 4/4] scsi: Adjust return values from processLU

2015-04-16 Thread John Ferlan
On 04/16/2015 10:06 AM, Ján Tomko wrote: On Tue, Apr 07, 2015 at 04:21:03PM -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1171933 Adjust the processLU error returns to be a bit more logical. Currently, the calling code cannot determine the difference between a non

Re: [libvirt] [PATCH 0/5] libxl: improve xl config parsing

2015-04-16 Thread Jim Fehlig
On 04/09/2015 08:01 AM, Michal Privoznik wrote: On 20.03.2015 18:07, Jim Fehlig wrote: This series was inspired by Marek's and Chunyan's patches to add support for kernel, initrd, and cmdline in Xen HVM domain config https://www.redhat.com/archives/libvir-list/2015-March/msg00328.html

Re: [libvirt] [PATCH] Add source check before attaching device

2015-04-16 Thread zhang bo
On 2015/4/16 17:44, Jiri Denemark wrote: On Thu, Apr 16, 2015 at 16:51:52 +0800, zhang bo wrote: Source device/file is not unique now, we should check it when attach device. The check is vary fragile and unreliable. It would be very hard (perhaps even impossible) to really detect that the

[libvirt] request for backwards compatibility

2015-04-16 Thread Kash Pande
Hi there, I've been trying to use libvirt-php to bring libvirt support to jentu which runs on mostly Debian Wheezy machines. I've had a few bugs setting network devices as active with the released (0.4.8) version: PHP Warning: libvirt_network_get_information(): Invalid XPath node for network

[libvirt] [PATCH] qemu: lifecycle: guest get rebooted after reboot and shutdown

2015-04-16 Thread zhang bo
Steps: 1 virsh reboot guest1 --mode=acpi 2 virsh shutdown guest1 --mode=agent Expected result: As the SHUTDOWN job is after REBOOT, we expected the guest to be *shutoff*. Exacted result: After the 2 steps above, the guest got *rebooted*. The reason to this problem: 1 in

Re: [libvirt] [PATCH V3 0/3] libxl: domain destroy fixes

2015-04-16 Thread Jim Fehlig
On 04/09/2015 09:03 AM, Michal Privoznik wrote: On 04.04.2015 00:49, Jim Fehlig wrote: V3 of a small series to fix issues wrt domain destroy V1: https://www.redhat.com/archives/libvir-list/2015-March/msg01337.html V2: https://www.redhat.com/archives/libvir-list/2015-April/msg00072.html In

Re: [libvirt] [PATCH 6/7] Introduce virNetDevBandwidthUpdateFilter

2015-04-16 Thread Laine Stump
On 04/14/2015 12:59 PM, Michal Privoznik wrote: This is practically a wrapper over This is a simple wrapper around virNetDevBandwidthManipulateFilter() that will update the desired filter on an interface (usually a network bridge) with a new MAC address. Although, the MAC address in question