[libvirt] [PATCH v2] test: Return Libvirt logo as domain screenshot

2013-03-31 Thread Michal Privoznik
This is just a bare Easter Egg. Whenever user run virDomainScreenshot over a domain in test driver, he'll get the Libvirt PNG logo in return. --- docs/Makefile.am | 1 + src/test/test_driver.c | 24 2 files changed, 25 insertions(+) diff --git a/docs/Makefile.am

Re: [libvirt] [PATCH] test: Return Libvirt logo as domain screenshot

2013-03-31 Thread Daniel Veillard
On Fri, Mar 29, 2013 at 10:52:10PM +0100, Michal Privoznik wrote: This is just a bare Easter Egg. Whenever user run virDomainScreenshot over a domain in test driver, he'll get the Libvirt PNG logo in return. Yeah, smart idea :-), agreed with Eric it should got after the release and somehow I

[libvirt] [PATCHv3 0/6] Fix memory corruption/crash in the connection close callback

2013-03-31 Thread Peter Krempa
This series fixes the crash resulting from a race condition in the connection close callback. To observe the crash apply the first patch only. To verify that the patchset fixes the crash please apply all but 2/6 and verify using virsh. 2/6 fixes the crash in a redundant way in case the close

[libvirt] [PATCHv3 4/6] virsh: Move cmdConnect from virsh-host.c to virsh.c

2013-03-31 Thread Peter Krempa
The function is used to establish connection so it should be in the main virsh file. This movement also enables further improvements done in next patches. --- tools/virsh-host.c | 67 tools/virsh.c | 69

[libvirt] [PATCHv3 3/6] virsh: Unregister the connection close notifier upon termination

2013-03-31 Thread Peter Krempa
From: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com Before closing the connection we unregister the close callback to prevent a reference leak. Further, the messages on virConnectClose != 0 are a bit more specific now. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com ---

[libvirt] [PATCHv3 2/6] libvirt: Increase connection reference count for callbacks

2013-03-31 Thread Peter Krempa
From: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com By adjusting the reference count of the connection object we prevent races between callback function and virConnectClose. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/libvirt.c | 5 + 1 file changed, 5

[libvirt] [PATCHv3 1/6] DO NOT APPLY UPSTREAM: Close callback race corruption crash reproducer.

2013-03-31 Thread Peter Krempa
--- src/remote/remote_driver.c | 5 + src/rpc/virnetclient.c | 9 - 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 885120e..711143a 100644 --- a/src/remote/remote_driver.c +++

[libvirt] [PATCHv3 6/6] rpc: Fix connection close callback race condition and memory corruption/crash

2013-03-31 Thread Peter Krempa
The last Viktor's effort to fix the race and memory corruption unfortunately wasn't complete in the case the close callback was not registered in an connection. At that time, the trail of event's that I'll describe later could still happend and corrupt the memory or cause a crash of the client

[libvirt] [PATCHv3 5/6] virsh: Register and unregister the close callback also in cmdConnect

2013-03-31 Thread Peter Krempa
This patch improves the error message after disconnecting from the hypervisor and adds the close callback operations required not to leak the callback reference. --- tools/virsh.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCHv2 0/4] Fix race and crash in connection close callback.

2013-03-31 Thread Peter Krempa
On 03/27/13 15:05, Peter Krempa wrote: Originaly reported by Viktor, this changes a few bits I didn't like on the original series. Peter Krempa (2): virsh: Move cmdConnect from virsh-host.c to virsh.c virsh: Register and unregister the close callback also in cmdConnect Viktor Mihajlovski

[libvirt] [PATCHv2] conf: Enforce ranges on cputune variables

2013-03-31 Thread Peter Krempa
The limits are documented at http://libvirt.org/formatdomain.html#elementsCPUTuning . Enforce them when going through XML parsing in addition to being enforced by the API. --- Notes: Version 2: - split out from the conf callback series and applied separately to the parser code

Re: [libvirt] [PATCHv4 9/9] virCaps: get rid of macPrefix field

2013-03-31 Thread Peter Krempa
On 03/29/13 18:39, Eric Blake wrote: On 03/15/2013 09:26 AM, Peter Krempa wrote: Use the virDomainXMLConf structure to hold this data and tweak the code to avoid semantic change. Without configuration the KVM mac prefix is used by default. I chose it as it's in the privately administered

[libvirt] [PATCHv2 1/4] virsh: Fix semantics of --config for update-device command

2013-03-31 Thread Peter Krempa
The man page states that with --config the next boot is affected. This can be understood as if _only_ the next boot was affected. This isn't true if the machine is running. This patch adds the full --live, --config, --current infrastructure and tweaks stuff to correctly support the obsolete

[libvirt] [PATCHv2 0/4] Add domain modification impact flags to hot-management commands

2013-03-31 Thread Peter Krempa
A respin of the series that changes some virsh commands to handle flags more sanely. This version fixes comments by Martin, Laine and Eric. This series omits already acked patches. Peter Krempa (4): virsh: Fix semantics of --config for update-device command virsh-domain: Add --live,

[libvirt] [PATCHv2 4/4] virsh-domain: Add --live, --config, --current logic to cmdDetachDisk

2013-03-31 Thread Peter Krempa
Use the established approach to improve this function too. --- Notes: Version 2: - same notes as previous patch tools/virsh-domain.c | 54 +++- tools/virsh.pod | 19 ++ 2 files changed, 52 insertions(+), 21

[libvirt] [PATCHv2 2/4] virsh-domain: Add --live, --config, --current logic to cmdDetachInterface

2013-03-31 Thread Peter Krempa
Use the established approach to improve this function too. --- Notes: Version 2: - state that legacy API has no well defined semantics - add note about possible semantics change - remove mutual exclusivity of --persistent --live - remove --force parameter added due to too much

[libvirt] [PATCHv2 3/4] virsh-domain: Add --live, --config, --current logic to cmdDetachDevice

2013-03-31 Thread Peter Krempa
Use the established approach to improve this function too. --- Notes: Version 2: - same changes as previous patch tools/virsh-domain.c | 41 - tools/virsh.pod | 19 +++ 2 files changed, 47 insertions(+), 13 deletions(-) diff

[libvirt] [PATCHv5 00/11] Introduce driver specific XML parsing callbacks

2013-03-31 Thread Peter Krempa
This series now splits out everything unrelated from the virCaps object. See notes in individual patches for change summary. This series now contains 2 renaming patches that were suggested by Eric and Laine. Peter Krempa (11): conf: Add post XML parse callbacks and prepare for cleaning of

[libvirt] [PATCHv5 05/11] virCaps: get rid of defaultDiskDriverName

2013-03-31 Thread Peter Krempa
This patch removes the defaultDiskDriverName from the virCaps structure. This particular default value is used only in the qemu driver so this patch uses the recently added callback to fill the driver name if it's needed instead of propagating it through virCaps. --- Notes: Version 5: -

[libvirt] [PATCHv5 04/11] virCaps: get rid of defaultInitPath value in the virCaps struct

2013-03-31 Thread Peter Krempa
This gets rid of the parameter in favor of using the new callback infrastructure to do the same stuff. This patch implements the domain adjustment callback in the openVZ driver and moves the check from the parser to a new validation method in the callback infrastructure. --- Notes: Version

[libvirt] [PATCHv5 06/11] virCaps: get rid of emulatorRequired

2013-03-31 Thread Peter Krempa
This patch removes the emulatorRequired field and associated infrastructure from the virCaps object. Instead the driver specific callbacks are used as this field isn't enforced by all drivers. This patch implements the appropriate callbacks in the qemu and lxc driver and moves to check to that

[libvirt] [PATCHv5 07/11] virCaps: get rid of defaultDiskDriverType

2013-03-31 Thread Peter Krempa
Use the qemu specific callback to fill this data in the qemu driver as it's the only place where it was used and fix tests as the qemu test capability object didn't configure the defaults for the tests. --- Notes: Version 5: - squashed in follow up fixes that were posted in the list -

[libvirt] [PATCHv5 10/11] virCaps: get rid of defaultConsoleTargetType callback

2013-03-31 Thread Peter Krempa
This patch refactors various places to allow removing of the defaultConsoleTargetType callback from the virCaps structure. A new console character device target type is introduced - VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was specified in the XML. This type is at the end

[libvirt] [PATCHv5 08/11] virCaps: get rid of hasWideScsiBus

2013-03-31 Thread Peter Krempa
Use the virDomainXMLConf structure to hold this data. --- Notes: Version 5: - ACKed by Eric in v4 Version 4: - new in series src/conf/capabilities.h| 1 - src/conf/domain_conf.c | 13 +++-- src/conf/domain_conf.h | 8 +++- src/esx/esx_driver.c

[libvirt] [PATCHv5 09/11] virCaps: get rid of macPrefix field

2013-03-31 Thread Peter Krempa
Use the virDomainXMLConf structure to hold this data and tweak the code to avoid semantic change. Without configuration the KVM mac prefix is used by default. I chose it as it's in the privately administered segment so it should be usable for any purposes. --- Notes: Version 5: - fixed

[libvirt] [PATCHv5 01/11] conf: Add post XML parse callbacks and prepare for cleaning of virCaps

2013-03-31 Thread Peter Krempa
This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesing to fill and validate driver specific details of the

[libvirt] [PATCHv5 03/11] qemu: Record the default NIC model in the domain XML

2013-03-31 Thread Peter Krempa
This patch implements the devices post parse cllback and uses it to fill the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the rtl8139. Record this in the XML using the new callback to avoid user confusion. --- Notes:

Re: [libvirt] [Libvirt-announce] Candidate release 2 of libvirt-1.0.4 available

2013-03-31 Thread Justin Clift
On 28/03/2013, at 3:08 AM, Daniel Veillard wrote: I tagged it in git and pushed the tarball to the usual area: ftp://libvirt.org/libvirt/ the rpms are being pushed ATM. Based on my own limited testing this still looks like good to go, but more feedback (portability ?) would be nice. If

Re: [libvirt] [Libvirt-announce] Candidate release 2 of libvirt-1.0.4 available

2013-03-31 Thread Daniel Veillard
On Mon, Apr 01, 2013 at 03:30:47AM +0100, Justin Clift wrote: On 28/03/2013, at 3:08 AM, Daniel Veillard wrote: I tagged it in git and pushed the tarball to the usual area: ftp://libvirt.org/libvirt/ the rpms are being pushed ATM. Based on my own limited testing this still looks

[libvirt] Release of libvirt-1.0.4

2013-03-31 Thread Daniel Veillard
As planned I tagged the release in git and pushed the new version to the usual place as tarball and rpms: ftp://libvirt.org/libvirt/ I hesited a bit in pushing the patchset from Peter fixing the memory corruption bug, but since it seems hard to reproduce and the amount of change was a bit

Re: [libvirt] [Libvirt-announce] Release of libvirt-1.0.4

2013-03-31 Thread Justin Clift
On 01/04/2013, at 5:10 AM, Daniel Veillard wrote: As planned I tagged the release in git and pushed the new version to the usual place as tarball and rpms: ftp://libvirt.org/libvirt/ I hesited a bit in pushing the patchset from Peter fixing the memory corruption bug, but since it seems

Re: [libvirt] [Libvirt-announce] Release of libvirt-1.0.4

2013-03-31 Thread Daniel Veillard
On Mon, Apr 01, 2013 at 05:18:16AM +0100, Justin Clift wrote: On 01/04/2013, at 5:10 AM, Daniel Veillard wrote: As planned I tagged the release in git and pushed the new version to the usual place as tarball and rpms: ftp://libvirt.org/libvirt/ I hesited a bit in pushing the