Re: [libvirt] [PATCH] build: use latest gnulib, for ignore-value fix

2010-10-15 Thread Eric Blake
On 10/15/2010 05:07 PM, Stefan Berger wrote: Let's push this first, although that means you may want a v4 to move the include "ignore-value.h" line around. -Subproject commit b6d1430494cdd252cd52eca6abf88b1a00f6c983 +Subproject commit cac3889c1830d38e5b55ae69fc3d458498a0b33e ACK Now pushed.

Re: [libvirt] [PATCH] build: use latest gnulib, for ignore-value fix

2010-10-15 Thread Stefan Berger
On 10/15/2010 06:14 PM, Eric Blake wrote: * .gnulib: Update to latest. --- Let's push this first, although that means you may want a v4 to move the include "ignore-value.h" line around. * .gnulib b6d1430...cac3889 (8): > ignore-value: make header idempotent > GNUmakefile: handle "stabl

[libvirt] [PATCH] build: use latest gnulib, for ignore-value fix

2010-10-15 Thread Eric Blake
* .gnulib: Update to latest. --- Let's push this first, although that means you may want a v4 to move the include "ignore-value.h" line around. * .gnulib b6d1430...cac3889 (8): > ignore-value: make header idempotent > GNUmakefile: handle "stable" target, not "major" > isnan: Add support for

[libvirt] [PATCH v3] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Stefan Berger
V3: - many small nits addressed V2: - following Eric's suggestions and picking up his code suggestions Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here. Ther

Re: [libvirt] [PATCH v2] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Eric Blake
[adding bug-gnulib] On 10/15/2010 03:58 PM, Stefan Berger wrote: +# include + +# include "internal.h" You need #include "ignore-value.h"... The problem with this include file is that it doesn't protect itself from multiple inclusion with a #ifndef, #define sequence, so I ended up getting r

Re: [libvirt] [PATCH v2] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Stefan Berger
libvir-list-boun...@redhat.com wrote on 10/15/2010 05:35:33 PM: > > > On 10/15/2010 01:10 PM, Stefan Berger wrote: > > V2: > > - following Eric's suggestions and picking up his code suggestions > > > > Since bugs due to double-closed file descriptors are difficult to track > > down in a multi-th

Re: [libvirt] [PATCH 1/3] virsh: add support for accepting arbitrary argv

2010-10-15 Thread Eric Blake
On 10/15/2010 03:25 PM, Matthias Bolte wrote: typedef enum { -VSH_OT_NONE = 0,/* none */ -VSH_OT_BOOL,/* boolean option */ -VSH_OT_STRING, /* string option */ -VSH_OT_INT, /* int option */ -VSH_OT_DATA

Re: [libvirt] [PATCH v2] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Eric Blake
On 10/15/2010 01:10 PM, Stefan Berger wrote: V2: - following Eric's suggestions and picking up his code suggestions Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here. Ther

[libvirt] alignment of data fields when compiling with mingwin

2010-10-15 Thread arnaud.champion
?Hi, I'm currently working on libvirt csharp bindings, and I have some trouble with virConnectOpenAuth marshaling. I need to know what is the alignment of data fields in structure when compiling with mingwin. Anyone know that ? cheers, Arnaud Champion-- libvir-list mailing list libvir-list@red

Re: [libvirt] [PATCH 3/3] virsh: add tests for recent cli improvements

2010-10-15 Thread Matthias Bolte
2010/10/15 Eric Blake : > * tests/virshtest.c (mymain): Add tests of command parsing and > echo command. > --- > > No patch series is complete without decent tests.  This should > cover all of the recent virsh command-line parsing improvements > (various quoting styles, empty argument support, -- s

Re: [libvirt] [PATCH 1/3] virsh: add support for accepting arbitrary argv

2010-10-15 Thread Matthias Bolte
2010/10/15 Eric Blake : > * tools/virsh.c (vshCmdOptType): Add VSH_OT_ARGV.  Delete > unused VSH_OT_NONE. > (vshCmddefGetData): Special case new opt flag. > (vshCmddefHelp): Display help for argv. > (vshCommandOptArgv): New function. > --- > > Here's the completed series. > >  tools/virsh.c |   75

Re: [libvirt] [PATCH 2/3] virsh: new echo command

2010-10-15 Thread Matthias Bolte
2010/10/15 Eric Blake : > * tools/virsh.c (cmdEcho): New command. > (commands): Add it. > * tools/virsh.pod (echo): Document it. > --- >  tools/virsh.c   |   75 > +++ >  tools/virsh.pod |    7 + >  2 files changed, 82 insertions(+), 0 deletio

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Eric Blake
On 10/15/2010 12:26 PM, Stefan Berger wrote: No change in src/libvirt_private.syms? Was waiting for the linker to complain and it did not. My understanding is that the *.syms files are important mainly if you build with --with-driver-modules, but that defaults to no. Without it, you get

Re: [libvirt] [PATCH] docs: document how to disable memballoon

2010-10-15 Thread Eric Blake
On 10/15/2010 01:55 PM, Laine Stump wrote: +++ b/docs/formatdomain.html.in @@ -1646,6 +1646,9 @@ qemu-kvm -net nic,model=? /dev/null need to explicitly add this element in the guest XML unless a specific PCI slot needs to be assigned. Since 0.8.3, Xen, QEMU and KVM only + Additionally,since 0.8.4

Re: [libvirt] [PATCH] docs: document how to disable memballoon

2010-10-15 Thread Laine Stump
On 10/15/2010 03:37 PM, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=623903 documents a qemu bug that causes libvirt to hang if virt-manager happens to be querying balloon info when a guest is paused. Until the qemu bug is fixed, people need to know how to avoid the issue. * d

[libvirt] [PATCH] docs: document how to disable memballoon

2010-10-15 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=623903 documents a qemu bug that causes libvirt to hang if virt-manager happens to be querying balloon info when a guest is paused. Until the qemu bug is fixed, people need to know how to avoid the issue. * docs/formatdomain.html.in (Memory balloon devi

Re: [libvirt] [PATCH] esx: Fix check in esxDomainGetInfo's perf metric handling

2010-10-15 Thread Eric Blake
On 10/15/2010 12:47 PM, Matthias Bolte wrote: --- src/esx/esx_driver.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 8bc3be2..1b4ee29 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -2329,15 +23

[libvirt] [PATCH v2] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Stefan Berger
V2: - following Eric's suggestions and picking up his code suggestions Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here. There are lots of places where close() is

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Stefan Berger
On 10/15/2010 01:45 PM, Eric Blake wrote: On 10/15/2010 11:32 AM, Eric Blake wrote: +int virClose(int *fdptr); Needs an ATTRIBUTE_NONNULL(1). I'm also debating whether it needs ATTRIBUTE_RETURN_CHECK; normally, close() fails in very few situations, and in cleanup paths, you tend to already ha

[libvirt] [PATCH] esx: Fix check in esxDomainGetInfo's perf metric handling

2010-10-15 Thread Matthias Bolte
--- src/esx/esx_driver.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 8bc3be2..1b4ee29 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -2329,15 +2329,17 @@ esxDomainGetInfo(virDomainPtr domain, vir

Re: [libvirt] [PATCH] esx: Explictly declare VMX file content as UTF-8

2010-10-15 Thread Matthias Bolte
2010/10/14 Daniel Veillard : > On Thu, Oct 14, 2010 at 08:59:18AM +0200, Matthias Bolte wrote: >> --- >>  src/esx/esx_vmx.c                                  |    3 +++ >>  tests/xml2vmxdata/xml2vmx-annotation.vmx           |    1 + >>  tests/xml2vmxdata/xml2vmx-cdrom-ide-device.vmx     |    1 + >>

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Stefan Berger
On 10/15/2010 01:32 PM, Eric Blake wrote: On 10/15/2010 10:15 AM, Stefan Berger wrote: Index: libvirt-acl/src/util/files.c === --- /dev/null +++ libvirt-acl/src/util/files.c + */ + +#include Oops, need to include first. Ok

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Eric Blake
On 10/15/2010 11:32 AM, Eric Blake wrote: +int virClose(int *fdptr); Needs an ATTRIBUTE_NONNULL(1). I'm also debating whether it needs ATTRIBUTE_RETURN_CHECK; normally, close() fails in very few situations, and in cleanup paths, you tend to already have another error more important so you can i

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Eric Blake
On 10/15/2010 10:15 AM, Stefan Berger wrote: Index: libvirt-acl/src/util/files.c === --- /dev/null +++ libvirt-acl/src/util/files.c + */ + +#include Oops, need to include first. +++ libvirt-acl/src/util/files.h @@ -0,0 +1,3

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Eric Blake
On 10/15/2010 11:12 AM, Laine Stump wrote: in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here. VIR_FREE() is commonly used in the way that Matthias describes, so I think it would be consistent to use VIR_CLOSE in this way as well. Invoking it uncon

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Laine Stump
On 10/15/2010 01:01 PM, Stefan Berger wrote: On 10/15/2010 12:54 PM, Matthias Bolte wrote: 2010/10/15 Stefan Berger: Since bugs due to double-closed filedescriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Stefan Berger
On 10/15/2010 12:54 PM, Matthias Bolte wrote: 2010/10/15 Stefan Berger: Since bugs due to double-closed filedescriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here. There are lots of places where close() is bein

Re: [libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Matthias Bolte
2010/10/15 Stefan Berger : >  Since bugs due to double-closed filedescriptors are difficult to track down > in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help > avoid mistakes here. > > There are lots of places where close() is being used. In this patch I am > only cleanin

[libvirt] [PATCH 3/3] virsh: add tests for recent cli improvements

2010-10-15 Thread Eric Blake
* tests/virshtest.c (mymain): Add tests of command parsing and echo command. --- No patch series is complete without decent tests. This should cover all of the recent virsh command-line parsing improvements (various quoting styles, empty argument support, -- support), as well as stress-testing th

[libvirt] [PATCH 2/3] virsh: new echo command

2010-10-15 Thread Eric Blake
* tools/virsh.c (cmdEcho): New command. (commands): Add it. * tools/virsh.pod (echo): Document it. --- tools/virsh.c | 75 +++ tools/virsh.pod |7 + 2 files changed, 82 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools

[libvirt] [PATCH 1/3] virsh: add support for accepting arbitrary argv

2010-10-15 Thread Eric Blake
* tools/virsh.c (vshCmdOptType): Add VSH_OT_ARGV. Delete unused VSH_OT_NONE. (vshCmddefGetData): Special case new opt flag. (vshCmddefHelp): Display help for argv. (vshCommandOptArgv): New function. --- Here's the completed series. tools/virsh.c | 75 ++

[libvirt] [PATCH] introduce VIR_CLOSE to be used rather than close()

2010-10-15 Thread Stefan Berger
Since bugs due to double-closed filedescriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here. There are lots of places where close() is being used. In this patch I am only cleaning up usage of close() in src/conf

Re: [libvirt] [PATCH] Don't fail lxc domain start when memory controller support is missing

2010-10-15 Thread Guido Günther
On Fri, Oct 15, 2010 at 10:15:02AM +0200, Guido Günther wrote: > Hi, > starting of lxc domains currently fails if memory controller support is > disabled in the kernel. Attached patch fixes this by ignoring the error > in case the files don't exist in the cgroup filesystem. I didn't add the > same

[libvirt] [PATCH] Fix warning about a non-literal format string in qemu_driver.c

2010-10-15 Thread Laine Stump
I just committed this under the obvious fix rule. --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 16f34f7..0ce2d40 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10385,7

Re: [libvirt] [PATCH v2] Make sure that filedescriptors are only closed once

2010-10-15 Thread Laine Stump
On 10/15/2010 07:17 AM, Stefan Berger wrote: Well, what about a VIR_CLOSE() to prevent such mistakes in the future. That sounds like a good idea to me. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] build: skip xenapi driver when building for RHEL

2010-10-15 Thread Eric Blake
On 10/15/2010 12:23 AM, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=643118 * libvirt.spec.in: Provide xenapi conditionals. --- Hmm - there's probably other things we could do to sync libvirt.spec.in back with RHEL builds; for example, the fact that RHEL 6.0 beta builds ESX

[libvirt] libvirt & cgroup support - why are vm cgroups created under libvirt cgroup?

2010-10-15 Thread Nikola Ciprich
Hello, I'd like to use cgroups for resources counting and management, but I'd like to use blkio-cgroup controller as well. I created simple patch for libvirt adding support for it (and I'd like to submit the patch once it's tested properly). But it seems that blkio-cgroup controller doesn't suppo

Re: [libvirt] [virt-tools-list] [PATCH] add AM_MAINTAINER_MODE macro

2010-10-15 Thread Eric Blake
On 10/15/2010 06:09 AM, Eric Blake wrote: [adding libvir-list] On 10/15/2010 06:06 AM, Eric Blake wrote: On 10/15/2010 05:29 AM, Guido Günther wrote: Hi, On Wed, Sep 29, 2010 at 04:46:23PM +0200, Guido Günther wrote: Odd - I cannot find the original mail, even when looking in the archives: h

Re: [libvirt] [virt-tools-list] [PATCH] add AM_MAINTAINER_MODE macro

2010-10-15 Thread Eric Blake
[adding libvir-list] On 10/15/2010 06:06 AM, Eric Blake wrote: On 10/15/2010 05:29 AM, Guido Günther wrote: Hi, On Wed, Sep 29, 2010 at 04:46:23PM +0200, Guido Günther wrote: Odd - I cannot find the original mail, even when looking in the archives: https://www.redhat.com/archives/libvir-list/

Re: [libvirt] [PATCH v2] Make sure that filedescriptors are only closed once

2010-10-15 Thread Stefan Berger
On 10/15/2010 07:16 AM, Daniel P. Berrange wrote: On Thu, Oct 14, 2010 at 09:31:59PM -0400, Stefan Berger wrote: V2: also the path where close() failed needs to be corrected; -> time for a VIR_CLOSE() ? Setting fd=-1 in these places makes sure that the fd is not closed twice later on in

Re: [libvirt] [PATCH v2] Make sure that filedescriptors are only closed once

2010-10-15 Thread Daniel P. Berrange
On Thu, Oct 14, 2010 at 09:31:59PM -0400, Stefan Berger wrote: > V2: > also the path where close() failed needs to be corrected; > > -> time for a VIR_CLOSE() ? > > Setting fd=-1 in these places makes sure that the fd is not closed twice > later on in 'clean:'. This is of course a recipe for

Re: [libvirt] usage of PKG_CHECK_ in libvirt

2010-10-15 Thread Daniel P. Berrange
On Thu, Oct 14, 2010 at 09:33:18PM +0200, Matthias Bolte wrote: > 2010/10/14 Alejandro Mery : > > hi, > > > > I want to try to add some basic support for (linux-)vserver to libvirt > > and after reading some old mail threads I noticed you vanished > > PKG_CHECK_EXISTS back in 2008. is it still not

[libvirt] [PATCH] Don't fail lxc domain start when memory controller support is missing

2010-10-15 Thread Guido Günther
Hi, starting of lxc domains currently fails if memory controller support is disabled in the kernel. Attached patch fixes this by ignoring the error in case the files don't exist in the cgroup filesystem. I didn't add the same exceptions for the recent hard and soft limit code since if somebody sets

Re: [libvirt] [PATCH] Make sure that filedescriptors are only closed once

2010-10-15 Thread Daniel Veillard
On Thu, Oct 14, 2010 at 09:20:01PM -0400, Stefan Berger wrote: > Setting fd=-1 in these places makes sure that the fd is not closed > twice later on in 'clean:'. This is of course a recipe for disaster > in a multi-threaded system where the filedescriptor can belong to > something else right away.