Re: [libvirt] [PATCH v5 0/6] Support keyboard device

2014-01-07 Thread Li Zhang
ping On 2013年12月19日 15:50, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patchset is to add keyboard input device. For PPC64, it doesn't support a default keyboard device when the graphic is enabled. Libvirt supports QEMU command line as -device VGA which won't create any

Re: [libvirt] [PATCH] Fix argument order at qemuMigrationPerformJob().

2014-01-07 Thread Ján Tomko
On 01/07/2014 02:03 AM, Minoru Usui wrote: Hi, everyone. I found a small bug at qemuMigrationPerformJob(). The order of argument, @listenAddress and @cookiein, should be changed place, because these order are mismatched caller and callee. Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp

Re: [libvirt] [PATCH] maint: Fix messy include of libvirt_internal.h

2014-01-07 Thread Peter Krempa
On 01/06/14 18:50, Eric Blake wrote: On 01/06/2014 09:40 AM, Peter Krempa wrote: The libvirt_internal.h header was included by the internal.h header. This made it painful to add new stuff to the header file that would require some more specific types. Remove inclusion by internal.h and add it

Re: [libvirt] [Xen-devel] [PATCH] libxl: Fix initialization of nictype in libxl_device_nic

2014-01-07 Thread Ian Campbell
On Mon, 2014-01-06 at 11:59 -0700, Jim Fehlig wrote: +bool ioemu_nic = STREQ(def-os.type, hvm); [...] -if (l_nic-model !STREQ(l_nic-model, netfront)) { -if (VIR_STRDUP(x_nic-model, l_nic-model) 0) -return -1; +if (ioemu_nic) x_nic-nictype =

Re: [libvirt] [PATCHV2] qemu: Add support for changing timeout value to open unix monitor socket

2014-01-07 Thread Richard W.M. Jones
On Thu, Jan 02, 2014 at 06:29:35PM +0200, Pavel Fux wrote: Adding an option to change monitor socket opening timeout the current default is 3 seconds and in some cases it's not enough This should change the *default* to something way bigger than 3 seconds, since lots of people are hitting this.

Re: [libvirt] [PATCH 2/2] storage: Polling the sysfs for pool with fc_host type adapter

2014-01-07 Thread Osier Yang
On 07/01/14 02:30, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The SCSI device corresponding to the vHBA might not show up in sysfs yet when we trying to scan the LUNs. As a result, we will end up with an empty volume set for the pool after pool-start, even if there are LUNs.

Re: [libvirt] [PATCHV2] qemu: Add support for changing timeout value to open unix monitor socket

2014-01-07 Thread Martin Kletzander
On Tue, Jan 07, 2014 at 10:28:41AM +, Richard W.M. Jones wrote: On Thu, Jan 02, 2014 at 06:29:35PM +0200, Pavel Fux wrote: Adding an option to change monitor socket opening timeout the current default is 3 seconds and in some cases it's not enough This should change the *default* to

Re: [libvirt] [PATCHV2] qemu: Add support for changing timeout value to open unix monitor socket

2014-01-07 Thread Richard W.M. Jones
On Tue, Jan 07, 2014 at 11:37:11AM +0100, Martin Kletzander wrote: On Tue, Jan 07, 2014 at 10:28:41AM +, Richard W.M. Jones wrote: On Thu, Jan 02, 2014 at 06:29:35PM +0200, Pavel Fux wrote: Adding an option to change monitor socket opening timeout the current default is 3 seconds and

Re: [libvirt] [PATCHV2] qemu: Add support for changing timeout value to open unix monitor socket

2014-01-07 Thread Martin Kletzander
On Tue, Jan 07, 2014 at 10:39:26AM +, Richard W.M. Jones wrote: On Tue, Jan 07, 2014 at 11:37:11AM +0100, Martin Kletzander wrote: On Tue, Jan 07, 2014 at 10:28:41AM +, Richard W.M. Jones wrote: On Thu, Jan 02, 2014 at 06:29:35PM +0200, Pavel Fux wrote: Adding an option to change

Re: [libvirt] [PATCH 1/2] storage: Fix autostart of pool with fc_host type adapter

2014-01-07 Thread Osier Yang
On 07/01/14 01:21, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The checkPool is a bit different for pool with fc_host type source adapter, since the vHBA it's based on might be not created yet (it's created by startPool, which is involked after checkPool in

Re: [libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-07 Thread Osier Yang
On 06/01/14 23:54, John Ferlan wrote: On 01/02/2014 09:45 AM, Osier Yang wrote: It doesn't make sense to fail if the SCSI host device is specified as shareable explicitly between domains (NB, it works if and only if the device is specified as shareable for *all* domains, otherwise it fails).

Re: [libvirt] [PATCHv2 02/14] event: make deregister return value match docs

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: Ever since their introduction (commit 1509b80 in v0.5.0 for virConnectDomainEventRegister, commit 4445723 in v0.8.0 for virConnectDomainEventDeregisterAny), the event deregistration functions have been documented as returning 0 on success; likewise

Re: [libvirt] [PATCH] Fix argument order at qemuMigrationPerformJob().

2014-01-07 Thread Ján Tomko
On 01/07/2014 10:00 AM, Ján Tomko wrote: On 01/07/2014 02:03 AM, Minoru Usui wrote: Hi, everyone. I found a small bug at qemuMigrationPerformJob(). The order of argument, @listenAddress and @cookiein, should be changed place, because these order are mismatched caller and callee.

Re: [libvirt] [PATCH] qemuStateInitialize: Create qemu log directory

2014-01-07 Thread Michal Privoznik
On 02.01.2014 13:28, Wangyufei (James) wrote: From 51782a44eecf5801e5100920e5965d8dfc46e4cc Mon Sep 17 00:00:00 2001 From: Zhou Yimin zhouyi...@huawei.com Date: Thu, 2 Jan 2014 16:32:46 +0800 Subject: [PATCH] qemuStateInitialize: Create qemu log directory When an error occurred in

Re: [libvirt] [PATCH] qemuStateInitialize: Create qemu log directory

2014-01-07 Thread Eric Blake
On 01/07/2014 06:21 AM, Michal Privoznik wrote: I think we need a different approach here. The error is overwritten in qemuProcessStop(). And I think that's the actual place, that needs to be fixed: diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d0fde54..9331744

Re: [libvirt] [PATCH v3] BSD: implement nodeGetMemoryStats

2014-01-07 Thread Eric Blake
On 01/06/2014 11:40 PM, Roman Bogorodskiy wrote: John Ferlan wrote: On 01/03/2014 01:35 PM, Roman Bogorodskiy wrote: Add a BSD implementation of nodeGetMemoryStats based on sysctl(3). --- src/nodeinfo.c | 82 +- 1 file changed,

[libvirt] [sandbox PATCH] Fix FSF address on bin/virt-sandbox-service

2014-01-07 Thread Cédric Bosdonnat
--- bin/virt-sandbox-service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 2dcbfb8..a7e71cd 100755 --- a/bin/virt-sandbox-service +++ b/bin/virt-sandbox-service @@ -16,7 +16,8 @@ # # You should have received a

[libvirt] [PATCH] maint: fix comment typos in qemu numa code

2014-01-07 Thread Eric Blake
Introduced in commit 81fae6b9. * src/qemu/qemu_driver.c (qemuDomainSetNumaParamsLive): Fix typos. Signed-off-by: Eric Blake ebl...@redhat.com --- Pushing under the trivial rule. src/qemu/qemu_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH] qemuProcessStop: Don't overwrite any errors

2014-01-07 Thread Michal Privoznik
Currently, the qemuProcessStop tries to open the domain log file and saves the original error afterwards. Then all the cleanup is done after which the error is restored back. This has however one flaw: if opening of the log file fails an error is reported, which results in previous error being

Re: [libvirt] [sandbox PATCH] Fix FSF address on bin/virt-sandbox-service

2014-01-07 Thread Peter Krempa
On 01/07/14 14:33, Cédric Bosdonnat wrote: --- bin/virt-sandbox-service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 2dcbfb8..a7e71cd 100755 --- a/bin/virt-sandbox-service +++ b/bin/virt-sandbox-service @@

Re: [libvirt] [sandbox PATCH] Fix FSF address on bin/virt-sandbox-service

2014-01-07 Thread Eric Blake
On 01/07/2014 06:33 AM, Cédric Bosdonnat wrote: --- bin/virt-sandbox-service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 2dcbfb8..a7e71cd 100755 --- a/bin/virt-sandbox-service +++

Re: [libvirt] [PATCH] qemuProcessStop: Don't overwrite any errors

2014-01-07 Thread Eric Blake
On 01/07/2014 06:41 AM, Michal Privoznik wrote: Currently, the qemuProcessStop tries to open the domain log file and saves the original error afterwards. Then all the cleanup is done after which the error is restored back. This has however one flaw: if opening of the log file fails an error is

Re: [libvirt] [PATCHv2 02/14] event: make deregister return value match docs

2014-01-07 Thread Eric Blake
On 01/07/2014 06:09 AM, John Ferlan wrote: On 01/06/2014 05:27 PM, Eric Blake wrote: Ever since their introduction (commit 1509b80 in v0.5.0 for virConnectDomainEventRegister, commit 4445723 in v0.8.0 for virConnectDomainEventDeregisterAny), the event deregistration functions have been

Re: [libvirt] [PATCH 11/24] maint: inline VIR_IS_CONNECT macro

2014-01-07 Thread Eric Blake
On 01/02/2014 04:35 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: Cleanup after the previous patch. * src/datatypes.h (VIR_IS_CONNECT): Delete, and inline into all callers, since no other file uses it any more. Signed-off-by: Eric Blake ebl...@redhat.com ---

[libvirt] [sandbox PATCH v2] Fix FSF address on bin/virt-sandbox-service

2014-01-07 Thread Cédric Bosdonnat
--- Use the URLized version bin/virt-sandbox-service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 2dcbfb8..884acac 100755 --- a/bin/virt-sandbox-service +++ b/bin/virt-sandbox-service @@ -15,8 +15,7 @@ # GNU

Re: [libvirt] [PATCHv2 04/14] event: share state driver between test:///default connections

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: Prior to this patch, every test:/// URI has its own event manager, which means that registering for an event can only ever receive events from the connection where it issued the API that triggered the event. But the whole idea of events is to be

Re: [libvirt] [PATCH 2/5] qemu: Avoid using stale data in virDomainGetBlockInfo

2014-01-07 Thread Jiri Denemark
On Tue, Dec 24, 2013 at 07:22:38 -0700, Eric Blake wrote: On 12/20/2013 02:36 PM, Jiri Denemark wrote: Generally, every API that is going to begin a job should do that before fetching data from vm-def. However, qemuDomainGetBlockInfo does not know whether it will have to start a job or not

Re: [libvirt] [PATCHv2 05/14] event: rename confusing variable in test, remote drivers

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: Since the introduction of network events, any driver that uses a single event state object to track both domain and network events should not include 'domain' in the name of that object. * src/test/test_driver.c (_testConn):

Re: [libvirt] [PATCH] Fix segmentation fault when accessing default qemu machine type

2014-01-07 Thread Jiri Denemark
On Thu, Dec 19, 2013 at 17:27:54 +0900, Yudai Yamagishi wrote: Yudai, would you be comfortable with updating our test suite to test this corner case? Okay, I've taken look at the test suite and I can update it. However, my time is pretty limited right now so it may take a little while to

Re: [libvirt] [PATCH] LXC: don't set socket create selinux context in virLXCProcessConnectMonitor

2014-01-07 Thread Michal Privoznik
On 25.12.2013 08:02, Gao feng wrote: the unix socket /var/run/libvirt/lxc/domain.sock is not created under the selinux context which configured by seclabel. If we try to connect the domain.sock under the selinux context of domain in virtLXCProcessConnectMonitor,selinux will deny this

[libvirt] [PATCH] lxc_controller: Don't leak @name

2014-01-07 Thread Michal Privoznik
The @name variable is VIR_STRDUP()-ed into, but never freed. In fact, there's no need to duplicate a command line argument since all places where @name is used expect const char. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/lxc/lxc_controller.c | 5 ++--- 1 file changed, 2

[libvirt] [PATCH] util: Use new array management macros

2014-01-07 Thread Osier Yang
Like commit 94a26c7e from Eric Blake, the old fuzzy code should be replaced by the new array management macros now. And the type of scsi-count should be changed into size_t, and thus virSCSIDeviceListCount should return size_t instead, similar for vir{PCI,USB}DeviceListCount. ---

[libvirt] [PATCH] lxc_controller: Fix error message on missing --handshakefd

2014-01-07 Thread Michal Privoznik
The argument is --handshakefd not --handshake. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/lxc/lxc_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1b43bd2..a2ae599 100644 ---

Re: [libvirt] [PATCH 2/5] qemu: Avoid using stale data in virDomainGetBlockInfo

2014-01-07 Thread Eric Blake
On 01/07/2014 07:22 AM, Jiri Denemark wrote: On Tue, Dec 24, 2013 at 07:22:38 -0700, Eric Blake wrote: On 12/20/2013 02:36 PM, Jiri Denemark wrote: Generally, every API that is going to begin a job should do that before fetching data from vm-def. However, qemuDomainGetBlockInfo does not know

Re: [libvirt] [PATCH] lxc_controller: Don't leak @name

2014-01-07 Thread Eric Blake
On 01/07/2014 07:56 AM, Michal Privoznik wrote: The @name variable is VIR_STRDUP()-ed into, but never freed. In fact, there's no need to duplicate a command line argument since all places where @name is used expect const char. Signed-off-by: Michal Privoznik mpriv...@redhat.com ---

[libvirt] [PATCH] qemu: auto-create pci controller alias if missing from domain status

2014-01-07 Thread Laine Stump
https://bugzilla.redhat.com/show_bug.cgi?id=1047429 The problem occurs when a host with a running guest is upgraded from pre-1.0.2 libvirt, and then a later attempt is made to hotplug a new PCI device (emulated or passthrough) to that guest without having power cycled / save-restored / migrated

Re: [libvirt] [PATCH] lxc_controller: Fix error message on missing --handshakefd

2014-01-07 Thread Eric Blake
On 01/07/2014 07:56 AM, Michal Privoznik wrote: The argument is --handshakefd not --handshake. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/lxc/lxc_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. diff --git a/src/lxc/lxc_controller.c

Re: [libvirt] [PATCHv2 07/14] event: don't let old-style events clobber per-domain events

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: Right now, the older virConnectDomainEventRegister (takes a function pointer, returns 0 on success) and the newer virConnectDomainEventRegisterID (takes an eventID, returns a callbackID) share the underlying implementation (the older API ends up

Re: [libvirt] [PATCH] util: Use new array management macros

2014-01-07 Thread Eric Blake
On 01/07/2014 08:03 AM, Osier Yang wrote: Like commit 94a26c7e from Eric Blake, the old fuzzy code should be replaced by the new array management macros now. And the type of scsi-count should be changed into size_t, and thus virSCSIDeviceListCount should return size_t instead, similar for

Re: [libvirt] CVE-2013-6458 Re: [PATCH 0/5] qemu: Fix job usage in several APIs

2014-01-07 Thread Jiri Denemark
On Mon, Dec 23, 2013 at 23:09:12 -0700, Eric Blake wrote: On 12/20/2013 02:36 PM, Jiri Denemark wrote: When fixing https://bugzilla.redhat.com/show_bug.cgi?id=1043069 I realized qemuDomainBlockStats is not the only API that does not acquire a job early enough. Generally, every API that is

Re: [libvirt] [PATCHv2 07/14] event: don't let old-style events clobber per-domain events

2014-01-07 Thread Eric Blake
On 01/07/2014 08:14 AM, John Ferlan wrote: Signed-off-by: Eric Blake ebl...@redhat.com --- src/conf/domain_event.c | 171 src/conf/object_event.c | 96 +++--- src/conf/object_event_private.h | 9 +++ 3 files

Re: [libvirt] [PATCH] qemu: auto-create pci controller alias if missing from domain status

2014-01-07 Thread Eric Blake
On 01/07/2014 07:53 AM, Laine Stump wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1047429 The problem occurs when a host with a running guest is upgraded from pre-1.0.2 libvirt, and then a later attempt is made to hotplug a new PCI device (emulated or passthrough) to that guest without

[libvirt] [PATCH v2] lxcDomainShutdownFlags and lxcDomainReboot: Cleanup @flags usage

2014-01-07 Thread Michal Privoznik
Currently, the @flags usage is a bit unclear at first sight to say the least. There's no need for such unclear code especially when we can borrow the working code from qemuDomainShutdownFlags(). Signed-off-by: Michal Privoznik mpriv...@redhat.com --- diff to v1: -lxcDomainReboot adjusted too

Re: [libvirt] [PATCHv2 08/14] event: tighten scope of object_event

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: Tighten up scope after the previous patch avoided using internals. This will also make it easier to change internal implementation without having to chase down quite as many impacted callers or worrying about two files getting implementations out

Re: [libvirt] [PATCHv2 04/14] event: share state driver between test:///default connections

2014-01-07 Thread Eric Blake
On 01/07/2014 07:16 AM, John Ferlan wrote: In order to actually test asynchronous events, I wanted to be able to tie multiple test connections to the same state. Use of a file in a test URI is still per-connection state, but now parallel connections to test:///default (from the same

Re: [libvirt] [PATCH] qemu: auto-create pci controller alias if missing from domain status

2014-01-07 Thread Laine Stump
On 01/07/2014 05:20 PM, Eric Blake wrote: On 01/07/2014 07:53 AM, Laine Stump wrote: I'm not 100% convinced that it's necessary to handle *this* case either (upgrading from pre-1.0.2), but thought I should send the patch to the list anyway to see what others think. My opinion is that it's

Re: [libvirt] [PATCHv2 05/14] event: rename confusing variable in test, remote drivers

2014-01-07 Thread Eric Blake
On 01/07/2014 07:20 AM, John Ferlan wrote: On 01/06/2014 05:27 PM, Eric Blake wrote: Since the introduction of network events, any driver that uses a single event state object to track both domain and network events should not include 'domain' in the name of that object. *

Re: [libvirt] [PATCHv2 09/14] event: properly filter count of remaining events

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: On the surface, this sequence of API calls should succeed: id1 = virConnectDomainEventRegisterAny(..., VIR_DOMAIN_EVENT_ID_LIFECYCLE,...); id2 = virConnectDomainEventRegisterAny(..., VIR_DOMAIN_EVENT_ID_RTC_CHANGE,...);

Re: [libvirt] [PATCHv2 08/14] event: tighten scope of object_event

2014-01-07 Thread Eric Blake
On 01/07/2014 08:18 AM, John Ferlan wrote: On 01/06/2014 05:27 PM, Eric Blake wrote: Tighten up scope after the previous patch avoided using internals. This will also make it easier to change internal implementation without having to chase down quite as many impacted callers or worrying

Re: [libvirt] [PATCHv2 07/14] event: don't let old-style events clobber per-domain events

2014-01-07 Thread Eric Blake
On 01/07/2014 08:24 AM, Eric Blake wrote: On 01/07/2014 08:14 AM, John Ferlan wrote: Signed-off-by: Eric Blake ebl...@redhat.com --- src/conf/domain_event.c | 171 src/conf/object_event.c | 96 +++---

[libvirt] [PATCH] Allow to install apparmor profiles

2014-01-07 Thread Guido Günther
Make it easy to install the shipped examples. The aim is to have reasonably working templates so that distros only need to minimally patch these and can feed things upstream more easily. This was prompted by http://bugs.debian.org/725144 --- configure.ac | 12 +++-

Re: [libvirt] [PATCHv2 11/14] event: don't allow mix of old- and new-style registration

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: Consider these two calls, in either order: id1 = virConnectDomainEventRegisterAny(conn, NULL, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(callback), NULL, NULL); virConnectDomainEventRegister(conn, callback, NULL, NULL);

Re: [libvirt] [PATCH] Read PCI class from sysfs class file instead of config space.

2014-01-07 Thread Michal Privoznik
On 24.12.2013 19:07, Thadeu Lima de Souza Cascardo wrote: When determining if a device is behind a PCI bridge, the PCI device class is checked by reading the config space. However, there are some devices which have the wrong class on the config space, but the class is initialized by Linux

Re: [libvirt] [PATCH] qemu: auto-create pci controller alias if missing from domain status

2014-01-07 Thread Eric Blake
On 01/07/2014 08:36 AM, Laine Stump wrote: Yes, I think I could live with such a footnote. And even if we get outvoted and someone else requests the permanent code clutter, we can add that as a separate commit which gives the further justification of why we are adding it. Okay. I *think*

Re: [libvirt] [PATCH] Allow to install apparmor profiles

2014-01-07 Thread Eric Blake
On 01/07/2014 09:19 AM, Guido Günther wrote: Make it easy to install the shipped examples. The aim is to have reasonably working templates so that distros only need to minimally patch these and can feed things upstream more easily. This was prompted by http://bugs.debian.org/725144 ---

Re: [libvirt] [PATCH 0/2] Introduce max_anonymous_clients

2014-01-07 Thread Michal Privoznik
On 09.12.2013 15:35, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981729 So far we can limit how many clients are connected, how many are waiting in accept() line but we could not control the count of accepted but not authenticated yet. Michal Privoznik (2):

Re: [libvirt] [PATCH] Read PCI class from sysfs class file instead of config space.

2014-01-07 Thread Eric Blake
On 01/07/2014 09:35 AM, Michal Privoznik wrote: diff --git a/tests/virpcitestdata/0001:00:00.0.config b/tests/virpcitestdata/0001:00:00.0.config new file mode 100644 index ..808d48993cfc0f41223fcb5f49deffc594f136b7 GIT binary patch literal 4096

Re: [libvirt] [PATCHv2 13/14] event: don't turn offline domain into global event

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: If a user registers for a domain event filtered to a particular domain, but the persistent domain is offline at the time, then the code silently failed to set up the filter. As a result, the event fires for all domains, rather than being filtered.

[libvirt] [PATCH 0/2] virsh: Fix mishandling of inactive configuration on device hotplug

2014-01-07 Thread Peter Krempa
Peter Krempa (2): virsh: Don't use legacy API if --current is used on device hot(un)plug virsh: Use inactive definition when removing disk from config tools/virsh-domain.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) -- 1.8.5.2 -- libvir-list mailing list

Re: [libvirt] [PATCHv2 14/14] event: make network events easier to use without casts

2014-01-07 Thread John Ferlan
On 01/06/2014 05:27 PM, Eric Blake wrote: While comparing network and domain events, I noticed that the test driver had to do a cast in one place and not the other. For consistency, we should hide the necessary casting as low as possible in the stack, with everything else using saner types.

[libvirt] [PATCH] virConnectUnregisterCloseCallback: Unlock @conn prior to error dispatch

2014-01-07 Thread Michal Privoznik
The function checks for @conn to be valid and locks its mutex. Then, it checks if callee is unregistering the same callback that he registered previously. If this fails an error is reported and the control jumps to 'error' label. Here, if @conn has some errors (and it certainly does - the one

[libvirt] [PATCH 1/2] virsh: Don't use legacy API if --current is used on device hot(un)plug

2014-01-07 Thread Peter Krempa
https://bugzilla.redhat.com/show_bug.cgi?id=1049529 The legacy virDomainAttachDevice and virDomainDetachDevice operate only on active domains. When a user specified --current flag with an inactive domain the old API was used and reported an error. Fix it by calling the new API if --current is

[libvirt] [PATCH 2/2] virsh: Use inactive definition when removing disk from config

2014-01-07 Thread Peter Krempa
https://bugzilla.redhat.com/show_bug.cgi?id=1049529 The 'detach-disk' command in virsh used the active XML definition of a domain even when attempting to remove a disk from the config only. If the disk was only in the inactive definition the operation failed. Fix this by using the inactive XML in

Re: [libvirt] [PATCH] Fix bridge configuration when OUTPUT policy is DROP on the host

2014-01-07 Thread Michal Privoznik
On 17.12.2013 18:56, Lénaïc Huard wrote: When the host is configured with very restrictive firewall (default policy is DROP for all chains, including OUTPUT), the bridge driver for Linux adds netfilter entries to allow DHCP and DNS requests to go from the VM to the dnsmasq of the host. The

Re: [libvirt] [PATCH] virConnectUnregisterCloseCallback: Unlock @conn prior to error dispatch

2014-01-07 Thread Eric Blake
On 01/07/2014 10:25 AM, Michal Privoznik wrote: The function checks for @conn to be valid and locks its mutex. Then, it checks if callee is unregistering the same callback that he registered previously. If this fails an error is reported and the control jumps to 'error' label. Here, if @conn

Re: [libvirt] [PATCH 1/2] virsh: Don't use legacy API if --current is used on device hot(un)plug

2014-01-07 Thread Eric Blake
On 01/07/2014 10:12 AM, Peter Krempa wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1049529 The legacy virDomainAttachDevice and virDomainDetachDevice operate only on active domains. When a user specified --current flag with an inactive domain the old API was used and reported an error.

Re: [libvirt] [PATCH 2/2] virsh: Use inactive definition when removing disk from config

2014-01-07 Thread Eric Blake
On 01/07/2014 10:12 AM, Peter Krempa wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1049529 The 'detach-disk' command in virsh used the active XML definition of a domain even when attempting to remove a disk from the config only. If the disk was only in the inactive definition the

Re: [libvirt] [PATCH] Read PCI class from sysfs class file instead of config space.

2014-01-07 Thread Thadeu Lima de Souza Cascardo
On Tue, Jan 07, 2014 at 09:53:51AM -0700, Eric Blake wrote: On 01/07/2014 09:35 AM, Michal Privoznik wrote: diff --git a/tests/virpcitestdata/0001:00:00.0.config b/tests/virpcitestdata/0001:00:00.0.config new file mode 100644 index

Re: [libvirt] [PATCH] Read PCI class from sysfs class file instead of config space.

2014-01-07 Thread Eric Blake
On 01/07/2014 10:46 AM, Thadeu Lima de Souza Cascardo wrote: Does the resulting file contain any newlines or carriage returns that might get botched on Windows platforms, if we don't add a .gitattributes listing that mentions it is explicitly a binary file? make syntax-check seems to work,

Re: [libvirt] [PATCH 2/5] qemu: Avoid using stale data in virDomainGetBlockInfo

2014-01-07 Thread John Ferlan
On 01/07/2014 10:01 AM, Eric Blake wrote: On 01/07/2014 07:22 AM, Jiri Denemark wrote: On Tue, Dec 24, 2013 at 07:22:38 -0700, Eric Blake wrote: On 12/20/2013 02:36 PM, Jiri Denemark wrote: Generally, every API that is going to begin a job should do that before fetching data from vm-def.

Re: [libvirt] [PATCHv2 09/14] event: properly filter count of remaining events

2014-01-07 Thread Eric Blake
On 01/07/2014 08:48 AM, John Ferlan wrote: On 01/06/2014 05:27 PM, Eric Blake wrote: On the surface, this sequence of API calls should succeed: id1 = virConnectDomainEventRegisterAny(..., VIR_DOMAIN_EVENT_ID_LIFECYCLE,...); id2 = virConnectDomainEventRegisterAny(...,

Re: [libvirt] [PATCHv2 11/14] event: don't allow mix of old- and new-style registration

2014-01-07 Thread Eric Blake
On 01/07/2014 09:23 AM, John Ferlan wrote: On 01/06/2014 05:27 PM, Eric Blake wrote: Consider these two calls, in either order: id1 = virConnectDomainEventRegisterAny(conn, NULL, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(callback), NULL, NULL);

Re: [libvirt] [PATCH V2 1/1] Add hw random number generator (/dev/hwrng) to cgroup ACL

2014-01-07 Thread Pradipta Kumar Banerjee
Any comments.. Should I rebase and resend the patch against the latest release. Please advise. On 12/05/2013 02:00 PM, Pradipta Kr. Banerjee wrote: From: Pradipta Kr. Banerjee bpra...@in.ibm.com Creating a qemu VM with /dev/hwrng as backend RNG device throws the following error - Could not

[libvirt] [PATCH 0/2] v2: spice: expose the disable file transfer option

2014-01-07 Thread Francesco Romani
Here it is the second version of the patch which export the spice agent disable file transfer. I followed Eric's advice and added detection of the support in QEMU in the first patch; the second builds upon the first and exports the support to libvirt. The XML format is intentionally similar to

[libvirt] [PATCH 1/2] spice: detect if qemu can disable file transfer

2014-01-07 Thread Francesco Romani
spice-server offers an API to disable file transfer messages on the agent channel between the client and the guest. This is supported in qemu through the disable-agent-file-xfer option. This detects if QEMU supports this option, and add a capability if does. --- src/qemu/qemu_capabilities.c

Re: [libvirt] [PATCHv2 13/14] event: don't turn offline domain into global event

2014-01-07 Thread Eric Blake
On 01/07/2014 10:07 AM, John Ferlan wrote: The intro comments to 'virObjectEventStateRegisterID()' need to be adjusted to remove '@name' and '@id'. Will do. Same for 'virObjectEventCallbackLookup()' - sadly missed in patch 7, but I was looking for @name and @id now... I actually caught

[libvirt] [PATCH 2/2] spice: expose the QEMU disable file transfer option

2014-01-07 Thread Francesco Romani
spice-server offers an API to disable file transfer messages on the agent channel between the client and the guest. This is supported in qemu through the disable-agent-file-xfer option. This patch exposes this option to libvirt. Adds a new element 'filetransfer', with one property,

Re: [libvirt] [PATCHv2 14/14] event: make network events easier to use without casts

2014-01-07 Thread Eric Blake
On 01/07/2014 10:15 AM, John Ferlan wrote: On 01/06/2014 05:27 PM, Eric Blake wrote: While comparing network and domain events, I noticed that the test driver had to do a cast in one place and not the other. For consistency, we should hide the necessary casting as low as possible in the

[libvirt] [ruby-libvirt] Don't free more entries than we retrieved

2014-01-07 Thread Guido Günther
The vir*List* functions return the number of fetched entries. We mustn't free more, otherwise we'll crash like #0 0xb779d424 in __kernel_vsyscall () #1 0xb733981f in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #2 0xb733ccd3 in __GI_abort () at abort.c:90 #3

Re: [libvirt] [ruby-libvirt] Don't free more entries than we retrieved

2014-01-07 Thread Chris Lalancette
On Tue, Jan 7, 2014 at 3:24 PM, Guido Günther a...@sigxcpu.org wrote: The vir*List* functions return the number of fetched entries. We mustn't free more, otherwise we'll crash like #0 0xb779d424 in __kernel_vsyscall () #1 0xb733981f in __GI_raise (sig=sig@entry=6) at

Re: [libvirt] [ruby-libvirt] Don't free more entries than we retrieved

2014-01-07 Thread Guido Günther
On Tue, Jan 07, 2014 at 03:38:48PM -0500, Chris Lalancette wrote: On Tue, Jan 7, 2014 at 3:24 PM, Guido Günther a...@sigxcpu.org wrote: The vir*List* functions return the number of fetched entries. We mustn't free more, otherwise we'll crash like #0 0xb779d424 in __kernel_vsyscall ()

[libvirt] [ruby-libvirt] Allow to set URI via environment variable

2014-01-07 Thread Guido Günther
This allows us to run tests with the destdriver like: RUBY_LIBVIRT_TEST_URI=test:///default \ RUBYLIB=lib/:ext/libvirt/ \ ruby tests/test_open.rb --- I've only converted three modules so far since they were simple but these already help to run tests during package build.

Re: [libvirt] [ruby-libvirt] Don't free more entries than we retrieved

2014-01-07 Thread Chris Lalancette
On Tue, Jan 7, 2014 at 4:04 PM, Guido Günther a...@sigxcpu.org wrote: The check for 0 might be superfluos but freeing num entries instead of only r ones looks wrong to me since r is the number of allocated names, not num. I'm happy to send a patch dropping the 0 part. Oh, bah humbug. Yeah,

Re: [libvirt] [PATCH 12/24] maint: improve VIR_ERR_INVALID_DOMAIN usage

2014-01-07 Thread Eric Blake
On 01/02/2014 04:47 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: In datatype.c, virGetDomainSnapshot could result in the message: error: invalid domain pointer in bad domain Furthermore, while there are a few functions in libvirt.c that only care about a virDomainPtr

[libvirt] [PATCH ruby-libvirt v2] Don't free more entries than we retrieved

2014-01-07 Thread Guido Günther
The vir*List* functions return the number of fetched entries. We mustn't free more, otherwise we'll crash like #0 0xb779d424 in __kernel_vsyscall () #1 0xb733981f in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #2 0xb733ccd3 in __GI_abort () at abort.c:90 #3

Re: [libvirt] [PATCH] Allow to install apparmor profiles

2014-01-07 Thread Guido Günther
On Tue, Jan 07, 2014 at 09:50:10AM -0700, Eric Blake wrote: On 01/07/2014 09:19 AM, Guido Günther wrote: Make it easy to install the shipped examples. The aim is to have reasonably working templates so that distros only need to minimally patch these and can feed things upstream more easily.

Re: [libvirt] Add GVirConfigDomainDiskDriver

2014-01-07 Thread Guido Günther
On Mon, Jan 06, 2014 at 10:59:31AM +0100, Christophe Fergeau wrote: Hey, On Mon, Jan 06, 2014 at 10:40:49AM +0100, Michal Privoznik wrote: It's been a while since the last time I've written something for libivrt-glib. So just my two cents: I'd say go with new class esp. if there's a

Re: [libvirt] Add GVirConfigDomainDiskDriver

2014-01-07 Thread Christophe Fergeau
On Tue, Jan 07, 2014 at 11:21:22PM +0100, Guido Günther wrote: On Mon, Jan 06, 2014 at 10:59:31AM +0100, Christophe Fergeau wrote: Hey, On Mon, Jan 06, 2014 at 10:40:49AM +0100, Michal Privoznik wrote: It's been a while since the last time I've written something for libivrt-glib. So

[libvirt] [PATCH] Make sure AC_ARG_WITH is always executed

2014-01-07 Thread Guido Günther
--- I'm not sure whether it's good autoconf style to have AC_ARG_WITH in a conditional so this patch moves it out. Cheers, -- Guido configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 97752f4..d02b9d2 100644 --- a/configure.ac +++

Re: [libvirt] [PATCH] Make sure AC_ARG_WITH is always executed

2014-01-07 Thread Eric Blake
On 01/07/2014 04:10 PM, Guido Günther wrote: --- I'm not sure whether it's good autoconf style to have AC_ARG_WITH in a conditional so this patch moves it out. Much of the code within AC_ARG_WITH gets executed unconditionally (because it gets hoisted to earlier parts of the configure than

Re: [libvirt] CVE-2013-6456 Re: [PATCHv2 0/7] lxc: honor mount namespaces

2014-01-07 Thread Gao feng
On 01/07/2014 12:18 PM, Eric Blake wrote: On 12/24/2013 06:45 AM, Reco wrote: On Tue, 24 Dec 2013 06:29:11 -0700 Eric Blake ebl...@redhat.com wrote: diff --git i/src/util/virprocess.c w/src/util/virprocess.c index c99b75a..e069483 100644 --- i/src/util/virprocess.c +++

Re: [libvirt] [ruby-libvirt] Allow to set URI via environment variable

2014-01-07 Thread Chris Lalancette
On Tue, Jan 7, 2014 at 4:11 PM, Guido Günther a...@sigxcpu.org wrote: This allows us to run tests with the destdriver like: RUBY_LIBVIRT_TEST_URI=test:///default \ RUBYLIB=lib/:ext/libvirt/ \ ruby tests/test_open.rb --- I've only converted three modules so far since they were simple

Re: [libvirt] [PATCH ruby-libvirt v2] Don't free more entries than we retrieved

2014-01-07 Thread Chris Lalancette
On Tue, Jan 7, 2014 at 4:54 PM, Guido Günther a...@sigxcpu.org wrote: The vir*List* functions return the number of fetched entries. We mustn't free more, otherwise we'll crash like #0 0xb779d424 in __kernel_vsyscall () #1 0xb733981f in __GI_raise (sig=sig@entry=6) at

Re: [libvirt] [PATCH] LXC: don't set socket create selinux context in virLXCProcessConnectMonitor

2014-01-07 Thread Gao feng
On 01/07/2014 10:37 PM, Michal Privoznik wrote: On 25.12.2013 08:02, Gao feng wrote: the unix socket /var/run/libvirt/lxc/domain.sock is not created under the selinux context which configured by seclabel. If we try to connect the domain.sock under the selinux context of domain in

[libvirt] [PATCH] LXC: create monitor socket under selinux context of domain

2014-01-07 Thread Gao feng
the unix socket /var/run/libvirt/lxc/domain.sock is not created under the selinux context which configured by seclabel. If we try to connect the domain.sock under the selinux context of domain in virtLXCProcessConnectMonitor,selinux will deny this connect operation. type=AVC

[libvirt] [PATCH] docs: add LXC multi console command docs and a example

2014-01-07 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- docs/drvlxc.html.in | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in index 7494eb3..0f3efb0 100644 ---

[libvirt] Entering freeze for 1.2.1

2014-01-07 Thread Daniel Veillard
As planned, I just tagged Release Candidate 1 for libvirt and libvirt-python in git and pushed tarballs to the usual places: ftp://libvirt.org/libvirt ftp://libvirt.org/libvirt/python I think I will make a release candidate 2 during the week-end or early monday, to target a release on

Re: [libvirt] [PATCH 13/24] maint: inline VIR_IS*_DOMAIN macro

2014-01-07 Thread Eric Blake
On 01/02/2014 04:50 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: Cleanup after the previous patch. In particular, note that xenDomainUsedCpus can only be reached from xenUnifiedDomainGetXMLDesc, which in turn is only reached from public API that already validated the

Re: [libvirt] Add GVirConfigDomainDiskDriver

2014-01-07 Thread Guido Günther
On Tue, Jan 07, 2014 at 11:54:57PM +0100, Christophe Fergeau wrote: On Tue, Jan 07, 2014 at 11:21:22PM +0100, Guido Günther wrote: On Mon, Jan 06, 2014 at 10:59:31AM +0100, Christophe Fergeau wrote: Hey, On Mon, Jan 06, 2014 at 10:40:49AM +0100, Michal Privoznik wrote: It's been a

Re: [libvirt] [PATCH ruby-libvirt v2] Don't free more entries than we retrieved

2014-01-07 Thread Guido Günther
On Tue, Jan 07, 2014 at 08:55:04PM -0500, Chris Lalancette wrote: On Tue, Jan 7, 2014 at 4:54 PM, Guido Günther a...@sigxcpu.org wrote: The vir*List* functions return the number of fetched entries. We mustn't free more, otherwise we'll crash like #0 0xb779d424 in __kernel_vsyscall ()

  1   2   >