[libvirt] [test-API][PATCH] Add 8 new APIs in domainAPI

2012-02-07 Thread Wayne Sun
* new APIs reset(self, domname, flag = 0) get_vcpu_pin_info(self, domname, flag) is_updated(self, domname) inject_NMI(self, domname, flag = 0) open_console(self, domname, dev_name, stream, flag = 0) open_graphics(self, domname, idx, fd, flag = 1) screenshot(self,

Re: [libvirt] segment fault from libvirtmod

2012-02-07 Thread Daniel P. Berrange
On Mon, Feb 06, 2012 at 03:59:19PM +0100, Michal Privoznik wrote: On 06.02.2012 10:08, Guannan Ren wrote: Hi, The Makefile.am in python forget to add probes.o if WITH_DTRACE but after I added it and tried to connect, using libvirt.open(qemu:///system)

Re: [libvirt] segment fault from libvirtmod

2012-02-07 Thread Guannan Ren
On 02/07/2012 05:35 PM, Daniel P. Berrange wrote: On Mon, Feb 06, 2012 at 03:59:19PM +0100, Michal Privoznik wrote: On 06.02.2012 10:08, Guannan Ren wrote: Hi, The Makefile.am in python forget to add probes.o if WITH_DTRACE but after I added it and tried to connect,

[libvirt] [PATCH] build: don't require avahi during install

2012-02-07 Thread Laine Stump
See: https://bugzilla.redhat.com/show_bug.cgi?id=785269 The specfile requires avahi during install if libvirt was built with avahi support, but there are many situations where it is undesirable to install avahi due to security concerns. If we still Build-require avahi-devel during the build, but

Re: [libvirt] segment fault from libvirtmod

2012-02-07 Thread Michal Privoznik
On 06.02.2012 15:59, Michal Privoznik wrote: On 06.02.2012 10:08, Guannan Ren wrote: Hi, The Makefile.am in python forget to add probes.o if WITH_DTRACE but after I added it and tried to connect, using libvirt.open(qemu:///system) in python , it reported:

Re: [libvirt] segment fault from libvirtmod

2012-02-07 Thread Daniel P. Berrange
On Mon, Feb 06, 2012 at 03:59:19PM +0100, Michal Privoznik wrote: On 06.02.2012 10:08, Guannan Ren wrote: Hi, The Makefile.am in python forget to add probes.o if WITH_DTRACE but after I added it and tried to connect, using libvirt.open(qemu:///system)

[libvirt] [PATCH] Bug fix: Allow sysinfo to display processor information

2012-02-07 Thread Prerna Saxena
From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Tue, 7 Feb 2012 17:05:37 +0530 Subject: [PATCH] On systems with dmidecode version 2.10 or older, dmidecode displays processor information, followed by BIOS, system and memory-DIMM details. Calls to virSysinfoParseBIOS(),

Re: [libvirt] [PATCH 1/2] util: Generalize virFileDirectFd

2012-02-07 Thread Jiri Denemark
On Mon, Feb 06, 2012 at 15:42:43 -0700, Eric Blake wrote: On 02/06/2012 07:51 AM, Jiri Denemark wrote: virFileDirectFd was used for accessing files opened with O_DIRECT using libvirt_iohelper. We will want to use the helper for accessing files regardless on O_DIRECT and thus virFileDirectFd

Re: [libvirt] [PATCH 2/2] qemu: Always use iohelper for dumping domain core

2012-02-07 Thread Jiri Denemark
On Mon, Feb 06, 2012 at 15:43:59 -0700, Eric Blake wrote: On 02/06/2012 07:51 AM, Jiri Denemark wrote: Qemu uses non-blocking I/O which doesn't play nice with regular file descriptors. We need to pass a pipe to qemu instead, which can easily be done using iohelper. ---

[libvirt] [PATCH v2 1/2] util: Generalize virFileDirectFd

2012-02-07 Thread Jiri Denemark
virFileDirectFd was used for accessing files opened with O_DIRECT using libvirt_iohelper. We will want to use the helper for accessing files regardless on O_DIRECT and thus virFileDirectFd was generalized and renamed to virFileWrapperFd. --- src/qemu/qemu_driver.c | 45 +++

[libvirt] [PATCH v2 0/2] qemu: Fix stalls during live core dump

2012-02-07 Thread Jiri Denemark
Qemu uses non-blocking I/O which doesn't play nice with regular file descriptors. We need to pass a pipe to qemu when dumping core to avoid stalls in live mode. Version 2: - generalize virFileDirectFd a bit more as suggested by Eric Jiri Denemark (2): util: Generalize virFileDirectFd qemu:

[libvirt] [PATCH v2 2/2] qemu: Always use iohelper for dumping domain core

2012-02-07 Thread Jiri Denemark
Qemu uses non-blocking I/O which doesn't play nice with regular file descriptors. We need to pass a pipe to qemu instead, which can easily be done using iohelper. --- src/qemu/qemu_driver.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] [RFC] Specific vcpu hot-(un)plug API proposal

2012-02-07 Thread Daniel P. Berrange
On Mon, Feb 06, 2012 at 10:33:59AM -0700, Eric Blake wrote: On 02/06/2012 10:10 AM, Peter Krempa wrote: Hypervisors are starting to support hot-(un)plugging of specific vcpus. This adds more flexibility for the management tools to decide which CPU should be added or removed. Libvirt's

[libvirt] [PATCH] pyhton: Don't link against libvirt_util.la

2012-02-07 Thread Michal Privoznik
As we already link with libvirt.la which contains libvirt_utils.la. Double linking causes global symbols to be presented twice and thus confusion. This partially reverts c700613b8d463212d142c97108b7a2352e23e559 --- python/Makefile.am |2 -- 1 files changed, 0 insertions(+), 2 deletions(-)

Re: [libvirt] [PATCH] libvirtd: Enable private /tmp under systemd.

2012-02-07 Thread Daniel P. Berrange
On Mon, Feb 06, 2012 at 02:31:55PM -0700, Eric Blake wrote: On 02/06/2012 02:15 PM, Eric Blake wrote: The last intentional use of /tmp by libvirt was patched in commit bd6083c9b; we can add an extra measure of security by explicitly requesting that libvirtd's /tmp is not visible to

Re: [libvirt] [PATCH] pyhton: Don't link against libvirt_util.la

2012-02-07 Thread Daniel P. Berrange
On Tue, Feb 07, 2012 at 01:41:52PM +0100, Michal Privoznik wrote: As we already link with libvirt.la which contains libvirt_utils.la. Double linking causes global symbols to be presented twice and thus confusion. This partially reverts c700613b8d463212d142c97108b7a2352e23e559 ---

Re: [libvirt] [PATCH] pyhton: Don't link against libvirt_util.la

2012-02-07 Thread Michal Privoznik
On 07.02.2012 13:49, Daniel P. Berrange wrote: On Tue, Feb 07, 2012 at 01:41:52PM +0100, Michal Privoznik wrote: As we already link with libvirt.la which contains libvirt_utils.la. Double linking causes global symbols to be presented twice and thus confusion. This partially reverts

[libvirt] [PATCH v6] npiv: Auto-generate WWN if it's not specified

2012-02-07 Thread Osier Yang
The auto-generated WWN comply with the new addressing schema of WWN: quote the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a vendor-specified serial number. /quote We choose hex 5 for the first nibble. And for the 3-bytes vendor ID, we uses the OUI

Re: [libvirt] [PATCH v5] npiv: Auto-generate WWN if it's not specified

2012-02-07 Thread Osier Yang
On 2012年02月07日 03:13, Matthias Bolte wrote: 2012/2/6 Eric Blakeebl...@redhat.com: On 02/06/2012 02:11 AM, Osier Yang wrote: The auto-generated WWN comply with the new addressing schema of WWN: quote the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a

Re: [libvirt] [PATCH v6] npiv: Auto-generate WWN if it's not specified

2012-02-07 Thread Matthias Bolte
2012/2/7 Osier Yang jy...@redhat.com: The auto-generated WWN comply with the new addressing schema of WWN: quote the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a vendor-specified serial number. /quote We choose hex 5 for the first nibble. And

Re: [libvirt] [PATCH] pyhton: Don't link against libvirt_util.la

2012-02-07 Thread Guannan Ren
On 02/07/2012 08:41 PM, Michal Privoznik wrote: As we already link with libvirt.la which contains libvirt_utils.la. Double linking causes global symbols to be presented twice and thus confusion. This partially reverts c700613b8d463212d142c97108b7a2352e23e559 --- python/Makefile.am |2 --

Re: [libvirt] [PATCH v6] npiv: Auto-generate WWN if it's not specified

2012-02-07 Thread Eric Blake
On 02/07/2012 06:38 AM, Osier Yang wrote: The auto-generated WWN comply with the new addressing schema of WWN: quote the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a vendor-specified serial number. /quote We choose hex 5 for the first nibble.

Re: [libvirt] [PATCH v6] npiv: Auto-generate WWN if it's not specified

2012-02-07 Thread Osier Yang
On 2012年02月07日 21:29, Eric Blake wrote: On 02/07/2012 06:38 AM, Osier Yang wrote: The auto-generated WWN comply with the new addressing schema of WWN: quote the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a vendor-specified serial number. /quote We

Re: [libvirt] [PATCH v6] npiv: Auto-generate WWN if it's not specified

2012-02-07 Thread Osier Yang
On 2012年02月07日 21:15, Matthias Bolte wrote: 2012/2/7 Osier Yangjy...@redhat.com: The auto-generated WWN comply with the new addressing schema of WWN: quote the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a vendor-specified serial number. /quote We

Re: [libvirt] [Qemu-devel] [PATCH] qemu-ga: add guest-sync-delimited

2012-02-07 Thread Daniel P. Berrange
On Mon, Feb 06, 2012 at 06:07:35PM -0600, Michael Roth wrote: guest-sync leaves it as an exercise to the user as to how to reliably obtain the response to guest-sync if the client had previously read in a partial response (due qemu-ga previously being restarted mid-sentence due to reboot,

Re: [libvirt] [Qemu-devel] [PATCH v2] qemu-ga: add guest-sync-delimited

2012-02-07 Thread Michal Privoznik
On 07.02.2012 02:09, Michael Roth wrote: guest-sync leaves it as an exercise to the user as to how to reliably obtain the response to guest-sync if the client had previously read in a partial response (due qemu-ga previously being restarted mid-sentence due to reboot, forced restart, etc).

Re: [libvirt] [PATCH] qemu_agent: Issue guest-sync prior to every command

2012-02-07 Thread Daniel P. Berrange
On Wed, Feb 01, 2012 at 06:04:45PM +0100, Michal Privoznik wrote: If we issue guest command and GA is not running, the issuing thread will block endlessly. We can check for GA presence by issuing guest-sync with unique ID (timestamp). We don't want to issue real command as even if GA is not

[libvirt] [PATCH v2] virsh: Do not check the input XML at virsh layer for cmdDetachDevice

2012-02-07 Thread Osier Yang
Any device XML doesn't use the same order as libvirt generates, or uses decimal for attributes like slot of address will cause device detaching to fail, as virsh compares the XML simply earlier in strict manner before internal parsing. This is regression introduced by ea7182c. v1 is here:

Re: [libvirt] [PATCH v2] virsh: Do not check the input XML at virsh layer for cmdDetachDevice

2012-02-07 Thread Daniel P. Berrange
On Wed, Feb 08, 2012 at 12:12:53AM +0800, Osier Yang wrote: Any device XML doesn't use the same order as libvirt generates, or uses decimal for attributes like slot of address will cause device detaching to fail, as virsh compares the XML simply earlier in strict manner before internal

Re: [libvirt] [PATCH] qemu_agent: Issue guest-sync prior to every command

2012-02-07 Thread Michal Privoznik
On 07.02.2012 16:18, Daniel P. Berrange wrote: On Wed, Feb 01, 2012 at 06:04:45PM +0100, Michal Privoznik wrote: If we issue guest command and GA is not running, the issuing thread will block endlessly. We can check for GA presence by issuing guest-sync with unique ID (timestamp). We don't

[libvirt] [PATCH v3] virsh: Do not check the input XML at virsh layer for cmdDetachDevice

2012-02-07 Thread Osier Yang
Any device XML doesn't use the same order as libvirt generates, or uses decimal for attributes like slot of address will cause device detaching to fail, as virsh compares the XML simply earlier in strict manner before internal parsing. This is regression introduced by ea7182c. v1 is here:

Re: [libvirt] [PATCH] qemu_agent: Issue guest-sync prior to every command

2012-02-07 Thread Eric Blake
On 02/07/2012 08:49 AM, Michal Privoznik wrote: We could still timeout the 'fs-freeze' command after 30 seconds or so. Given that we issue the guest-resync command, we'll be able to automatically re-sync the JSON protocol by dropping the later arriving fs-freeze reply (if any). I don't

Re: [libvirt] [PATCH v3] virsh: Do not check the input XML at virsh layer for cmdDetachDevice

2012-02-07 Thread Eric Blake
On 02/07/2012 09:39 AM, Osier Yang wrote: Any device XML doesn't use the same order as libvirt generates, or uses decimal for attributes like slot of address will cause device detaching to fail, as virsh compares the XML simply earlier in strict manner before internal parsing. This is

Re: [libvirt] [Qemu-devel] [PATCH v2] qemu-ga: add guest-sync-delimited

2012-02-07 Thread Michael Roth
On Tue, Feb 07, 2012 at 04:17:26PM +0100, Michal Privoznik wrote: On 07.02.2012 02:09, Michael Roth wrote: guest-sync leaves it as an exercise to the user as to how to reliably obtain the response to guest-sync if the client had previously read in a partial response (due qemu-ga previously

[libvirt] [PATCH] Allow polkit auth for VNC and SSH users

2012-02-07 Thread Cole Robinson
If you are sitting in front of a physical machine and logged in as a regular user, you can connect to the system libvirtd instance by providing a root password to policykit. This is how most virt-manager users talk to libvirt. However, if you are launching virt-manager over ssh -X, or over VNC

Re: [libvirt] [PATCH] build: don't require avahi during install

2012-02-07 Thread Eric Blake
On 02/07/2012 03:23 AM, Laine Stump wrote: See: https://bugzilla.redhat.com/show_bug.cgi?id=785269 The specfile requires avahi during install if libvirt was built with avahi support, but there are many situations where it is undesirable to install avahi due to security concerns. If we still

Re: [libvirt] [PATCH] Allow polkit auth for VNC and SSH users

2012-02-07 Thread Eric Blake
On 02/07/2012 09:59 AM, Cole Robinson wrote: If you are sitting in front of a physical machine and logged in as a regular user, you can connect to the system libvirtd instance by providing a root password to policykit. This is how most virt-manager users talk to libvirt. However, if you are

[libvirt] [PATCHv3 2/2] qemu: increase the timeout before sending SIGKILL to qemu process

2012-02-07 Thread Laine Stump
The current default method of terminating the qemu process is to send a SIGTERM, wait for up to 1.6 seconds for it to cleanly shutdown, then send a SIGKILL and wait for up to 1.4 seconds more for the process to terminate. This is problematic because occasionally 1.6 seconds is not long enough for

[libvirt] [PATCHv3 0/2] qemu: mitigate 'qemu disk buffers not flushed' problem

2012-02-07 Thread Laine Stump
I previously pushed a patch that adds a new flag, VIR_DOMAIN_DESTROY_GRACEFUL, to virDomainDestroyFlags, so that a management application can destroy a domain without danger of sending SIGKILL to the qemu process too early (which occasionally results in a corrupted disk image due to qemu being

[libvirt] [PATCHv3 1.5/2] qemu: drop driver lock while trying to terminate qemu process

2012-02-07 Thread Laine Stump
This patch is based on an earlier patch by Eric Blake which was never committed: https://www.redhat.com/archives/libvir-list/2011-November/msg00243.html Aside from rebasing, this patch only drops the driver lock once (prior to the first time the function sleeps), then leaves it dropped until it

Re: [libvirt] [PATCH] Allow polkit auth for VNC and SSH users

2012-02-07 Thread Cole Robinson
On 02/07/2012 12:08 PM, Eric Blake wrote: On 02/07/2012 09:59 AM, Cole Robinson wrote: If you are sitting in front of a physical machine and logged in as a regular user, you can connect to the system libvirtd instance by providing a root password to policykit. This is how most virt-manager

Re: [libvirt] [PATCHv3 0/2] qemu: mitigate 'qemu disk buffers not flushed' problem

2012-02-07 Thread Eric Blake
On 02/07/2012 10:18 AM, Laine Stump wrote: These two patches do two things: 1) Drop the driver lock while sleeping during qemuProcessKill(), so that it can wait for a longer period without locking up all other libvirtd threads. This patch is a slight re-work of a patch Eric sent to the

Re: [libvirt] [PATCHv3 1.5/2] qemu: drop driver lock while trying to terminate qemu process

2012-02-07 Thread Eric Blake
On 02/07/2012 10:18 AM, Laine Stump wrote: In the meantime, we still should work on Dan's proposal to make locking within the driver object more fine grained. If only I ever had enough 'round tuits'. (NB: although I couldn't find any instance where qemuProcessKil() was s/Kil()/Kill()/

[libvirt] [PATCHv2] build: don't require avahi during install

2012-02-07 Thread Laine Stump
See: https://bugzilla.redhat.com/show_bug.cgi?id=785269 The specfile requires avahi during install if libvirt was built with avahi support, but there are many situations where it is undesirable to install avahi due to security concerns. This patch requires only the avahi-libs package, which is

Re: [libvirt] [PATCHv2] build: don't require avahi during install

2012-02-07 Thread Eric Blake
On 02/07/2012 12:05 PM, Laine Stump wrote: See: https://bugzilla.redhat.com/show_bug.cgi?id=785269 The specfile requires avahi during install if libvirt was built with avahi support, but there are many situations where it is undesirable to install avahi due to security concerns. This patch

Re: [libvirt] [PATCHv2] build: don't require avahi during install

2012-02-07 Thread Laine Stump
On 02/07/2012 02:15 PM, Eric Blake wrote: On 02/07/2012 12:05 PM, Laine Stump wrote: See: https://bugzilla.redhat.com/show_bug.cgi?id=785269 The specfile requires avahi during install if libvirt was built with avahi support, but there are many situations where it is undesirable to install

[libvirt] [PATCH] storage: Don't unsparsify images when cloning

2012-02-07 Thread Cole Robinson
Input to the volume cloning code is a source volume and an XML descriptor for the new volume. It is possible for the new volume to have a greater size than source volume, at which point libvirt will just stick 0s on the end of the new image (for raw format anyways). Unfortunately a logic error

[libvirt] [PATCH v3] qemu-ga: add guest-sync-delimited

2012-02-07 Thread Michael Roth
guest-sync leaves it as an exercise to the user as to how to reliably obtain the response to guest-sync if the client had previously read in a partial response (due qemu-ga previously being restarted mid-sentence due to reboot, forced restart, etc). qemu-ga handles this situation on its end by

Re: [libvirt] [PATCH] storage: Don't unsparsify images when cloning

2012-02-07 Thread Cole Robinson
On 02/07/2012 02:55 PM, Cole Robinson wrote: Input to the volume cloning code is a source volume and an XML descriptor for the new volume. It is possible for the new volume to have a greater size than source volume, at which point libvirt will just stick 0s on the end of the new image (for raw

[libvirt] [PATCH 2/2] security: Driver 'none' cannot create confined guests

2012-02-07 Thread Jiri Denemark
In case the caller specifies that confined guests are required but the security driver turns out to be 'none', we should return an error since this driver clearly cannot meet that requirement. As a result of this error, libvirtd fails to start when the host admin explicitly sets confined guests

[libvirt] [PATCH 1/2] seclabel: Do not output relabel attribute for type 'none'

2012-02-07 Thread Jiri Denemark
Security label type 'none' requires relabel to be set to 'no' so there's no reason to output this extra attribute. Moreover, since relabel is internally stored in a negative from (norelabel), the default value for relabel would be 'yes' in case there is no seclabel element in domain

[libvirt] [PATCH 0/2] Don't lose running domains configured with no seclabel

2012-02-07 Thread Jiri Denemark
It's not exactly obvious but these two patches fix quite an ugly bug affecting setups without any useful security driver (i.e., either explicitly or implicitly using driver 'none'). When a domain is defined without any seclabel element in its XML and started by libvirt, an incorrect seclabel

Re: [libvirt] [PATCH] storage: Don't unsparsify images when cloning

2012-02-07 Thread Eric Blake
On 02/07/2012 12:55 PM, Cole Robinson wrote: Input to the volume cloning code is a source volume and an XML descriptor for the new volume. It is possible for the new volume to have a greater size than source volume, at which point libvirt will just stick 0s on the end of the new image (for raw

Re: [libvirt] [PATCH 1/2] seclabel: Do not output relabel attribute for type 'none'

2012-02-07 Thread Eric Blake
On 02/07/2012 01:10 PM, Jiri Denemark wrote: Security label type 'none' requires relabel to be set to 'no' so there's no reason to output this extra attribute. Moreover, since relabel is internally stored in a negative from (norelabel), the default value for relabel would be 'yes' in case

Re: [libvirt] [PATCH 2/2] security: Driver 'none' cannot create confined guests

2012-02-07 Thread Eric Blake
On 02/07/2012 01:10 PM, Jiri Denemark wrote: In case the caller specifies that confined guests are required but the security driver turns out to be 'none', we should return an error since this driver clearly cannot meet that requirement. As a result of this error, libvirtd fails to start when

Re: [libvirt] [PATCH 2/2] security: Driver 'none' cannot create confined guests

2012-02-07 Thread Jiri Denemark
On Tue, Feb 07, 2012 at 13:39:17 -0700, Eric Blake wrote: On 02/07/2012 01:10 PM, Jiri Denemark wrote: In case the caller specifies that confined guests are required but the security driver turns out to be 'none', we should return an error since this driver clearly cannot meet that

Re: [libvirt] [PATCH] storage: Don't unsparsify images when cloning

2012-02-07 Thread Cole Robinson
On 02/07/2012 03:17 PM, Eric Blake wrote: On 02/07/2012 12:55 PM, Cole Robinson wrote: Input to the volume cloning code is a source volume and an XML descriptor for the new volume. It is possible for the new volume to have a greater size than source volume, at which point libvirt will just

Re: [libvirt] [PATCH 2/2] qemu: Always use iohelper for dumping domain core

2012-02-07 Thread Eric Blake
On 02/07/2012 05:09 AM, Jiri Denemark wrote: On Mon, Feb 06, 2012 at 15:43:59 -0700, Eric Blake wrote: On 02/06/2012 07:51 AM, Jiri Denemark wrote: Qemu uses non-blocking I/O which doesn't play nice with regular file descriptors. We need to pass a pipe to qemu instead, which can easily be

Re: [libvirt] [PATCH v2 0/2] qemu: Fix stalls during live core dump

2012-02-07 Thread Eric Blake
On 02/07/2012 05:17 AM, Jiri Denemark wrote: Qemu uses non-blocking I/O which doesn't play nice with regular file descriptors. We need to pass a pipe to qemu when dumping core to avoid stalls in live mode. Version 2: - generalize virFileDirectFd a bit more as suggested by Eric Jiri

Re: [libvirt] [PATCH 2/2] qemu: Always use iohelper for dumping domain core

2012-02-07 Thread Jiri Denemark
On Tue, Feb 07, 2012 at 14:35:44 -0700, Eric Blake wrote: There are two situations where we save to file - one during core dump (which, as you point out, can be live where the guest continues to run after the dump, and therefore must be interruptible), and one during 'virsh save' or 'virsh

Re: [libvirt] [PATCH] Bug fix: Allow sysinfo to display processor information

2012-02-07 Thread Eric Blake
On 02/07/2012 04:43 AM, Prerna Saxena wrote: From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Tue, 7 Feb 2012 17:05:37 +0530 Subject: [PATCH] On systems with dmidecode version 2.10 or older, dmidecode displays processor information, followed by BIOS, system and memory-DIMM details.

[libvirt] [PATCH] sysinfo: simplify function signature

2012-02-07 Thread Eric Blake
Now that no one is relying on the return value being a pointer to somewhere inside of the passed-in argument, we can simplify the callers to simply return success or failure. Also wrap some long lines and add some const-correctness. * src/util/sysinfo.c (virSysinfoParseBIOS,

Re: [libvirt] [PATCH] storage: Don't unsparsify images when cloning

2012-02-07 Thread Cole Robinson
On 02/07/2012 03:17 PM, Eric Blake wrote: On 02/07/2012 12:55 PM, Cole Robinson wrote: Input to the volume cloning code is a source volume and an XML descriptor for the new volume. It is possible for the new volume to have a greater size than source volume, at which point libvirt will just

Re: [libvirt] [PATCH] build: avoid gcc 4.7 warning about inlines

2012-02-07 Thread Eric Blake
On 02/06/2012 08:12 PM, Eric Blake wrote: gcc 4.7 complains: util/virhashcode.c:49:17: error: always_inline function might not be inlinable [-Werror=attributes] util/virhashcode.c:35:17: error: always_inline function might not be inlinable [-Werror=attributes] Normal 'inline' is a hint

Re: [libvirt] [PATCH] build: avoid gcc 4.7 warning about inlines

2012-02-07 Thread Eric Blake
On 02/07/2012 03:57 PM, Eric Blake wrote: On 02/06/2012 08:12 PM, Eric Blake wrote: gcc 4.7 complains: util/virhashcode.c:49:17: error: always_inline function might not be inlinable [-Werror=attributes] util/virhashcode.c:35:17: error: always_inline function might not be inlinable

Re: [libvirt] Start of freeze for libvirt-0.9.10 and availability of rc1

2012-02-07 Thread Eric Blake
On 02/06/2012 08:46 PM, Alex Jia wrote: 4. *** Warning: Linking the shared library libvirt_test.la against the non-libtool *** objects probes.o is not portable! CCLD libvirt-qemu.la Notes, I often meet the item 3 and 4 warnings when compiling, although I saw gcc book said they

Re: [libvirt] Start of freeze for libvirt-0.9.10 and availability of rc1

2012-02-07 Thread Eric Blake
On 02/06/2012 11:41 AM, Eric Blake wrote: 1. GENprobes.o /tmp/tmpOSBnp3.c:1: warning: return type defaults to 'int' /tmp/tmpOSBnp3.c:1: warning: '__dtrace' defined but not used CC libvirt_qemu_la-libvirt-qemu.lo Notes, maybe, we should silence the warning. I'd like to; but

Re: [libvirt] [PATCH] cgroup:fix bug to keep --device-weights value persistent

2012-02-07 Thread Eric Blake
On 02/02/2012 04:57 AM, Guannan Ren wrote: src/qemu/qemu_driver.c When run virsh blkiotune dom --device-weights /dev/sda,400 --config it couldn't be persistent after dom restart. The patch fix it. --- src/qemu/qemu_driver.c | 53

Re: [libvirt] [PATCH v3] virsh: Do not check the input XML at virsh layer for cmdDetachDevice

2012-02-07 Thread Osier Yang
On 2012年02月08日 00:16, Eric Blake wrote: On 02/07/2012 09:39 AM, Osier Yang wrote: Any device XML doesn't use the same order as libvirt generates, or uses decimal for attributes like slot of address will cause device detaching to fail, as virsh compares the XML simply earlier in strict manner

Re: [libvirt] Start of freeze for libvirt-0.9.10 and availability of rc1

2012-02-07 Thread Alex Jia
On 02/07/2012 11:46 AM, Alex Jia wrote: On 02/07/2012 02:41 AM, Eric Blake wrote: On 02/06/2012 03:11 AM, Alex Jia wrote: TEST: qemuxml2argvtest !!.. 40 ..!. 80

[libvirt] [PATCH] virsh: Plug memory leak on cmdDesc

2012-02-07 Thread ajia
From: Alex Jia a...@redhat.com Forgot to free the domain object, this will intruduce resource leaks including memory leak and FD leaks. * tools/virsh.c(cmdDesc): fix memory leak. * How to reproduce? % virsh desc domain No description for domain: domain error: Failed to disconnect from the

[libvirt] [PATCH] virsh: update virsh desc help docs

2012-02-07 Thread ajia
From: Alex Jia a...@redhat.com The function cmdDesc says 'current is ignored', so should remove related part from help docs. Signed-off-by: Alex Jia a...@redhat.com --- tools/virsh.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

Re: [libvirt] availability of rc2 for 0.9.10

2012-02-07 Thread Daniel Veillard
On Mon, Feb 06, 2012 at 03:21:21PM +0800, Daniel Veillard wrote: We are now entering the freeze for libvirt-0.9.10 Hopefully all the API changes needed for that version are already commited to git head. Okay I made an rc2 release with the python bindings fix (thanks !)

Re: [libvirt] [PATCH] virsh: Plug memory leak on cmdDesc

2012-02-07 Thread Osier Yang
On 2012年02月08日 14:00, a...@redhat.com wrote: From: Alex Jiaa...@redhat.com Forgot to free the domain object, this will intruduce resource leaks including memory leak and FD leaks. * tools/virsh.c(cmdDesc): fix memory leak. * How to reproduce? % virsh descdomain No description for

Re: [libvirt] [PATCH] virsh: Plug memory leak on cmdDesc

2012-02-07 Thread Alex Jia
On 02/08/2012 03:07 PM, Osier Yang wrote: Thanks and pushed now. Alex On 2012年02月08日 14:00, a...@redhat.com wrote: From: Alex Jiaa...@redhat.com Forgot to free the domain object, this will intruduce resource leaks including memory leak and FD leaks. * tools/virsh.c(cmdDesc): fix memory

Re: [libvirt] [PATCH] sysinfo: simplify function signature

2012-02-07 Thread Osier Yang
On 2012年02月08日 06:36, Eric Blake wrote: Now that no one is relying on the return value being a pointer to somewhere inside of the passed-in argument, we can simplify the callers to simply return success or failure. Also wrap some long lines and add some const-correctness. * src/util/sysinfo.c