Re: [libvirt] [PATCHv2 2/2] spec: require dbus-daemon when using libvirtd in Fedora

2012-12-05 Thread Guannan Ren
On 12/05/2012 11:43 AM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=830201 In older Fedora, the spec file for libivrt depended on avahi, which included avahi-daemon, which in turn depended on dbus. But now that avahi libs and avahi-daemon are (correctly) in separate pacakges,

[libvirt] [PATCH 03/15] qemu: Add/remove the shared disk entry during domain's lifecyle

2012-12-05 Thread Osier Yang
Lifecyle here only means starting and shutdown. --- src/qemu/qemu_process.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ab04599..a44cca1 100644 --- a/src/qemu/qemu_process.c +++

[libvirt] [PATCH 02/15] qemu: Init/Free the list with the driver's lifecyle

2012-12-05 Thread Osier Yang
Lifecyle here only means starting and shutdown. --- src/qemu/qemu_driver.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bb1ec05..3d7f52e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[libvirt] [PATCH 00/15 v5] Unprivileged SG_IO support

2012-12-05 Thread Osier Yang
Hi, As a result of RFC [1], this implements the unprivleged SG_IO support. Testing is not that enough, but I'd like see the reviewing earlier, and meanwhile I'm not going to give up the further testing. v4 - v5 (5 new patches): * Set sysfs unpriv_sgio when attaching disk * Restore sysfs

[libvirt] [PATCH 12/15] qemu: Restore unpriv_sgio when detaching disk

2012-12-05 Thread Osier Yang
Later patch will prohibit restoring it the disk is shared and being used by other domain(s). --- src/qemu/qemu_driver.c | 28 ++-- 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b75b6fe..cedf636

[libvirt] [PATCH 01/15] qemu: Introduce a list to maintain the shared disks between domains

2012-12-05 Thread Osier Yang
A single entry of the list is constructed by the _disk path_ and a sub-list of domain names which are using the disk. * src/qemu/qemu_conf.h (New struct qemuSharedDisk, qemuSharedDiskList; New type qemuSharedDiskPtr, qemuSharedDiskListPtr; Declare

[libvirt] [PATCH 04/15] qemu: Add/Remove the entry of sharedDisks when live attaching/detaching

2012-12-05 Thread Osier Yang
This adds one entry to the list qemud_driver-sharedDisks when attaching a shared disk. And removing the entry from the list when detaching. --- src/qemu/qemu_driver.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 05/15] docs: Add docs and rng schema for new XML cdbfilter

2012-12-05 Thread Osier Yang
Since rawio and cdbfilter are only valid for lun, this groups them together; And since both of them intend to allow the unprivledged user to use the SG_IO commands, they must be exclusive. --- docs/formatdomain.html.in | 13 +- docs/schemas/domaincommon.rng | 52

[libvirt] [PATCH 09/15] qemu: Do not restore the sysfs unpriv_sgio if the disk is being shared

2012-12-05 Thread Osier Yang
This prevents restoring the unpriv_sgio if the disk is shared, and is being used by other active domain. Because we don't want to fall into the corruption situation. --- src/qemu/qemu_process.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH 08/15] qemu: Manage disk's cdbfilter in domain's lifecycle

2012-12-05 Thread Osier Yang
Here lifecyle only means staring and shutdown. To record the original unpriv_sgio value, this introduces old_cdbfilter for disk def. When the domain is starting, the disk's unpriv_sgio is set with regards to the config in domain XML. And when the domain is being destroyed, it's restored to the

[libvirt] [PATCH 06/15] conf: Parse and format the new XML tag cdbfilter

2012-12-05 Thread Osier Yang
Setting cdbfilter to no to enable the unprivleged SG_IO, I.e. Disable the kernel CDB filtering. And yes to enable it. yes is the kernel default behaviour. Later patch will do the actual setting. --- src/conf/domain_conf.c | 58 +++-

[libvirt] [PATCH 11/15] qemu: Set unpriv_sgio when attaching disk

2012-12-05 Thread Osier Yang
Just like for domain starting, the original unpriv_sgio state is recorded for restoring when detaching. --- src/qemu/qemu_driver.c | 48 +--- 1 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 10/15] qemu: Error out when domain starting if the cdbfilter setting conflicts

2012-12-05 Thread Osier Yang
This prevents the domain starting if the shared disk's setting conflicts with other active domain(s), E.g. A domain with cdbfilter set as yes, however, another active domain is using it set as no. * src/conf/domain_conf.h: (Declare helper virDomainDiskFindByPath) * src/conf/domain_conf.c:

[libvirt] [PATCH 07/15] util: Prepare helpers for unpriv_sgio setting

2012-12-05 Thread Osier Yang
virGetDevice{Major,Minor} could be used across the sources, but it doesn't relate with this series, and could be done later. * src/util/util.h: (Declare virGetDevice{Major,Minor}, and vir{Get,Set}DeviceUnprivSGIO) * src/util/util.c: (Implement virGetDevice{Major,Minor} and

[libvirt] [PATCH 13/15] qemu: Error out if the shared disk conf conflicts with others when attaching

2012-12-05 Thread Osier Yang
Just like for domain starting, this checks if the shared disk's conf conflicts with others which are in use. Currently it only checks the setting of cdbfilter. * src/qemu/qemu_process.h (Abstract a helper function qemuCheckSharedDisk) * src/qemu/qemu_process.c (Implement the helper) *

[libvirt] [PATCH 14/15] qemu: Do not restore unpriv_sgio if the disk is shared by other domain

2012-12-05 Thread Osier Yang
Just like for domain shutdown, this prevents restoring the disk's unpriv_sgio if it's being shared by other domain(s). --- src/qemu/qemu_driver.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7288ad6..153e780

[libvirt] [PATCH 15/15] conf: Save disk's original unpriv_sgio state into status XML

2012-12-05 Thread Osier Yang
This allows the disk's original_unpriv value is not lost after restarting or reloading libvirtd. --- src/conf/domain_conf.c | 35 +++ 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 14/15] qemu: Do not restore unpriv_sgio if the disk is shared by other domain

2012-12-05 Thread Osier Yang
Just like for domain shutdown, this prevents restoring the disk's unpriv_sgio if it's being shared by other domain(s). --- src/qemu/qemu_driver.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7288ad6..153e780

[libvirt] [PATCH 12/15] qemu: Restore unpriv_sgio when detaching disk

2012-12-05 Thread Osier Yang
Later patch will prohibit restoring it the disk is shared and being used by other domain(s). --- src/qemu/qemu_driver.c | 28 ++-- 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b75b6fe..cedf636

[libvirt] [PATCH 15/15] conf: Save disk's original unpriv_sgio state into status XML

2012-12-05 Thread Osier Yang
This allows the disk's original_unpriv value is not lost after restarting or reloading libvirtd. --- src/conf/domain_conf.c | 35 +++ 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 02/15] qemu: Init/Free the list with the driver's lifecyle

2012-12-05 Thread Osier Yang
Lifecyle here only means starting and shutdown. --- src/qemu/qemu_driver.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bb1ec05..3d7f52e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[libvirt] [PATCH 11/15] qemu: Set unpriv_sgio when attaching disk

2012-12-05 Thread Osier Yang
Just like for domain starting, the original unpriv_sgio state is recorded for restoring when detaching. --- src/qemu/qemu_driver.c | 48 +--- 1 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 10/15] qemu: Error out when domain starting if the cdbfilter setting conflicts

2012-12-05 Thread Osier Yang
This prevents the domain starting if the shared disk's setting conflicts with other active domain(s), E.g. A domain with cdbfilter set as yes, however, another active domain is using it set as no. * src/conf/domain_conf.h: (Declare helper virDomainDiskFindByPath) * src/conf/domain_conf.c:

[libvirt] [PATCH 09/15] qemu: Do not restore the sysfs unpriv_sgio if the disk is being shared

2012-12-05 Thread Osier Yang
This prevents restoring the unpriv_sgio if the disk is shared, and is being used by other active domain. Because we don't want to fall into the corruption situation. --- src/qemu/qemu_process.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH 04/15] qemu: Add/Remove the entry of sharedDisks when live attaching/detaching

2012-12-05 Thread Osier Yang
This adds one entry to the list qemud_driver-sharedDisks when attaching a shared disk. And removing the entry from the list when detaching. --- src/qemu/qemu_driver.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 08/15] qemu: Manage disk's cdbfilter in domain's lifecycle

2012-12-05 Thread Osier Yang
Here lifecyle only means staring and shutdown. To record the original unpriv_sgio value, this introduces old_cdbfilter for disk def. When the domain is starting, the disk's unpriv_sgio is set with regards to the config in domain XML. And when the domain is being destroyed, it's restored to the

[libvirt] [PATCH 06/15] conf: Parse and format the new XML tag cdbfilter

2012-12-05 Thread Osier Yang
Setting cdbfilter to no to enable the unprivleged SG_IO, I.e. Disable the kernel CDB filtering. And yes to enable it. yes is the kernel default behaviour. Later patch will do the actual setting. --- src/conf/domain_conf.c | 58 +++-

[libvirt] [PATCH 13/15] qemu: Error out if the shared disk conf conflicts with others when attaching

2012-12-05 Thread Osier Yang
Just like for domain starting, this checks if the shared disk's conf conflicts with others which are in use. Currently it only checks the setting of cdbfilter. * src/qemu/qemu_process.h (Abstract a helper function qemuCheckSharedDisk) * src/qemu/qemu_process.c (Implement the helper) *

[libvirt] [PATCH 07/15] util: Prepare helpers for unpriv_sgio setting

2012-12-05 Thread Osier Yang
virGetDevice{Major,Minor} could be used across the sources, but it doesn't relate with this series, and could be done later. * src/util/util.h: (Declare virGetDevice{Major,Minor}, and vir{Get,Set}DeviceUnprivSGIO) * src/util/util.c: (Implement virGetDevice{Major,Minor} and

[libvirt] [PATCH 03/15] qemu: Add/remove the shared disk entry during domain's lifecyle

2012-12-05 Thread Osier Yang
Lifecyle here only means starting and shutdown. --- src/qemu/qemu_process.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ab04599..a44cca1 100644 --- a/src/qemu/qemu_process.c +++

[libvirt] [PATCH 05/15] docs: Add docs and rng schema for new XML cdbfilter

2012-12-05 Thread Osier Yang
Since rawio and cdbfilter are only valid for lun, this groups them together; And since both of them intend to allow the unprivledged user to use the SG_IO commands, they must be exclusive. --- docs/formatdomain.html.in | 13 +- docs/schemas/domaincommon.rng | 52

[libvirt] [PATCH 00/15 v5] Unprivileged SG_IO support

2012-12-05 Thread Osier Yang
Hi, As a result of RFC [1], this implements the unprivleged SG_IO support. Testing is not that enough, but I'd like see the reviewing earlier, and meanwhile I'm not going to give up the further testing. v4 - v5 (5 new patches): * Set sysfs unpriv_sgio when attaching disk * Restore sysfs

[libvirt] [PATCH 01/15] qemu: Introduce a list to maintain the shared disks between domains

2012-12-05 Thread Osier Yang
A single entry of the list is constructed by the _disk path_ and a sub-list of domain names which are using the disk. * src/qemu/qemu_conf.h (New struct qemuSharedDisk, qemuSharedDiskList; New type qemuSharedDiskPtr, qemuSharedDiskListPtr; Declare

Re: [libvirt] [PATCH 00/15 v5] Unprivileged SG_IO support

2012-12-05 Thread Osier Yang
Sorry for the duplicate posts. But I'm wondering why the mail system delay the posting such long. On 2012年12月05日 16:20, Osier Yang wrote: Hi, As a result of RFC [1], this implements the unprivleged SG_IO support. Testing is not that enough, but I'd like see the reviewing earlier, and meanwhile

Re: [libvirt] [PATCH] storage: Error out earlier if the volume target path already exists

2012-12-05 Thread Michal Privoznik
On 05.12.2012 05:44, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=832302 It's odd to fall through to buildVol, and the existed file is removed when buildVol fails. This checks if the volume target path already exists in createVol. The reason for not using error like Volume

Re: [libvirt] [PATCH 10/15] qemu: Error out when domain starting if the cdbfilter setting conflicts

2012-12-05 Thread Jiri Denemark
On Wed, Dec 05, 2012 at 17:25:11 +0800, Osier Yang wrote: This prevents the domain starting if the shared disk's setting conflicts with other active domain(s), E.g. A domain with cdbfilter set as yes, however, another active domain is using it set as no. ... diff --git

[libvirt] [PATCH v3 0/2] storage: allow metadata preallocation when creating qcow2 images

2012-12-05 Thread Ján Tomko
Diff to v1: * A flag for virStorageVolCreateXML and virStorageVolCreateXMLFrom is used instead of guessing from the allocation element. * The flag is exposed and documented in virsh. Diff to v2: * merged first two patches to enable and implement the flag at the same time * more documentation *

[libvirt] [PATCH v3 1/2] storage: allow metadata preallocation when creating qcow2 images

2012-12-05 Thread Ján Tomko
Add VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA flag to virStorageVolCreateXML and virStorageVolCreateXMLFrom. This flag requests metadata preallocation when creating/cloning qcow2 images, resulting in creating a sparse file with qcow2 metadata. It has only slightly larger disk usage compared to new

[libvirt] [PATCH v3 2/2] virsh: allow metadata preallocation when creating volumes

2012-12-05 Thread Ján Tomko
Add --prealloc-metadata flag to these commands: vol-clone vol-create vol-create-as vol-create-from --- tools/virsh-volume.c | 25 + tools/virsh.pod | 23 --- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/tools/virsh-volume.c

Re: [libvirt] [PATCH 10/15] qemu: Error out when domain starting if the cdbfilter setting conflicts

2012-12-05 Thread Osier Yang
On 2012年12月05日 18:20, Jiri Denemark wrote: On Wed, Dec 05, 2012 at 17:25:11 +0800, Osier Yang wrote: This prevents the domain starting if the shared disk's setting conflicts with other active domain(s), E.g. A domain with cdbfilter set as yes, however, another active domain is using it set as

Re: [libvirt] [PATCH 10/15] qemu: Error out when domain starting if the cdbfilter setting conflicts

2012-12-05 Thread Osier Yang
On 2012年12月05日 18:50, Osier Yang wrote: On 2012年12月05日 18:20, Jiri Denemark wrote: On Wed, Dec 05, 2012 at 17:25:11 +0800, Osier Yang wrote: This prevents the domain starting if the shared disk's setting conflicts with other active domain(s), E.g. A domain with cdbfilter set as yes, however,

[libvirt] [PATCH] pci: Fix building of 32bit PCI command array

2012-12-05 Thread Peter Krempa
The pciWrite32 function assembled the array of data to be written to the fd with a bad offset on the last byte. This issue was probably caused by a typo (14, 24). --- src/util/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/pci.c b/src/util/pci.c index

Re: [libvirt] [PATCH 10/15] qemu: Error out when domain starting if the cdbfilter setting conflicts

2012-12-05 Thread Jiri Denemark
On Wed, Dec 05, 2012 at 18:54:42 +0800, Osier Yang wrote: ... However, the mainly reason I choosed to use a sub-list of domain names is for future extenstion, I.E. Assuming there are other disk setting (you never known how many they will be), we have to guarantee they are same among guests

Re: [libvirt] [PATCH 10/15] qemu: Error out when domain starting if the cdbfilter setting conflicts

2012-12-05 Thread Osier Yang
On 2012年12月05日 19:03, Jiri Denemark wrote: On Wed, Dec 05, 2012 at 18:54:42 +0800, Osier Yang wrote: ... However, the mainly reason I choosed to use a sub-list of domain names is for future extenstion, I.E. Assuming there are other disk setting (you never known how many they will be), we have

Re: [libvirt] [PATCH] pci: Fix building of 32bit PCI command array

2012-12-05 Thread Michal Privoznik
On 05.12.2012 12:03, Peter Krempa wrote: The pciWrite32 function assembled the array of data to be written to the fd with a bad offset on the last byte. This issue was probably caused by a typo (14, 24). --- src/util/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH v2 4/4] util: Do not keep PCI device config file open

2012-12-05 Thread Peter Krempa
On 12/04/12 23:23, Jiri Denemark wrote: Directly open and close PCI config file in the APIs that need it rather than keeping the file open for the whole life of PCI device structure. --- src/util/pci.c | 265 + 1 file changed, 156

[libvirt] [PATCH 2/2] util: Don't fail virGetGroupIDByName when group not found

2012-12-05 Thread Christophe Fergeau
virGetGroupIDByName is documented as returning 1 if the groupname cannot be found. getgrnam_r is documented as returning: « 0 or ENOENT or ESRCH or EBADF or EPERM or ... The given name or gid was not found. » and that: « The formulation given above under RETURN VALUE is from POSIX.1-2001. It

[libvirt] Fix virGet{User, Group}IDByName when the user/group cannot be found

2012-12-05 Thread Christophe Fergeau
Hey, I've been having issues recently after upgrading to a newer libvirt on a RHEL6 box. 'virsh start vmname' fails with 'error :internal error Failed to get user record for name '107': No such file or directory ' Looking deeper into this, this comes from 'user not found' errors from

[libvirt] [PATCH 1/2] util: Don't fail virGetUserIDByName when user not found

2012-12-05 Thread Christophe Fergeau
virGetUserIDByName is documented as returning 1 if the username cannot be found. getpwnam_r is documented as returning: « 0 or ENOENT or ESRCH or EBADF or EPERM or ... The given name or uid was not found. » and that: « The formulation given above under RETURN VALUE is from POSIX.1-2001. It does

[libvirt] Set python include dir when cross-compiling

2012-12-05 Thread Prica, Mihai
Hi, I've done some work on libvirt integration in the yocto project. The problem is there is no way to tell the configure script which include_dir to use for the python bindings when cross-compiling. It automatically takes the include_dir from the host system, and if there is a difference in

Re: [libvirt] [PATCH 0/4] qemu: Fix leaks in handling PCI devices

2012-12-05 Thread Jiri Denemark
On Tue, Dec 04, 2012 at 11:38:18 +0100, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=877095 Patch 1/4 fixes a possible double free on error path and the other patches deal with memory and file descriptor leaks in PCI device attachment code. Jiri Denemark (4): qemu:

Re: [libvirt] [PATCH] qemu: Fix error code when attaching existing device

2012-12-05 Thread Jiri Denemark
On Tue, Dec 04, 2012 at 14:50:23 +0100, Peter Krempa wrote: On 12/04/12 11:19, Jiri Denemark wrote: An attempt to attach device that is already attached to a domain results in the following error: virsh # attach-device rhel6 pci2 --persistent error: Failed to attach device from pci2

Re: [libvirt] [PATCH] storage: Error out earlier if the volume target path already exists

2012-12-05 Thread Osier Yang
On 2012年12月05日 18:12, Michal Privoznik wrote: On 05.12.2012 05:44, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=832302 It's odd to fall through to buildVol, and the existed file is removed when buildVol fails. This checks if the volume target path already exists in createVol.

Re: [libvirt] [PATCH] pci: Fix building of 32bit PCI command array

2012-12-05 Thread Peter Krempa
On 12/05/12 12:28, Michal Privoznik wrote: On 05.12.2012 12:03, Peter Krempa wrote: The pciWrite32 function assembled the array of data to be written to the fd with a bad offset on the last byte. This issue was probably caused by a typo (14, 24). --- src/util/pci.c | 2 +- 1 file changed, 1

[libvirt] Reg: Libvirt multiple sessions

2012-12-05 Thread Varun Bhatnagar
Hi, I am working on a requirement where in I need to implement multiple session management and multiple workspaces. I trying to implement it using libvirt. So is it possible to do these two things using libvirt. Does libvirt support multiple session management and multiple workspaces? If yes,

[libvirt] Sophie's choice: corrupt user data (on USB disk) or cancel migration?

2012-12-05 Thread David Jaša
Hi, I've encountered an interesting problem: I did a live migration through libvirt (virsh migrate --live domain dst_libvirt_uri [dst_qemu_uri]) with usb transfer ongoing from qemu guest through usbredir over spice to usb device plugged to the client. The spice client failed to connect to the

Re: [libvirt] [libvirt-users] NWFilter and IPv6

2012-12-05 Thread Laine Stump
(No extra content from me, but I'm setting Followup-To: libvir-list@redhat.com for this (and setting To: to the same), since this is talking about new development, so we want to make sure as many developers as possible see it...) On 12/05/2012 09:23 AM, Guido Winkelmann wrote: Am Dienstag, 4.

Re: [libvirt] [PATCHv3 0/3] IPv6 enhancements; put dnsmasq parameters in conf-file

2012-12-05 Thread Laine Stump
On 12/04/2012 09:03 AM, Gene Czarcinski wrote: On 12/03/2012 11:13 AM, Gene Czarcinski wrote: docs/formatnetwork.html.in | 136 - BTW, for documentation changes I used Since 1.0.1. If something else should be used, please tell me. That's the correct thing to do; if

[libvirt] [PATCH 0/2] Avoid the thread race condition

2012-12-05 Thread Osier Yang
https://bugzilla.redhat.com/show_bug.cgi?id=866524 The two patches are to fix the same bug in different method, 1/2 is suggested by Daniel in the bug. 2/2 is an alternative way to fix it by locking the whole virConnect object. The reason to post 2/2 is that I think 1/2 doesn't fix the root

[libvirt] [PATCH 2/2] Lock the whole virConnect Object when disposing to avoid the thread race

2012-12-05 Thread Osier Yang
https://bugzilla.redhat.com/show_bug.cgi?id=866524 Since the virConnect object is not locked wholely when doing virConenctDispose, a thread can get the lock and thus might cause the race. Detected by valgrind: ==23687== Invalid read of size 4 ==23687==at 0x38BAA091EC: pthread_mutex_lock

[libvirt] [PATCH 1/2] remote: Avoid the thread race condition

2012-12-05 Thread Osier Yang
From: Daniel P. Berrange berra...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=866524 Since the virConnect object is not locked wholely when doing virConenctDispose, a thread can get the lock and thus might cause the race. Detected by valgrind: ==23687== Invalid read of size 4

Re: [libvirt] [PATCH 2/2] Lock the whole virConnect Object when disposing to avoid the thread race

2012-12-05 Thread Daniel P. Berrange
On Wed, Dec 05, 2012 at 10:48:44PM +0800, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=866524 Since the virConnect object is not locked wholely when doing virConenctDispose, a thread can get the lock and thus might cause the race. This patch is to fix it by locking the

Re: [libvirt] [PATCH 1/2] remote: Avoid the thread race condition

2012-12-05 Thread Daniel P. Berrange
On Wed, Dec 05, 2012 at 10:48:43PM +0800, Osier Yang wrote: From: Daniel P. Berrange berra...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=866524 Since the virConnect object is not locked wholely when doing virConenctDispose, a thread can get the lock and thus might cause the

Re: [libvirt] [PATCH v3 2/2] virsh: allow metadata preallocation when creating volumes

2012-12-05 Thread Michal Privoznik
On 05.12.2012 11:48, Ján Tomko wrote: Add --prealloc-metadata flag to these commands: vol-clone vol-create vol-create-as vol-create-from --- tools/virsh-volume.c | 25 + tools/virsh.pod | 23 --- 2 files changed, 41 insertions(+), 7

Re: [libvirt] [PATCH v3 1/2] storage: allow metadata preallocation when creating qcow2 images

2012-12-05 Thread Michal Privoznik
On 05.12.2012 11:48, Ján Tomko wrote: Add VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA flag to virStorageVolCreateXML and virStorageVolCreateXMLFrom. This flag requests metadata preallocation when creating/cloning qcow2 images, resulting in creating a sparse file with qcow2 metadata. It has only

Re: [libvirt] [PATCH v3 0/2] storage: allow metadata preallocation when creating qcow2 images

2012-12-05 Thread Michal Privoznik
On 05.12.2012 11:48, Ján Tomko wrote: Diff to v1: * A flag for virStorageVolCreateXML and virStorageVolCreateXMLFrom is used instead of guessing from the allocation element. * The flag is exposed and documented in virsh. Diff to v2: * merged first two patches to enable and implement the

Re: [libvirt] [PATCHv3 3/3] v7.9: put dnsmasq parameters into conf-file

2012-12-05 Thread Laine Stump
On 12/03/2012 11:13 AM, Gene Czarcinski wrote: This patch changes how parameters are passed to dnsmasq. Instead of being on the command line, the parameters are put into a file (one parameter per line) and a commandline --conf-file= specifies the location of the file. The file is located in

Re: [libvirt] [PATCH 2/2] Lock the whole virConnect Object when disposing to avoid the thread race

2012-12-05 Thread Osier Yang
On 2012年12月06日 00:23, Daniel P. Berrange wrote: On Wed, Dec 05, 2012 at 10:48:44PM +0800, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=866524 Since the virConnect object is not locked wholely when doing virConenctDispose, a thread can get the lock and thus might cause the

Re: [libvirt] [PATCH] storage: Error out earlier if the volume target path already exists

2012-12-05 Thread Michal Privoznik
On 05.12.2012 14:23, Osier Yang wrote: On 2012年12月05日 18:12, Michal Privoznik wrote: On 05.12.2012 05:44, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=832302 It's odd to fall through to buildVol, and the existed file is removed when buildVol fails. This checks if the volume

Re: [libvirt] [PATCHv3 2/3] v8.2 add support for DHCPv6

2012-12-05 Thread Laine Stump
On 12/05/2012 10:00 AM, Laine Stump wrote: I wonder if the dnsmasq maintainer who so quickly updated 2.59 to 2.63 will be willing to do another update to 2.64? It's up to him of course, but my guess is there won't be any reluctance to do that for Fedora 18 (although it will probably be an

Re: [libvirt] [PATCH 0/4] qemu: Fix leaks in handling PCI devices

2012-12-05 Thread Laine Stump
On 12/04/2012 05:38 AM, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=877095 Patch 1/4 fixes a possible double free on error path and the other patches deal with memory and file descriptor leaks in PCI device attachment code. Jiri Denemark (4): qemu: Don't free PCI

Re: [libvirt] [PATCH] storage: Error out earlier if the volume target path already exists

2012-12-05 Thread Osier Yang
On 2012年12月06日 01:01, Michal Privoznik wrote: On 05.12.2012 14:23, Osier Yang wrote: On 2012年12月05日 18:12, Michal Privoznik wrote: On 05.12.2012 05:44, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=832302 It's odd to fall through to buildVol, and the existed file is removed

Re: [libvirt] [PATCHv3 2/3] v8.2 add support for DHCPv6

2012-12-05 Thread Laine Stump
On 12/05/2012 12:04 PM, Laine Stump wrote: On 12/05/2012 10:00 AM, Laine Stump wrote: I wonder if the dnsmasq maintainer who so quickly updated 2.59 to 2.63 will be willing to do another update to 2.64? It's up to him of course, but my guess is there won't be any reluctance to do that for

[libvirt] [PATCH] network: prevent a few invalid configuration combinations

2012-12-05 Thread Laine Stump
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=767057 It was possible to define a network with forward mode='bridge' that had both a bridge device and a forward device defined. These two are mutually exclusive by definition (if you are using a bridge device, then this is a host

Re: [libvirt] [PATCHv3 1/3] v2.0: allow guest to guest IPv6 without gateway definition

2012-12-05 Thread Laine Stump
On 12/03/2012 04:03 PM, Laine Stump wrote: ACK with the changes I've squashed in. I've attached an interdiff of the changes I've made to this message, and will push as soon as someone else ACKs those additional changes. I just pushed your patch with my changes squashed in. You should be able

[libvirt] [PATCH] Inhibit daemon shutdown during capabilities probing

2012-12-05 Thread Guido Günther
As of 1a50ba2cb07d8bb2aa724062889deb9efd7ad9e9 qemu capabilities probing takes longer since we timeout waiting for the monitor socket. When probing qemu for different architectures this can add up so the daemon auto shutdown timeout is reached and the client doesn't have a chance to connect. To

[libvirt] RFC: Enable Libvirt to handle OVA installation

2012-12-05 Thread Ata Bohra
This is a proposal to enhance Libvirt library to handle OVA package installation. OVA: OVA is one of the widely accepted and consortium defined/maintained format for Virtual Machine distros. Technically it is a tar file with three main components: 1. VMX descriptor (XML file defining virtual

Re: [libvirt] [PATCH] network: prevent a few invalid configuration combinations

2012-12-05 Thread Eric Blake
On 12/05/2012 12:15 PM, Laine Stump wrote: This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=767057 It was possible to define a network with forward mode='bridge' that had both a bridge device and a forward device defined. These two are mutually exclusive by definition (if you are

Re: [libvirt] [PATCH] Inhibit daemon shutdown during capabilities probing

2012-12-05 Thread Eric Blake
On 12/05/2012 01:17 PM, Guido Günther wrote: As of 1a50ba2cb07d8bb2aa724062889deb9efd7ad9e9 qemu capabilities probing takes longer since we timeout waiting for the monitor socket. When probing qemu for different architectures this can add up so the daemon auto shutdown timeout is reached and

[libvirt] [PATCH] security hook for hugepages (was Re: virSecurity hook for hugepages?)

2012-12-05 Thread Serge Hallyn
Quoting Serge Hallyn (serge.hal...@canonical.com): Hi, Currently the hugepages support can automatically detect the hugepages mount, but it doesn't update the security information. At least for apparmor we need to be able to add permission for the domain to access the hugetlbfs mount path.

Re: [libvirt] RFC: Enable Libvirt to handle OVA installation

2012-12-05 Thread Doug Goldstein
On Wed, Dec 5, 2012 at 3:50 PM, Ata Bohra ata.hus...@hotmail.com wrote: This is a proposal to enhance Libvirt library to handle OVA package installation. OVA: OVA is one of the widely accepted and consortium defined/maintained format for Virtual Machine distros. Technically it is a tar file

Re: [libvirt] RFC: Enable Libvirt to handle OVA installation

2012-12-05 Thread Ata Bohra
Please see inline. Date: Wed, 5 Dec 2012 17:24:00 -0600 Subject: Re: [libvirt] RFC: Enable Libvirt to handle OVA installation From: car...@gentoo.org To: ata.hus...@hotmail.com CC: libvir-list@redhat.com On Wed, Dec 5, 2012 at 3:50 PM, Ata Bohra ata.hus...@hotmail.com wrote: This is a