[libvirt] [PATCHv3] python: Avoid memory leaks on libvirt_virNodeGetMemoryStats

2012-02-17 Thread ajia
From: Alex Jia a...@redhat.com Detected by valgrind. Leaks are introduced in commit 17c7795. * python/libvirt-override.c (libvirt_virNodeGetMemoryStats): fix memory leaks and improve codes return value. For details, please see the following link: RHBZ:

[libvirt] [PATCH] python: Avoid memory leaks on libvirt_virNodeGetCPUStats

2012-02-17 Thread ajia
From: Alex Jia a...@redhat.com Detected by valgrind. Leaks are introduced in commit 4955602. * python/libvirt-override.c (libvirt_virNodeGetCPUStats): fix memory leaks and improve codes return value. For details, please see the following link: RHBZ:

Re: [libvirt] [libvirt-glib 2/3] Correct docs for gir_domain_save*()

2012-02-17 Thread Christophe Fergeau
On Thu, Feb 16, 2012 at 05:49:47PM +0200, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org A saved domain is stopped/shutdown on a successful save operation, not suspended. libvirt documentation for virDomainManagedSave says suspend, this should be fixed there

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Christophe Fergeau
On Thu, Feb 16, 2012 at 11:01:45PM +, Daniel P. Berrange wrote: On Thu, Feb 16, 2012 at 10:16:11PM +0100, Christophe Fergeau wrote: On Thu, Feb 16, 2012 at 09:51:34AM +0100, Christophe Fergeau wrote: On Thu, Feb 16, 2012 at 02:26:02AM +0200, Zeeshan Ali (Khattak) wrote: + */

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Christophe Fergeau
On Thu, Feb 16, 2012 at 11:01:45PM +, Daniel P. Berrange wrote: On Thu, Feb 16, 2012 at 10:16:11PM +0100, Christophe Fergeau wrote: On Thu, Feb 16, 2012 at 09:51:34AM +0100, Christophe Fergeau wrote: On Thu, Feb 16, 2012 at 02:26:02AM +0200, Zeeshan Ali (Khattak) wrote: + */

Re: [libvirt] [libvirt-glib] Fix [gs]et_custom_xml-related leaks

2012-02-17 Thread Christophe Fergeau
Ping? On Mon, Feb 06, 2012 at 05:07:35PM +0100, Christophe Fergeau wrote: I forgot to run the testing code through valgrind before pushing the patches so a few small memory leaks crept in. --- libvirt-gconfig/libvirt-gconfig-domain.c |1 + libvirt-gconfig/tests/test-domain-create.c |

Re: [libvirt] [libvirt-glib 1/2] Add gvir_config_domain_disk_[gs]et_cache

2012-02-17 Thread Christophe Fergeau
Ping? On Wed, Feb 08, 2012 at 12:13:02PM +0100, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain-disk.c | 23 +++ libvirt-gconfig/libvirt-gconfig-domain-disk.h | 12 libvirt-gconfig/libvirt-gconfig.sym |3 +++

Re: [libvirt] [libvirt-glib 1/2] Add gvir_config_domain_disk_[gs]et_cache

2012-02-17 Thread Daniel P. Berrange
On Fri, Feb 17, 2012 at 02:22:31PM +0100, Christophe Fergeau wrote: Ping? On Wed, Feb 08, 2012 at 12:13:02PM +0100, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain-disk.c | 23 +++ libvirt-gconfig/libvirt-gconfig-domain-disk.h | 12

Re: [libvirt] [libvirt-glib] Fix [gs]et_custom_xml-related leaks

2012-02-17 Thread Daniel P. Berrange
On Fri, Feb 17, 2012 at 02:21:45PM +0100, Christophe Fergeau wrote: Ping? On Mon, Feb 06, 2012 at 05:07:35PM +0100, Christophe Fergeau wrote: I forgot to run the testing code through valgrind before pushing the patches so a few small memory leaks crept in. ---

Re: [libvirt] [libvirt-glib 2/2] Add more sanity checks to libvirt-gconfig test

2012-02-17 Thread Christophe Fergeau
Not sure if you intentionally left 2/2 out, so ping for this one too :) Christophe On Wed, Feb 08, 2012 at 12:13:03PM +0100, Christophe Fergeau wrote: --- libvirt-gconfig/tests/test-domain-create.c | 34 +-- 1 files changed, 21 insertions(+), 13 deletions(-) diff

Re: [libvirt] [libvirt-glib 2/2] Add more sanity checks to libvirt-gconfig test

2012-02-17 Thread Daniel P. Berrange
On Fri, Feb 17, 2012 at 02:55:58PM +0100, Christophe Fergeau wrote: Not sure if you intentionally left 2/2 out, so ping for this one too :) Christophe On Wed, Feb 08, 2012 at 12:13:03PM +0100, Christophe Fergeau wrote: --- libvirt-gconfig/tests/test-domain-create.c | 34

[libvirt] A script for setting up x509 certs for libvirt/spice/vnc

2012-02-17 Thread Daniel P. Berrange
After 4 years of swearing at the pain of setting up x509 certs, I finally decided to try to write a script to automate it. I'm attaching a very raw proof of concept called virt-pki-admin.pl. It does the following * Create CA key+cert * Create server + client keys+cert sign with the CA *

Re: [libvirt] [PATCH] Don't add SPICE TLS channels when TLS is disabled

2012-02-17 Thread David Jaša
Copying my comments (https://bugzilla.redhat.com/show_bug.cgi?id=790436#c8) here as requested: === (In reply to comment #6) mode='insecure' - don't bother with security By this, you mean plaintext-only setting, or

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Zeeshan Ali (Khattak)
On Fri, Feb 17, 2012 at 1:20 PM, Christophe Fergeau cferg...@redhat.com wrote: On Thu, Feb 16, 2012 at 11:01:45PM +, Daniel P. Berrange wrote: On Thu, Feb 16, 2012 at 10:16:11PM +0100, Christophe Fergeau wrote: On Thu, Feb 16, 2012 at 09:51:34AM +0100, Christophe Fergeau wrote: On Thu,

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Christophe Fergeau
On Fri, Feb 17, 2012 at 04:56:31PM +0200, Zeeshan Ali (Khattak) wrote: Zeeshan, it's up to the patch submitter to keep track of the comments raised during review, So sorry, I somehow missed that part of your mail. It was an honest mistake. No problem, this happens :) Christophe

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Zeeshan Ali (Khattak)
On Fri, Feb 17, 2012 at 1:01 AM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Feb 16, 2012 at 10:16:11PM +0100, Christophe Fergeau wrote: On Thu, Feb 16, 2012 at 09:51:34AM +0100, Christophe Fergeau wrote: On Thu, Feb 16, 2012 at 02:26:02AM +0200, Zeeshan Ali (Khattak) wrote: + */

Re: [libvirt] A script for setting up x509 certs for libvirt/spice/vnc

2012-02-17 Thread Alex Jia
Daniel, Great! I want it. Thanks, Alex - Original Message - From: Daniel P. Berrange berra...@redhat.com To: libvir-list@redhat.com Sent: Friday, February 17, 2012 10:22:25 PM Subject: [libvirt] A script for setting up x509 certs for libvirt/spice/vnc After 4 years of swearing at the

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Christophe Fergeau
On Fri, Feb 17, 2012 at 05:08:12PM +0200, Zeeshan Ali (Khattak) wrote: (We already discussed at length why this is needed and we are already doing it for other boolean getters so lets not have the discussion about this need, again). Actually this was discussed for libosinfo, not libvirt-glib,

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Zeeshan Ali (Khattak)
On Fri, Feb 17, 2012 at 5:18 PM, Christophe Fergeau cferg...@redhat.com wrote: On Fri, Feb 17, 2012 at 05:08:12PM +0200, Zeeshan Ali (Khattak) wrote: (We already discussed at length why this is needed and we are already doing it for other boolean getters so lets not have the discussion about

Re: [libvirt] fix ix86 macros

2012-02-17 Thread Eric Blake
On 02/17/2012 08:27 AM, Peter Robinson wrote: commit 79ae809020d041ec2d10982a60a9eaf4782ca843 Author: Peter Robinson pbrobin...@gmail.com Date: Fri Feb 17 15:27:03 2012 + fix ix86 macros libvirt.spec |8 1 files changed, 4 insertions(+), 4 deletions(-) --- diff

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Christophe Fergeau
On Fri, Feb 17, 2012 at 05:25:30PM +0200, Zeeshan Ali (Khattak) wrote: On Fri, Feb 17, 2012 at 5:18 PM, Christophe Fergeau cferg...@redhat.com wrote: On Fri, Feb 17, 2012 at 05:08:12PM +0200, Zeeshan Ali (Khattak) wrote: (We already discussed at length why this is needed and we are

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Zeeshan Ali (Khattak)
On Fri, Feb 17, 2012 at 5:38 PM, Christophe Fergeau cferg...@redhat.com wrote: On Fri, Feb 17, 2012 at 05:25:30PM +0200, Zeeshan Ali (Khattak) wrote: On Fri, Feb 17, 2012 at 5:18 PM, Christophe Fergeau cferg...@redhat.com wrote: On Fri, Feb 17, 2012 at 05:08:12PM +0200, Zeeshan Ali (Khattak)

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Christophe Fergeau
On Fri, Feb 17, 2012 at 05:56:19PM +0200, Zeeshan Ali (Khattak) wrote: On Fri, Feb 17, 2012 at 5:38 PM, Christophe Fergeau cferg...@redhat.com wrote: This naming convention for getters is probably only useful for vala, I think bindings for dynamic languages will introspect object properties

[libvirt] [PATCH 0/10]virtio-scsi: New device address logic for SCSI devices

2012-02-17 Thread Osier Yang
This patch series completed the support for the first 3 parts of Paolo's proposal: http://permalink.gmane.org/gmane.comp.emulators.libvirt/50428 The 3 parts are: * SCSI controller models * Stable addressing for SCSI devices * LUN passthrough: block devices [PATCH 1/10] and [PATCH 2/10]

[libvirt] [PATCH 06/10] qemu: New cap flag to indicate if channel is supported by scsi-disk

2012-02-17 Thread Osier Yang
--- src/qemu/qemu_capabilities.c |4 src/qemu/qemu_capabilities.h |1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6d35676..64a4546 100644 --- a/src/qemu/qemu_capabilities.c +++

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Zeeshan Ali (Khattak)
On Fri, Feb 17, 2012 at 6:19 PM, Christophe Fergeau cferg...@redhat.com wrote: On Fri, Feb 17, 2012 at 05:56:19PM +0200, Zeeshan Ali (Khattak) wrote: On Fri, Feb 17, 2012 at 5:38 PM, Christophe Fergeau cferg...@redhat.com wrote: This naming convention for getters is probably only useful for

[libvirt] [PATCH 08/10] tests: Update qemu tests to be consistent with new drive address logic

2012-02-17 Thread Osier Yang
--- .../qemuxml2argv-disk-scsi-device.xml |2 +- .../qemuxml2argv-pseries-vio-user-assigned.args| 10 +- .../qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 10 +- .../qemuxml2xmlout-disk-scsi-device-auto.xml |2 +- 4 files changed, 20

[libvirt] [PATCH 04/10] conf: Add helper function to look up disk controller model

2012-02-17 Thread Osier Yang
--- src/conf/domain_conf.c | 17 + src/conf/domain_conf.h |3 +++ src/libvirt_private.syms |1 + 3 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ccdb80d..c36ac18 100644 --- a/src/conf/domain_conf.c

[libvirt] [PATCH 02/10] qemu: Add virtio-scsi controller model

2012-02-17 Thread Osier Yang
From: Paolo Bonzini pbonz...@redhat.com Adding a new model for virtio-scsi roughly follows the same scheme as the previous patch. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- --- docs/formatdomain.html.in |2 +- docs/schemas/domaincommon.rng |1 + src/conf/domain_conf.c

[libvirt] [PATCH 05/10] conf: Introduce new attribute for device address format

2012-02-17 Thread Osier Yang
* src/conf/domain_conf.h: Add new member target to struct _virDomainDeviceDriveAddress. * src/conf/domain_conf.c: - virDomainDeviceDriveAddressParseXML: Parse target. - virDomainDeviceInfoFormat: new parameter controllerType (disk controller type) and bus (disk bus type) to

[libvirt] [PATCH 09/10] tests: Update vmx tests to be consistent with new drive address logic

2012-02-17 Thread Osier Yang
--- tests/vmx2xmldata/vmx2xml-cdrom-scsi-device.xml |2 +- tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml|2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml |2 +- tests/vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml |2 +- tests/vmx2xmldata/vmx2xml-harddisk-scsi-file.xml |

Re: [libvirt] [PATCH 05/10] conf: Introduce new attribute for device address format

2012-02-17 Thread Paolo Bonzini
On 02/17/2012 06:18 PM, Osier Yang wrote: +if ((bus == VIR_DOMAIN_DISK_BUS_SCSI) +(controllerModel != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC)) { +virBufferAsprintf(buf, controller='%d' bus='%d' target='%d' unit='%d', +

[libvirt] [PATCH 01/10] qemu: Add ibmvscsi controller model

2012-02-17 Thread Osier Yang
From: Paolo Bonzini pbonz...@redhat.com The codes to set default controller model is removed, it should be done when parsing in src/conf/domain_conf.c instead, setting default value for the command line and ignoring the domain def is not a good idea, an inactive domain can't known what the

[libvirt] [PATCH 07/10] qemu: Build command line for the new address format

2012-02-17 Thread Osier Yang
For any disk controller model which is not lsilogic, the command line will be like: -drive file=/dev/sda,if=none,id=drive-scsi0-0-3-0,format=raw \ -device scsi-disk,bus=scsi0.0,channel=0,scsi-id=3,lun=0,i\ drive=drive-scsi0-0-3-0,id=scsi0-0-3-0 The relationship between the libvirt address attrs

[libvirt] [PATCH 10/10] tests: Add tests for virtio-scsi and ibmvscsi controllers

2012-02-17 Thread Osier Yang
--- .../qemuxml2argv-disk-scsi-virtio-scsi.args|9 + .../qemuxml2argv-disk-scsi-virtio-scsi.xml | 32 .../qemuxml2argv-disk-scsi-vscsi.args |8 + .../qemuxml2argv-disk-scsi-vscsi.xml | 32

Re: [libvirt] [PATCH 03/10] conf: Set default scsi controller model when parsing

2012-02-17 Thread Paolo Bonzini
On 02/17/2012 06:18 PM, Osier Yang wrote: And adding controller implicitly, ESX detects the default model automatically itself, and partly depends on the guest os. So we only try to set the default model for QEMU/KVM driver. --- src/conf/domain_conf.c | 32 ++--

Re: [libvirt] [PATCH 07/10] qemu: Build command line for the new address format

2012-02-17 Thread Paolo Bonzini
On 02/17/2012 06:18 PM, Osier Yang wrote: +controller_model = +virDomainDiskFindControllerModel(def, disk, + VIR_DOMAIN_CONTROLLER_TYPE_SCSI); +if (controller_model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC) { +

[libvirt] [PATCH 03/10] conf: Set default scsi controller model when parsing

2012-02-17 Thread Osier Yang
And adding controller implicitly, ESX detects the default model automatically itself, and partly depends on the guest os. So we only try to set the default model for QEMU/KVM driver. --- src/conf/domain_conf.c | 32 ++-- 1 files changed, 30 insertions(+), 2

Re: [libvirt] [PATCH 07/10] qemu: Build command line for the new address format

2012-02-17 Thread Osier Yang
On 2012年02月18日 00:44, Paolo Bonzini wrote: On 02/17/2012 06:18 PM, Osier Yang wrote: +controller_model = +virDomainDiskFindControllerModel(def, disk, + VIR_DOMAIN_CONTROLLER_TYPE_SCSI); +if (controller_model ==

Re: [libvirt] [libvirt-glib] Add gvir_domain_get_saved()

2012-02-17 Thread Christophe Fergeau
On Fri, Feb 17, 2012 at 06:31:31PM +0200, Zeeshan Ali (Khattak) wrote: This is such a small annoyance that noone will complain only about it, Small? And yet we keep discussing this all over again and again in detail? You skipped the rationale as why I think it's small but can be important.

Re: [libvirt] [PATCH 05/10] conf: Introduce new attribute for device address format

2012-02-17 Thread Osier Yang
On 2012年02月18日 00:41, Paolo Bonzini wrote: On 02/17/2012 06:18 PM, Osier Yang wrote: +if ((bus == VIR_DOMAIN_DISK_BUS_SCSI) +(controllerModel != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC)) { +virBufferAsprintf(buf, controller='%d' bus='%d' target='%d'

Re: [libvirt] [PATCH 03/10] conf: Set default scsi controller model when parsing

2012-02-17 Thread Osier Yang
On 2012年02月18日 00:41, Paolo Bonzini wrote: On 02/17/2012 06:18 PM, Osier Yang wrote: And adding controller implicitly, ESX detects the default model automatically itself, and partly depends on the guest os. So we only try to set the default model for QEMU/KVM driver. ---

Re: [libvirt] [PATCH 03/10] conf: Set default scsi controller model when parsing

2012-02-17 Thread Paolo Bonzini
On 02/17/2012 05:58 PM, Osier Yang wrote: I don't think this is correct. In fact, I think I misunderstood you while we discussed this before by email. So this patch is not necessary. If you mean it's correct to check model in [PATCH 5/10] when formating the XML. This patch is neccessary,

Re: [libvirt] [PATCH 05/10] conf: Introduce new attribute for device address format

2012-02-17 Thread Paolo Bonzini
On 02/17/2012 05:54 PM, Osier Yang wrote: Yeah, I definitely misunderstood. Here it is correct to print the target for all models. Do you mean it's correct check the model here? I think the lsilogic model won't want to see the target. It's complete useless. It's true that it's useless.

Re: [libvirt] [PATCH 05/10] conf: Introduce new attribute for device address format

2012-02-17 Thread Osier Yang
On 2012年02月18日 01:03, Paolo Bonzini wrote: On 02/17/2012 05:54 PM, Osier Yang wrote: Yeah, I definitely misunderstood. Here it is correct to print the target for all models. Do you mean it's correct check the model here? I think the lsilogic model won't want to see the target. It's complete

Re: [libvirt] fix ix86 macros

2012-02-17 Thread Peter Robinson
On Fri, Feb 17, 2012 at 3:33 PM, Eric Blake ebl...@redhat.com wrote: On 02/17/2012 08:27 AM, Peter Robinson wrote: commit 79ae809020d041ec2d10982a60a9eaf4782ca843 Author: Peter Robinson pbrobin...@gmail.com Date:   Fri Feb 17 15:27:03 2012 +     fix ix86 macros  libvirt.spec |    8

Re: [libvirt] [PATCH] Use the same MAC address that is defined in domain XML for attached-mac field.

2012-02-17 Thread Laine Stump
On 02/16/2012 06:49 PM, Ansis Atteka wrote: Currently libvirt sets the attached-mac to altered MAC address that has first byte set to FE. This patch will change that behavior by using the original (unaltered) MAC address from the domain XML configuration file. Maybe I didn't read thoroughly

Re: [libvirt] [PATCH] Use the same MAC address that is defined in domain XML for attached-mac field.

2012-02-17 Thread Ansis Atteka
On Fri, Feb 17, 2012 at 10:55 AM, Laine Stump la...@laine.org wrote: On 02/16/2012 06:49 PM, Ansis Atteka wrote: Currently libvirt sets the attached-mac to altered MAC address that has first byte set to FE. This patch will change that behavior by using the original (unaltered) MAC address