Re: [libvirt] [PATCH 0/5] remote generator: Cover more functions

2011-05-16 Thread Daniel Veillard
On Sun, May 15, 2011 at 08:23:29AM +0200, Matthias Bolte wrote: Move more functions to the generator and cover stream-using functions. As the stream-usage is not detectable from the .x file directly add additional annotations. daemon/remote.c | 185 ---

Re: [libvirt] FreeBSD and sysconf(_SC_GETPW_R_SIZE_MAX)

2011-05-16 Thread Daniel Veillard
On Sun, May 15, 2011 at 07:22:46AM +0200, Matthias Bolte wrote: On FreeBSD virsh fails to enter interactive mode because vshReadlineInit fails, because virGetUserDirectory fails, because virGetUserEnt fails, because sysconf(_SC_GETPW_R_SIZE_MAX) returns -1 and sets errno to EINVAL. Is this

Re: [libvirt] FreeBSD and sys/syslimits.h

2011-05-16 Thread Daniel Veillard
On Sat, May 14, 2011 at 06:49:40PM +0200, Matthias Bolte wrote: libvirtd.h includes sys/syslimits.h if available. On FreeBSD the header contains this warning: In file included from libvirtd.h:42, from dispatch.h:28, from dispatch.c:30:

Re: [libvirt] [PATCH] virsh: Improve editing

2011-05-16 Thread Daniel Veillard
On Fri, May 13, 2011 at 02:42:29PM +0100, Daniel P. Berrange wrote: There are two common problems with virsh edit friends - Invalid XML syntax, causes error report lost changes - User add unsupported/unknown XML attributes/elements which are silently discarded by libvirt This

Re: [libvirt] Allow hvsupport.html.in to be auto-generated

2011-05-16 Thread Daniel Veillard
On Fri, May 13, 2011 at 05:31:54PM -0600, Eric Blake wrote: On 05/13/2011 07:36 AM, Daniel P. Berrange wrote: The hvsupport.html.in file is constantly out of date, because when updating the drivers to add new APIs, people often (always) forget to update the hvsupport.html.in file. To

Re: [libvirt] [PATCH v4 5/8] screenshot: Expose the new API in virsh

2011-05-16 Thread Daniel P. Berrange
On Fri, May 13, 2011 at 05:18:27PM -0600, Eric Blake wrote: On 05/13/2011 03:16 AM, Daniel P. Berrange wrote: On Thu, May 12, 2011 at 06:29:12PM +0200, Michal Privoznik wrote: +static const vshCmdOptDef opts_screenshot[] = { +{domain, VSH_OT_DATA, VSH_OFLAG_REQ, N_(domain name, id or

Re: [libvirt] [PATCH v4 0/8] Add support for taking screenshots of domain console

2011-05-16 Thread Daniel P. Berrange
On Fri, May 13, 2011 at 05:15:56PM -0600, Eric Blake wrote: On 05/13/2011 02:56 AM, Daniel P. Berrange wrote: On Fri, May 13, 2011 at 10:34:24AM +0200, Michal Prívozník wrote: Then, screen is calculated as Screen Device Head 0 video0 0 1 video0 1 2

Re: [libvirt] FreeBSD and sysconf(_SC_GETPW_R_SIZE_MAX)

2011-05-16 Thread Daniel P. Berrange
On Sun, May 15, 2011 at 07:22:46AM +0200, Matthias Bolte wrote: On FreeBSD virsh fails to enter interactive mode because vshReadlineInit fails, because virGetUserDirectory fails, because virGetUserEnt fails, because sysconf(_SC_GETPW_R_SIZE_MAX) returns -1 and sets errno to EINVAL. Is this

Re: [libvirt] [PATCH] domain: Require init for container guests

2011-05-16 Thread Daniel P. Berrange
On Fri, May 13, 2011 at 10:46:51AM -0400, Cole Robinson wrote: On 05/13/2011 05:27 AM, Daniel P. Berrange wrote: On Thu, May 12, 2011 at 05:47:42PM -0400, Cole Robinson wrote: Use capabilities to allow a driver to register a default init if none is specified in the XML. Openvz was already

Re: [libvirt] Allow hvsupport.html.in to be auto-generated

2011-05-16 Thread Richard W.M. Jones
On Fri, May 13, 2011 at 02:36:55PM +0100, Daniel P. Berrange wrote: The hvsupport.html.in file is constantly out of date, because when updating the drivers to add new APIs, people often (always) forget to update the hvsupport.html.in file. To solve this we can instead store version number

Re: [libvirt] Allow hvsupport.html.in to be auto-generated

2011-05-16 Thread Daniel P. Berrange
On Mon, May 16, 2011 at 10:41:52AM +0100, Richard W.M. Jones wrote: On Fri, May 13, 2011 at 02:36:55PM +0100, Daniel P. Berrange wrote: The hvsupport.html.in file is constantly out of date, because when updating the drivers to add new APIs, people often (always) forget to update the

Re: [libvirt] [PATCH v4 5/8] screenshot: Expose the new API in virsh

2011-05-16 Thread Michal Prívozník
On 16.05.2011 10:56, Daniel P. Berrange wrote: On Fri, May 13, 2011 at 05:18:27PM -0600, Eric Blake wrote: On 05/13/2011 03:16 AM, Daniel P. Berrange wrote: On Thu, May 12, 2011 at 06:29:12PM +0200, Michal Privoznik wrote: +static const vshCmdOptDef opts_screenshot[] = { +{domain,

Re: [libvirt] Allow hvsupport.html.in to be auto-generated

2011-05-16 Thread Daniel P. Berrange
On Mon, May 16, 2011 at 03:19:37PM +0800, Daniel Veillard wrote: On Fri, May 13, 2011 at 05:31:54PM -0600, Eric Blake wrote: On 05/13/2011 07:36 AM, Daniel P. Berrange wrote: The hvsupport.html.in file is constantly out of date, because when updating the drivers to add new APIs, people

Re: [libvirt] [PATCH v2 0/9] Introduce virDomainGetState API

2011-05-16 Thread Jiri Denemark
On Tue, May 10, 2011 at 15:39:02 +0200, Jiri Denemark wrote: This new API solves several problems: - calling virDomainGetInfo for just getting domain status is an overkill since it may result in sending requests to guest OS - since virDomainGetInfo can hang when guest OS is not responding

[libvirt] [PATCHv2] spice: support streaming-video parameter

2011-05-16 Thread Alon Levy
This adds a streaming-video=filter|all|off attribute. It is used to change the behavior of video stream detection in spice, the default is filter (the default for libvirt is not to specify it - the actual default is defined in libspice-server.so). Usage: graphics type='spice' autoport='yes'

Re: [libvirt] [PATCH 03/16] Introduce migration cookies to QEMU driver

2011-05-16 Thread Daniel P. Berrange
On Thu, May 12, 2011 at 01:17:21PM -0600, Eric Blake wrote: On 05/12/2011 10:04 AM, Daniel P. Berrange wrote: The migration protocol has support for a 'cookie' parameter which is an opaque array of bytes as far as libvirt is concerned. Drivers may use this for passing around arbitrary extra

Re: [libvirt] Allow hvsupport.html.in to be auto-generated

2011-05-16 Thread Daniel P. Berrange
On Fri, May 13, 2011 at 05:31:54PM -0600, Eric Blake wrote: On 05/13/2011 07:36 AM, Daniel P. Berrange wrote: The hvsupport.html.in file is constantly out of date, because when updating the drivers to add new APIs, people often (always) forget to update the hvsupport.html.in file. To

[libvirt] [PATCH] Disable virCommandExec on Win32

2011-05-16 Thread Daniel P. Berrange
Mingw execve() has a broken signature. Disable this function until gnulib fixes the signature, since we don't really need this on Win32 anyway. * src/util/command.c: Disable virCommandExec on Win32 --- src/util/command.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-)

Re: [libvirt] [PATCH] Cast args/env for execve in virCommand

2011-05-16 Thread Daniel P. Berrange
On Thu, May 12, 2011 at 10:37:04AM -0600, Eric Blake wrote: On 05/12/2011 10:29 AM, Daniel P. Berrange wrote: 'char **' is not compatible with 'const char* const*' so needs an explicit cast. Fixes the build on MinGW * src/util/command.c: Cast args/env for execve ---

Re: [libvirt] [PATCH 03/16] Introduce migration cookies to QEMU driver

2011-05-16 Thread Daniel P. Berrange
On Mon, May 16, 2011 at 02:05:13PM +0100, Daniel P. Berrange wrote: On Thu, May 12, 2011 at 01:17:21PM -0600, Eric Blake wrote: On 05/12/2011 10:04 AM, Daniel P. Berrange wrote: The migration protocol has support for a 'cookie' parameter which is an opaque array of bytes as far as libvirt

Re: [libvirt] [PATCH 03/16] Introduce migration cookies to QEMU driver

2011-05-16 Thread Eric Blake
On 05/16/2011 08:00 AM, Daniel P. Berrange wrote: @@ -369,7 +648,7 @@ cleanup: virDomainObjUnlock(vm); if (event) qemuDomainEventQueue(driver, event); -qemuDriverUnlock(driver); +qemuMigrationCookieFree(mig); Umm, did you really intend to drop the

Re: [libvirt] [PATCH] Disable virCommandExec on Win32

2011-05-16 Thread Eric Blake
On 05/16/2011 07:22 AM, Daniel P. Berrange wrote: Mingw execve() has a broken signature. Disable this function until gnulib fixes the signature, since we don't really need this on Win32 anyway. * src/util/command.c: Disable virCommandExec on Win32 --- src/util/command.c | 13

Re: [libvirt] KVM Forum 2011: Call For Participation

2011-05-16 Thread Dor Laor
The abstract submission deadline was originally set for today. The forum committee agreed to extend the deadline period until next Sunday, May 22. The notification date remains the same (May 31). Thanks, your KVM Forum 2011 Program Committee On 04/21/2011 08:21 PM,

Re: [libvirt] [PATCH 00/16 v5] Implement migration v3 protocol

2011-05-16 Thread Daniel P. Berrange
On Thu, May 12, 2011 at 05:04:36PM +0100, Daniel P. Berrange wrote: An update of http://www.redhat.com/archives/libvir-list/2011-May/msg00605.html Changes in this series - Fix comments from previous review - Rebase to latest GIT Also pullable from

[libvirt] [PATCH] send 'container=libvirt' in env to container init

2011-05-16 Thread Serge Hallyn
This allows upstart scripts to detect that they are in a container and modify their behavior accordingly. In this way, the same ubuntu maverick or natty image with the 'lxcguest' package installed can be booted on bare metal, in kvm, or as a libvirt or liblxc container. Signed-off-by: Chuck

Re: [libvirt] [PATCH] send 'container=libvirt' in env to container init

2011-05-16 Thread Eric Blake
On 05/16/2011 08:47 AM, Serge Hallyn wrote: This allows upstart scripts to detect that they are in a container and modify their behavior accordingly. In this way, the same ubuntu maverick or natty image with the 'lxcguest' package installed can be booted on bare metal, in kvm, or as a

[libvirt] [PATCH v2] virsh: Correctly initialize libvirt

2011-05-16 Thread Jiri Denemark
virsh didn't call virInitialize(), which (among other things) initializes virLastErr thread local variable. As a result of that, virsh could just segfault in virEventRegisterDefaultImpl() since that is the first call that touches (resets) virLastErr. I have no idea what lucky coincidence made

Re: [libvirt] [PATCH v2] virsh: Correctly initialize libvirt

2011-05-16 Thread Eric Blake
On 05/16/2011 08:59 AM, Jiri Denemark wrote: virsh didn't call virInitialize(), which (among other things) initializes virLastErr thread local variable. As a result of that, virsh could just segfault in virEventRegisterDefaultImpl() since that is the first call that touches (resets)

Re: [libvirt] [virt-devel] Cache and memory bandwidth graphs: native versus guest

2011-05-16 Thread john cooper
Bill Gray wrote: See attachment with two graphs: (1) cache bandwidth, (2) blowup of sustained memory bandwidth region... Bill, I had some difficulty with this document under ooffice. A recent version seized and an older version didn't seem to render correctly. Could you export it as pdf?

Re: [libvirt] [PATCH] send 'container=libvirt' in env to container init

2011-05-16 Thread Serge Hallyn
Quoting Eric Blake (ebl...@redhat.com): On 05/16/2011 08:47 AM, Serge Hallyn wrote: This allows upstart scripts to detect that they are in a container and modify their behavior accordingly. In this way, the same ubuntu maverick or natty image with the 'lxcguest' package installed can

Re: [libvirt] [PATCH] qemu: allow blkstat/blkinfo calls during migration

2011-05-16 Thread Daniel P. Berrange
On Fri, May 13, 2011 at 05:05:14PM -0600, Eric Blake wrote: On 05/13/2011 04:11 AM, Federico Simoncelli wrote: Originally most of libvirt domain-specific calls were blocking during a migration. A new mechanism to allow specific calls (blkstat/blkinfo) to be executed in such condition has

[libvirt] [PATCH] maint: ignore generated file

2011-05-16 Thread Eric Blake
* .gitignore: Ignore recently added file. --- I'm pushing this as a trivial followup. .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 87a105f..a15100c 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ /configure

Re: [libvirt] [PATCH 3/4] Automatically generate the hvsupport.html.in file from source files

2011-05-16 Thread Eric Blake
On 05/13/2011 07:36 AM, Daniel P. Berrange wrote: The hvsupport.html.in file is forever out of date. By annotating the driver struct tables in each driver with version information, we can auto-generate the hvsupport.html.in file. Annotating the drivers will be mandatory for new patches,

Re: [libvirt] [PATCH 3/4] Automatically generate the hvsupport.html.in file from source files

2011-05-16 Thread Daniel P. Berrange
On Mon, May 16, 2011 at 10:00:30AM -0600, Eric Blake wrote: On 05/13/2011 07:36 AM, Daniel P. Berrange wrote: The hvsupport.html.in file is forever out of date. By annotating the driver struct tables in each driver with version information, we can auto-generate the hvsupport.html.in file.

[libvirt] [PATCH] maint: mark more perl scripts executable

2011-05-16 Thread Eric Blake
* src/remote/rpcgen_fix.pl: Add executable bit. * tests/oomtrace.pl: Likewise. --- I found a couple other files that could also use this treatment. Pushing under the trivial rule. 0 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 = 100755 src/remote/rpcgen_fix.pl mode change

Re: [libvirt] [PATCH 3/4] Automatically generate the hvsupport.html.in file from source files

2011-05-16 Thread Eric Blake
On 05/16/2011 10:11 AM, Daniel P. Berrange wrote: On Mon, May 16, 2011 at 10:00:30AM -0600, Eric Blake wrote: On 05/13/2011 07:36 AM, Daniel P. Berrange wrote: The hvsupport.html.in file is forever out of date. By annotating the driver struct tables in each driver with version information, we

Re: [libvirt] libvirt, FreeBSD portability inquiry

2011-05-16 Thread Jason Helfman
On Sun, May 15, 2011 at 12:50:30PM -0700, Jason Helfman thus spake: 2011/5/14 Jason Helfman jhelf...@e-e.com: Compiles fine now. Matthias does a make install work, and does it function as a library? Thanks! Yes works. I can use virsh and connect to libvirtd on another box. The only

Re: [libvirt] [PATCH] qemu: allow blkstat/blkinfo calls during migration

2011-05-16 Thread Eric Blake
On 05/13/2011 04:11 AM, Federico Simoncelli wrote: Originally most of libvirt domain-specific calls were blocking during a migration. A new mechanism to allow specific calls (blkstat/blkinfo) to be executed in such condition has been implemented. In the long term it'd be desirable to get a

[libvirt] [PATCH v2] screenshot: Expose the new API in virsh

2011-05-16 Thread Michal Privoznik
* tools/virsh.c: Add screenshot command * tools/virsh.pod: Document new command * src/libvirt.c: Fix off-be-one error --- diff to v1: - make filename optional and generate filename when missing src/libvirt.c |2 +- tools/virsh.c | 152

[libvirt] [PATCH] Fix remote dispatcher for screenshot command

2011-05-16 Thread Daniel P. Berrange
* daemon/remote.c: Update screenshot dispatcher to follow standard practice --- daemon/remote.c | 53 + 1 files changed, 29 insertions(+), 24 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 181f149..bb01c89 100644 ---

Re: [libvirt] [PATCH] virsh: Report an error when virGetUserDirectory fails

2011-05-16 Thread Matthias Bolte
2011/5/16 Laine Stump la...@laine.org: On 05/15/2011 01:31 AM, Matthias Bolte wrote: Otherwise virsh shows the interactive greeting and the silently exists instead of enterting interactive mode. ---  tools/virsh.c |    4 +++-  1 files changed, 3 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] cleanup: use c99 initializations

2011-05-16 Thread Daniel P. Berrange
On Mon, May 16, 2011 at 04:17:54PM +0800, Lai Jiangshan wrote: It help us avoid to touch many files when we define the internal APIs of a public API like commit b19bd85e15332405623ed46a3ee8b99812aa6007. --- src/esx/esx_device_monitor.c | 15 +-- src/esx/esx_driver.c | 175

Re: [libvirt] [PATCHv4 2/6] virNodeGetCPUTimeParameters: Define internal driver API

2011-05-16 Thread Daniel P. Berrange
On Mon, May 16, 2011 at 11:36:14AM +0900, Minoru Usui wrote: virNodeGetCPUTimeParameters: Define internal driver API Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- src/driver.h |8 src/esx/esx_driver.c |1 + src/libxl/libxl_driver.c |1 +

Re: [libvirt] [PATCH] Fix remote dispatcher for screenshot command

2011-05-16 Thread Eric Blake
On 05/16/2011 11:12 AM, Daniel P. Berrange wrote: * daemon/remote.c: Update screenshot dispatcher to follow standard practice --- daemon/remote.c | 53 + 1 files changed, 29 insertions(+), 24 deletions(-) ACK. if

Re: [libvirt] [PATCHv4 4/6] virNodeGetCPUTimeParameters: Implement remote protocol

2011-05-16 Thread Daniel P. Berrange
On Mon, May 16, 2011 at 11:37:34AM +0900, Minoru Usui wrote: virNodeGetCPUTimeParameters: Implement remote protocol Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- daemon/remote.c | 81 ++ src/remote/remote_driver.c | 64

[libvirt] [PATCH] Fix leak of mime type string in screenshot dispatcher

2011-05-16 Thread Daniel P. Berrange
* daemon/remote.c: Free mime string --- daemon/remote.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index bb01c89..ea36bf5 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1746,6 +1746,7 @@ remoteDispatchDomainScreenshot(struct

[libvirt] [PATCHv4] qemu: allow blkstat/blkinfo calls during migration

2011-05-16 Thread Eric Blake
From: Federico Simoncelli fsimo...@redhat.com Originally most of libvirt domain-specific calls were blocking during a migration. A new mechanism to allow specific calls (blkstat/blkinfo) to be executed in such condition has been implemented. In the long term it'd be desirable to get a more

[libvirt] [PATCH] Remove obsolete remoteDispatchOOMError method

2011-05-16 Thread Daniel P. Berrange
No new code should be using remoteDispatchOOMError() * daemon/dispatch.c, daemon/dispatch.h: Remove remoteDispatchOOMError --- daemon/dispatch.c |8 daemon/dispatch.h |1 - 2 files changed, 0 insertions(+), 9 deletions(-) diff --git a/daemon/dispatch.c b/daemon/dispatch.c index

Re: [libvirt] [PATCH] Remove obsolete remoteDispatchOOMError method

2011-05-16 Thread Eric Blake
On 05/16/2011 11:28 AM, Daniel P. Berrange wrote: No new code should be using remoteDispatchOOMError() * daemon/dispatch.c, daemon/dispatch.h: Remove remoteDispatchOOMError --- daemon/dispatch.c |8 daemon/dispatch.h |1 - 2 files changed, 0 insertions(+), 9 deletions(-)

Re: [libvirt] [PATCH] Fix leak of mime type string in screenshot dispatcher

2011-05-16 Thread Eric Blake
On 05/16/2011 11:29 AM, Daniel P. Berrange wrote: * daemon/remote.c: Free mime string --- daemon/remote.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index bb01c89..ea36bf5 100644 --- a/daemon/remote.c +++ b/daemon/remote.c

Re: [libvirt] [PATCH] esx: Change some alignments in the input file

2011-05-16 Thread Eric Blake
On 05/14/2011 04:34 AM, Matthias Bolte wrote: 2011/5/1 Matthias Bolte matthias.bo...@googlemail.com: No functional change included. --- src/esx/esx_vi_generator.input | 122 1 files changed, 61 insertions(+), 61 deletions(-) -method

Re: [libvirt] [PATCH] esx: Change generated method parameter autobinding

2011-05-16 Thread Eric Blake
On 05/14/2011 04:31 AM, Matthias Bolte wrote: 2011/5/13 Eric Blake ebl...@redhat.com: On 05/01/2011 01:57 PM, Matthias Bolte wrote: Instead of specifing the type of the managed object directly specify the ServiceContent member name. This way the mapping dictionary can be removed. This fell

Re: [libvirt] [PATCH] esx: Whitespace cleanup in the generator

2011-05-16 Thread Eric Blake
On 05/01/2011 01:57 PM, Matthias Bolte wrote: Break long lines and change spacing of keyword arguments to match Python style standards better. No functional change included. --- src/esx/esx_vi_generator.py | 369 -- 1 files changed, 246

Re: [libvirt] [PATCH] esx: Fix race condition in esxVI_EnsureSession

2011-05-16 Thread Eric Blake
On 05/01/2011 01:57 PM, Matthias Bolte wrote: When the session has expired then multiple threads can race while reestablishing it. This race condition is not that critical as it requires a special usage pattern to be triggerd. It can only happen when an application doesn't

Re: [libvirt] [PATCH] esx: Convert autoAnswer from esxVI_Boolean to a simple bool

2011-05-16 Thread Eric Blake
On 05/01/2011 01:57 PM, Matthias Bolte wrote: Just true/false is good enough for it. Also use it directly from the parsed URI instead of caching it in esxPrivate. --- src/esx/esx_driver.c | 52 - src/esx/esx_private.h|1 -

Re: [libvirt] [PATCH] esx: Simplify some esxVI_Boolean to bool

2011-05-16 Thread Eric Blake
On 05/01/2011 01:57 PM, Matthias Bolte wrote: --- src/esx/esx_driver.c |6 ++ src/esx/esx_vi.c | 34 +++--- src/esx/esx_vi.h | 12 +--- 3 files changed, 22 insertions(+), 30 deletions(-) I got a trivial rebase error when testing this

[libvirt] [PATCH] remote generator: Add special case for virConnectGetType

2011-05-16 Thread Matthias Bolte
This patch depends on this unapplied series: https://www.redhat.com/archives/libvir-list/2011-May/msg00987.html Matthias From 33fbe44130aa055d4164f4cc1ace3dabdcfaa7d5 Mon Sep 17 00:00:00 2001 From: Matthias Bolte matthias.bo...@googlemail.com Date: Mon, 16 May 2011 20:10:06 +0200 Subject:

Re: [libvirt] [PATCH] esx: Change generated method parameter autobinding

2011-05-16 Thread Matthias Bolte
2011/5/16 Eric Blake ebl...@redhat.com: On 05/14/2011 04:31 AM, Matthias Bolte wrote: 2011/5/13 Eric Blake ebl...@redhat.com: On 05/01/2011 01:57 PM, Matthias Bolte wrote: Instead of specifing the type of the managed object directly specify the ServiceContent member name. This way the mapping

Re: [libvirt] [PATCH] esx: Change some alignments in the input file

2011-05-16 Thread Matthias Bolte
2011/5/16 Eric Blake ebl...@redhat.com: On 05/14/2011 04:34 AM, Matthias Bolte wrote: 2011/5/1 Matthias Bolte matthias.bo...@googlemail.com: No functional change included. ---  src/esx/esx_vi_generator.input |  122  1 files changed, 61

[libvirt] [PATCH] build: drop unused sys/syslimits.h header

2011-05-16 Thread Eric Blake
sys/syslimits.h is not standardized, so portable programs should not need to rely on it. If there really is something that we need where sys/syslimits.h provided the limit but limits.h did not, then that would be a candidate for fixing in gnulib. But this patch did not turn up any compilation

Re: [libvirt] [PATCH 1/5] remote generator, client: Handle functions that return an optional string

2011-05-16 Thread Eric Blake
On 05/15/2011 12:23 AM, Matthias Bolte wrote: --- daemon/remote_generator.pl |5 + src/remote/remote_driver.c | 26 -- src/remote/remote_protocol.x |2 +- 3 files changed, 6 insertions(+), 27 deletions(-) To test this, I installed the patch, and

Re: [libvirt] [PATCH 2/5] remote generator, client: Add more special case handling

2011-05-16 Thread Eric Blake
On 05/15/2011 12:23 AM, Matthias Bolte wrote: For virDomainDestroy and virDrvSupportsFeature. --- daemon/remote_generator.pl | 14 ++ src/remote/remote_driver.c | 55 -- src/remote/remote_protocol.x |4 +- 3 files changed, 16

Re: [libvirt] [PATCH 3/5] Fix error reporting in stream creation code

2011-05-16 Thread Eric Blake
On 05/15/2011 12:23 AM, Matthias Bolte wrote: virStreamNew needs to dispatch the error that virGetStream reports on failure. remoteCreateClientStream can fail due to virStreamNew or due to VIR_ALLOC. Report OOM error for VIR_ALLOC failure to report errors in all error cases. Remove OOM

Re: [libvirt] [PATCH 4/5] remote generator: Handle stream-using functions

2011-05-16 Thread Eric Blake
On 05/15/2011 12:23 AM, Matthias Bolte wrote: Reorder signature of virDrvDomainOpenConsole to match the common pattern. Add special case code to handle deviation in the public API version. Adds a missing remoteStreamRelease to remoteDomainScreenshot error path. --- daemon/remote.c

Re: [libvirt] [PATCH 5/5] remote generator: Don't rely on $_ being stable over a large function

2011-05-16 Thread Eric Blake
On 05/15/2011 12:23 AM, Matthias Bolte wrote: Replace $calls{$_} with $call in the dispatch bodies generator function. No functional change included. --- daemon/remote_generator.pl | 100 ++- 1 files changed, 51 insertions(+), 49 deletions(-)

Re: [libvirt] [PATCH] remote generator: Add special case for virConnectGetType

2011-05-16 Thread Eric Blake
On 05/16/2011 12:14 PM, Matthias Bolte wrote: This patch depends on this unapplied series: https://www.redhat.com/archives/libvir-list/2011-May/msg00987.html which is now reviewed. Subject: [PATCH] remote generator: Add special case for virConnectGetType --- daemon/remote.c

Re: [libvirt] [PATCH] virsh: Improve editing

2011-05-16 Thread Eric Blake
On 05/16/2011 01:12 AM, Daniel Veillard wrote: On Fri, May 13, 2011 at 02:42:29PM +0100, Daniel P. Berrange wrote: There are two common problems with virsh edit friends - Invalid XML syntax, causes error report lost changes - User add unsupported/unknown XML attributes/elements which

Re: [libvirt] FreeBSD and sysconf(_SC_GETPW_R_SIZE_MAX)

2011-05-16 Thread Eric Blake
On 05/16/2011 03:27 AM, Daniel P. Berrange wrote: On Sun, May 15, 2011 at 07:22:46AM +0200, Matthias Bolte wrote: On FreeBSD virsh fails to enter interactive mode because vshReadlineInit fails, because virGetUserDirectory fails, because virGetUserEnt fails, because

[libvirt] [PATCH] build: tolerate unlimited group size

2011-05-16 Thread Eric Blake
POSIX allows sysconf(_SC_GETPW_R_SIZE_MAX) to return -1 if there is no fixed limit, and requires ERANGE errors to track real size. http://pubs.opengroup.org/onlinepubs/9699919799/functions/getpwuid_r.html Also, on error for get*_r functions, errno is undefined, and the real error was the return

Re: [libvirt] FreeBSD and sysconf(_SC_GETPW_R_SIZE_MAX)

2011-05-16 Thread Eric Blake
On 05/16/2011 03:03 PM, Eric Blake wrote: getpwnam() returns ERANGE if the allocated buffer is too small. So we should do something along the lines of size_t len = sysconf(_SC_GETPW_R_SIZE_MAX) Guarded by #ifdef, and defaulting to -1 if _SC_GETPW_R_SIZE_MAX is not defined (since it is

Re: [libvirt] [PATCH] send 'container=libvirt' in env to container init

2011-05-16 Thread Eric Blake
On 05/16/2011 09:14 AM, Serge Hallyn wrote: @@ -112,6 +112,7 @@ static virCommandPtr lxcContainerBuildInitCmd(virDomainDefPtr vmDef) virCommandAddEnvString(cmd, PATH=/bin:/sbin); virCommandAddEnvString(cmd, TERM=linux); +virCommandAddEnvString(cmd, container=libvirt);

Re: [libvirt] [PATCH] virsh: Improve editing

2011-05-16 Thread Daniel Veillard
On Mon, May 16, 2011 at 02:59:28PM -0600, Eric Blake wrote: On 05/16/2011 01:12 AM, Daniel Veillard wrote: On Fri, May 13, 2011 at 02:42:29PM +0100, Daniel P. Berrange wrote: There are two common problems with virsh edit friends - Invalid XML syntax, causes error report lost changes

Re: [libvirt] [PATCH] send 'container=libvirt' in env to container init

2011-05-16 Thread Serge Hallyn
Quoting Eric Blake (ebl...@redhat.com): On 05/16/2011 09:14 AM, Serge Hallyn wrote: @@ -112,6 +112,7 @@ static virCommandPtr lxcContainerBuildInitCmd(virDomainDefPtr vmDef) virCommandAddEnvString(cmd, PATH=/bin:/sbin); virCommandAddEnvString(cmd, TERM=linux); +

Re: [libvirt] [PATCHv4 2/6] virNodeGetCPUTimeParameters: Define internal driver API

2011-05-16 Thread Minoru Usui
Hi, Daniel. Thank you for your rapid reply. On Mon, 16 May 2011 18:23:07 +0100 Daniel P. Berrange berra...@redhat.com wrote: On Mon, May 16, 2011 at 11:36:14AM +0900, Minoru Usui wrote: virNodeGetCPUTimeParameters: Define internal driver API Signed-off-by: Minoru Usui

Re: [libvirt] [PATCHv4 4/6] virNodeGetCPUTimeParameters: Implement remote protocol

2011-05-16 Thread Minoru Usui
On Mon, 16 May 2011 18:26:22 +0100 Daniel P. Berrange berra...@redhat.com wrote: On Mon, May 16, 2011 at 11:37:34AM +0900, Minoru Usui wrote: virNodeGetCPUTimeParameters: Implement remote protocol Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- daemon/remote.c |