Re: [libvirt] libvirt-0.9.3 week freeze, RC2 version to test

2011-06-30 Thread Wen Congyang
At 06/30/2011 11:36 AM, Daniel Veillard Write: Following the changes done in the daemon and client code to use the new RPC implementation, and the large amount of patches and fixes since RC1 I have made a new release candidate RC2 based on current git.

Re: [libvirt] [PATCH 0/2] Introduce two new virsh commands

2011-06-30 Thread Osier Yang
于 2011年06月30日 00:26, Eric Blake 写道: On 06/29/2011 06:19 AM, Osier Yang wrote: These two patches is to introduce two new virsh commands, one is eject-media, which is to eject media from CD or floppy drive, the other is insert-media, which is to insert media into CD or floppy drive. There are

Re: [libvirt] [PATCH 09/10] vcpubandwidth: Implement virsh support

2011-06-30 Thread Taku Izumi
On Thu, 30 Jun 2011 11:19:14 +0800 Wen Congyang we...@cn.fujitsu.com wrote: Introduce new command vcpu-bandwidth to change and query bandwidth for each vcpu. Usage: 1. query bandwidth for all vcpus: # virsh vcpu-bandwidth domain 2. query bandwidth for a vcpu: # virsh

Re: [libvirt] [Libvirt-announce] libvirt-0.9.3 week freeze, RC2 version to test

2011-06-30 Thread Osier Yang
于 2011年06月30日 11:36, Daniel Veillard 写道: Following the changes done in the daemon and client code to use the new RPC implementation, and the large amount of patches and fixes since RC1 I have made a new release candidate RC2 based on current git.

Re: [libvirt] [PATCH 09/10] vcpubandwidth: Implement virsh support

2011-06-30 Thread Wen Congyang
At 06/30/2011 03:27 PM, Taku Izumi Write: On Thu, 30 Jun 2011 11:19:14 +0800 Wen Congyang we...@cn.fujitsu.com wrote: Introduce new command vcpu-bandwidth to change and query bandwidth for each vcpu. Usage: 1. query bandwidth for all vcpus: # virsh vcpu-bandwidth domain 2. query

Re: [libvirt] [PATCH 04/10] qemu: Implement period and quota tunable XML configuration and parsing.

2011-06-30 Thread Wen Congyang
At 06/30/2011 11:09 AM, Wen Congyang Write: --- src/conf/domain_conf.c | 272 ++- src/conf/domain_conf.h | 25 ++ src/libvirt_private.syms|4 + src/qemu/qemu_cgroup.c

[libvirt] [Patch 0/3]virsh: Patches for virsh logging

2011-06-30 Thread Supriya Kannery
Virsh logging has some basic issues: 1. In code, magic numbers are used for logging rather than loglevel variables. 2. Magic number 5 is used for logging which doesn't map to any loglevel variable. Valid loglevel range is 0-4 3. Usage of loglevel variables doesn't align with that of libvirt

[libvirt] [Patch 2/3]virsh: Make DEBUG loglevel the superset

2011-06-30 Thread Supriya Kannery
Aligning loglevel values of virsh to that of libvirt. DEBUG=0 loglevel, when specified through commandline or env variable, should log all the messages. ERROR=4 should log only error messages. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- tools/virsh.c | 12 1 file

[libvirt] [Patch 1/3]virsh: Avoid using magic numbers for logging

2011-06-30 Thread Supriya Kannery
Replace magic numbers with loglevel variables. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- tools/virsh.c | 112 +- 1 file changed, 65 insertions(+), 47 deletions(-) Index: libvirt/tools/virsh.c

[libvirt] [Patch 3/3]virsh: Update virsh man page

2011-06-30 Thread Supriya Kannery
Valid loglevel range for virsh is 0-4. Update virsh man page accordingly. Also explain virsh ENV variables and values. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- tools/virsh.pod | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) Index:

Re: [libvirt] [V2 Patch] virsh: Change log level order

2011-06-30 Thread Supriya Kannery
On 05/27/2011 01:39 AM, Eric Blake wrote: On 05/20/2011 03:36 AM, Daniel P. Berrange wrote: On Fri, May 20, 2011 at 03:05:28PM +0530, Supriya Kannery wrote: Change log level order so that messages at all other levels get logged for DEBUG level. Replace magic numbers with corresponding

Re: [libvirt] [PATCHv3 0/3] sysinfo trailing spaces

2011-06-30 Thread Minoru Usui
Hi, Eric On Wed, 29 Jun 2011 11:52:41 -0600 Eric Blake ebl...@redhat.com wrote: Incorporating my own suggestions from earlier rounds of review. Minoru's original 2/2 patch is unchanged. I think this series is probably worth including in 0.9.3, since it is fixing a just-added feature, but

[libvirt] [PATCH] virsh: Fix a problem of buildPoolXML

2011-06-30 Thread Osier Yang
It doesn't generate name and format nodes for source even if they are explictly specified. This patch fixes it. --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index d15d206..e82ddae 100644 --- a/tools/virsh.c +++

[libvirt] [PATCHv4 3/3] sysinfo: delete unnecessary white space of sysinfo.

2011-06-30 Thread Minoru Usui
sysinfo: delete unnecessary white space of sysinfo. * Trim each element and delete null entry of sysinfo by virSkipSpacesBackwards(). This patch is rebased to following Eric's patches. Eric's 1/3, 2/3 patches do not change. http://www.spinics.net/linux/fedora/libvir/msg41063.html

Re: [libvirt] [PATCH 2/2] cpuset: removing original sched_setaffinity path

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 11:16:27AM +0800, Gui Jianfeng wrote: Since we have controlled Guest cpu affinity by using cpuset cgroup. Get rid of this part. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- src/qemu/qemu_process.c |6 -- 1 files changed, 0 insertions(+), 6

Re: [libvirt] [PATCH 1/2] cpuset: Add cpuset cgroup support.

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 11:08:32AM +0800, Gui Jianfeng wrote: Currently, libvirt makes use of sched_setaffinity() to set Guest processes's cpu affinity. But, sometimes, for instance, when QEmu uses vhost-net, the kernel part of vhost will create a kernel thread for some purpose. In this case,

[libvirt] [PATCH] storage: Fix problem of creating a volume in LVM pool

2011-06-30 Thread Osier Yang
LVM allows one specify the VG with VG path like /dev/lv_pool, and it gets the correct VG name internally by skipping /dev. snip vg_name = skip_dev_dir(cmd, argv[0], NULL); if (strrchr(vg_name, '/')) { log_error(Volume group name expected (no slash));

Re: [libvirt] [PATCH] storage: Fix problem of creating a volume in LVM pool

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 06:40:20PM +0800, Osier Yang wrote: LVM allows one specify the VG with VG path like /dev/lv_pool, and it gets the correct VG name internally by skipping /dev. snip vg_name = skip_dev_dir(cmd, argv[0], NULL); if (strrchr(vg_name, '/')) {

[libvirt] Questions on libvirt storage internals

2011-06-30 Thread Shehjar Tikoo
Hi All I am working on integrating GlusterFS with OpenStack so that VM volumes can be placed on shared GlusterFS volumes. I would highly appreciate if you please help me find the answers to some questions: 1. Whats the difference between a storage driver and a storage backend driver? 2. Why

[libvirt] [PATCH 0/3] Fix stream upload in new RPC code

2011-06-30 Thread Daniel P. Berrange
These patches do three small fixes to the RPC code in libvirtd to make sure stream upload works correctly again -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/3] Fix hardcoded limit on client requests in RPC code

2011-06-30 Thread Daniel P. Berrange
The virNetServerClient object had a hardcoded limit of 10 requests per client. Extend constructor to allow it to be passed in as a configurable variable. Wire this up to the 'max_client_requests' config parameter in libvirtd * daemon/libvirtd.c: Pass max_client_requests into services *

[libvirt] [PATCH 2/3] Ensure RPC message is cleared before being reused

2011-06-30 Thread Daniel P. Berrange
To save on memory reallocation, virNetMessage instances that have been transmitted, may be reused for a subsequent incoming message. We forgot to clear out the old data of the message fully, which caused later confusion upon read. * src/rpc/virnetserverclient.c: memset entire message before

[libvirt] [PATCH 3/3] Fix release of filtered stream messages

2011-06-30 Thread Daniel P. Berrange
The stream code was reusing a stream message object before it was removed from the linked list of filtered messages. This caused any later queued messages to be completely lost. * daemon/stream.c: Delay reuse of stream message until after it is removed from the queue --- daemon/stream.c | 20

[libvirt] ANNOUNCE: libvirt Perl bindings Sys::Virt 0.2.8 release

2011-06-30 Thread Daniel P. Berrange
I am happy to announce a new release[1] of the libvirt Perl bindings, Sys::Virt 0.2.8 is available for download: http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.2.8.tar.gz Changes in this release - Add all new APIs in libvirt 0.9.0 - Add examples for different ways of using

Re: [libvirt] [PATCH 0/3] Fix stream upload in new RPC code

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 12:29:48PM +0100, Daniel P. Berrange wrote: These patches do three small fixes to the RPC code in libvirtd to make sure stream upload works correctly again FYI, this was discovered validated using 6 test scripts I just added to the TCK to cover the different ways you

[libvirt] [PATCH] Fix leak of mdnsGroupName in virNetServer object

2011-06-30 Thread Daniel P. Berrange
* src/rpc/virnetserver.c: Free mdnsGroupName --- src/rpc/virnetserver.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index 8a2b113..0ef81fd 100644 --- a/src/rpc/virnetserver.c +++ b/src/rpc/virnetserver.c @@ -746,6

[libvirt] [PATCH] Fix leak of virStreamPtr object with callback added in fdstream impl

2011-06-30 Thread Daniel P. Berrange
When adding a callback to an FD stream, we take an extra reference on the virStreamPtr instance. We forgot to registered a free function with the callback, so when the callback was removed, the extra reference held on virStreamPtr was not released. * src/fdstream.c: Use a free callback to release

Re: [libvirt] libvirt-0.9.3 week freeze, RC2 version to test

2011-06-30 Thread Eric Blake
On 06/30/2011 12:04 AM, Wen Congyang wrote: At 06/30/2011 11:36 AM, Daniel Veillard Write: Following the changes done in the daemon and client code to use the new RPC implementation, and the large amount of patches and fixes since RC1 I have made a new release candidate RC2 based on current

Re: [libvirt] [Libvirt-announce] libvirt-0.9.3 week freeze, RC2 version to test

2011-06-30 Thread Eric Blake
On 06/30/2011 01:55 AM, Osier Yang wrote: 于 2011年06月30日 11:36, Daniel Veillard 写道: Following the changes done in the daemon and client code to use the new RPC implementation, and the large amount of patches and fixes since RC1 I have made a new release candidate RC2 based on current git.

Re: [libvirt] [PATCH] virsh: Fix a problem of buildPoolXML

2011-06-30 Thread Eric Blake
On 06/30/2011 03:23 AM, Osier Yang wrote: It doesn't generate name and format nodes for source even if they are explictly specified. This patch fixes it. s/explictly/explicitly/ --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCH] virsh: Fix a problem of buildPoolXML

2011-06-30 Thread Osier Yang
于 2011年06月30日 21:34, Eric Blake 写道: On 06/30/2011 03:23 AM, Osier Yang wrote: It doesn't generate name andformat nodes forsource even if they are explictly specified. This patch fixes it. s/explictly/explicitly/ --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [libvirt] [PATCH] storage: Fix problem of creating a volume in LVM pool

2011-06-30 Thread Osier Yang
于 2011年06月30日 18:22, Daniel P. Berrange 写道: On Thu, Jun 30, 2011 at 06:40:20PM +0800, Osier Yang wrote: LVM allows one specify the VG with VG path like /dev/lv_pool, and it gets the correct VG name internally by skipping /dev. snip vg_name = skip_dev_dir(cmd, argv[0], NULL); if

[libvirt] [PATCH] Fix leak of JSON object for events

2011-06-30 Thread Daniel P. Berrange
The event handler functions do not free the virJSONValuePtr object. Every event received from a VM thus caused a memory leak * src/qemu/qemu_monitor_json.c: Fix leak of event object --- src/qemu/qemu_monitor_json.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH] Fix potential crash when saving guests

2011-06-30 Thread Daniel P. Berrange
The qemudDomainSaveFlag method will call EndJob on the 'vm' object it is passed in. This can result in the 'vm' object being free'd if the last reference is removed. Thus no caller of 'qemudDomainSaveFlag' must *ever* reference 'vm' again upon return. Unfortunately qemudDomainSave and

[libvirt] [PATCH] Fix use of uninitialized memory when releasing PCI slots

2011-06-30 Thread Daniel P. Berrange
The 'function' field in the PCI address was not correctly initialized, so it was building the wrong address address string and so not removing all functions from the in use list. * src/qemu/qemu_command.c: Fix initialization of PCI function --- src/qemu/qemu_command.c |6 +++--- 1 files

[libvirt] [PATCH] Add test case for parsing JSON docs

2011-06-30 Thread Daniel P. Berrange
While investigating some memory leaks it was unclear whether the JSON code correctly free'd all memory during parsing. Add a test case which can be run under valgrind to clearly demonstrate that the parser is leak free. * tests/Makefile.am: Add 'jsontest' * tests/jsontest.c: A few simple JSON

[libvirt] [PATCH] Fix uninitialized value in QEMU monitor FD sending code

2011-06-30 Thread Daniel P. Berrange
The 'char control[CMSG_SPACE(sizeof(int))];' was not being wiped, so could potentially contain uninitialized bytes. While this was harmless in this case, it caused complaints from valgrind * src/qemu/qemu_monitor.c: memset 'control' variable in qemuMonitorIOWriteWithFD ---

[libvirt] [PATCH] Remove bogus warning message in JSON code

2011-06-30 Thread Daniel P. Berrange
* src/util/json.c: Remove warning message --- src/util/json.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/util/json.c b/src/util/json.c index 48521f2..a85f580 100644 --- a/src/util/json.c +++ b/src/util/json.c @@ -950,7 +950,6 @@ cleanup: if (parser.nstate)

[libvirt] [PATCH 3/4] rpc: avoid freeing uninitialized variable

2011-06-30 Thread Eric Blake
Detected by Coverity. Both are instances of bad things happening if pipe2 fails; the virNetClientNew failure could free garbage, and virNetSocketNewConnectCommand could close random fds. Note: POSIX doesn't guarantee the contents of fd[0] and fd[1] after pipe failure:

[libvirt] [PATCH 2/4] virsh: avoid uninitialized variable

2011-06-30 Thread Eric Blake
Detected by Coverity; neither vshCmddefHelp nor vshCmdOptParse was initializing opts_required. * tools/virsh.c (vshCmddefOptParse): Always initialize bitmaps. --- tools/virsh.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

[libvirt] [PATCH 0/4] several Coverity fixes

2011-06-30 Thread Eric Blake
I ran Coverity on the state of yesterday's git; while I have not finished reading through all the findings, I figured I'd get some review started on these. Eric Blake (4): virsh: avoid integer overflow virsh: avoid uninitialized variable rpc: avoid freeing uninitialized variable build:

[libvirt] [PATCH 1/4] virsh: avoid integer overflow

2011-06-30 Thread Eric Blake
Detected by Coverity. info.nrVirtCpu is unsigned short, but if cpumaplen is int, then the product of the two in vshMalloc risks unintended sign extension. cmdVcpuinfo had already solved this by using size_t cpumaplen. * tools/virsh.c (cmdVcpuPin): Use correct type. --- tools/virsh.c |2 +-

[libvirt] [PATCH 4/4] build: avoid double-close bug with pipe2

2011-06-30 Thread Eric Blake
Based on Coverity's finding on the previous patch, I audited gnulib's pipe2 code and found that we had the potential for a subtle double-close bug, unless gnulib guarantees that the contents of the fd array are unchanged on pipe2() failure. * .gnulib: Update to latest, for pipe2 fix. --- .gnulib

Re: [libvirt] [PATCH] Fix use of uninitialized memory when releasing PCI slots

2011-06-30 Thread Eric Blake
On 06/30/2011 08:09 AM, Daniel P. Berrange wrote: The 'function' field in the PCI address was not correctly initialized, so it was building the wrong address address string and so not removing all functions from the in use list. * src/qemu/qemu_command.c: Fix initialization of PCI function

Re: [libvirt] [PATCH] Fix leak of JSON object for events

2011-06-30 Thread Eric Blake
On 06/30/2011 08:10 AM, Daniel P. Berrange wrote: The event handler functions do not free the virJSONValuePtr object. Every event received from a VM thus caused a memory leak * src/qemu/qemu_monitor_json.c: Fix leak of event object --- src/qemu/qemu_monitor_json.c |5 ++--- 1 files

Re: [libvirt] [PATCH] Fix uninitialized value in QEMU monitor FD sending code

2011-06-30 Thread Eric Blake
On 06/30/2011 08:10 AM, Daniel P. Berrange wrote: The 'char control[CMSG_SPACE(sizeof(int))];' was not being wiped, so could potentially contain uninitialized bytes. While this was harmless in this case, it caused complaints from valgrind * src/qemu/qemu_monitor.c: memset 'control' variable

Re: [libvirt] [PATCH] Fix potential crash when saving guests

2011-06-30 Thread Eric Blake
On 06/30/2011 08:10 AM, Daniel P. Berrange wrote: The qemudDomainSaveFlag method will call EndJob on the 'vm' object it is passed in. This can result in the 'vm' object being free'd if the last reference is removed. Thus no caller of 'qemudDomainSaveFlag' must *ever* reference 'vm' again upon

Re: [libvirt] [PATCH] Remove bogus warning message in JSON code

2011-06-30 Thread Eric Blake
On 06/30/2011 08:09 AM, Daniel P. Berrange wrote: * src/util/json.c: Remove warning message --- src/util/json.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/util/json.c b/src/util/json.c index 48521f2..a85f580 100644 --- a/src/util/json.c +++

Re: [libvirt] [PATCH 3/4] rpc: avoid freeing uninitialized variable

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 08:14:55AM -0600, Eric Blake wrote: Detected by Coverity. Both are instances of bad things happening if pipe2 fails; the virNetClientNew failure could free garbage, and virNetSocketNewConnectCommand could close random fds. Note: POSIX doesn't guarantee the contents

Re: [libvirt] [PATCH 4/4] build: avoid double-close bug with pipe2

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 08:14:56AM -0600, Eric Blake wrote: Based on Coverity's finding on the previous patch, I audited gnulib's pipe2 code and found that we had the potential for a subtle double-close bug, unless gnulib guarantees that the contents of the fd array are unchanged on pipe2()

Re: [libvirt] [PATCH 2/4] virsh: avoid uninitialized variable

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 08:14:54AM -0600, Eric Blake wrote: Detected by Coverity; neither vshCmddefHelp nor vshCmdOptParse was initializing opts_required. * tools/virsh.c (vshCmddefOptParse): Always initialize bitmaps. --- tools/virsh.c |5 - 1 files changed, 4 insertions(+), 1

Re: [libvirt] [PATCH 1/4] virsh: avoid integer overflow

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 08:14:53AM -0600, Eric Blake wrote: Detected by Coverity. info.nrVirtCpu is unsigned short, but if cpumaplen is int, then the product of the two in vshMalloc risks unintended sign extension. cmdVcpuinfo had already solved this by using size_t cpumaplen. *

Re: [libvirt] [PATCH] Add test case for parsing JSON docs

2011-06-30 Thread Eric Blake
On 06/30/2011 08:10 AM, Daniel P. Berrange wrote: While investigating some memory leaks it was unclear whether the JSON code correctly free'd all memory during parsing. Add a test case which can be run under valgrind to clearly demonstrate that the parser is leak free. * tests/Makefile.am:

[libvirt] SIGTERM undeclared, virNetSocketFree

2011-06-30 Thread Jason Helfman
Hi, I get this error when compiling 0.9.3-rc2 on FreeBSD. Is there a fix for this? rpc/virnetsocket.c: In function 'virNetSocketFree': rpc/virnetsocket.c:654: warning: implicit declaration of function 'kill' rpc/virnetsocket.c:654: warning: nested extern declaration of 'kill' [-Wnested-externs]

Re: [libvirt] SIGTERM undeclared, virNetSocketFree

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 07:36:24AM -0700, Jason Helfman wrote: Hi, I get this error when compiling 0.9.3-rc2 on FreeBSD. Is there a fix for this? rpc/virnetsocket.c: In function 'virNetSocketFree': rpc/virnetsocket.c:654: warning: implicit declaration of function 'kill'

[libvirt] [PATCH] tests: Add valgrind.supp into EXTRA_DIST

2011-06-30 Thread Osier Yang
--- tests/Makefile.am |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7db9d1f..e6c5a5e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -74,7 +74,8 @@ EXTRA_DIST = \ xencapsdata \ xmconfigdata

Re: [libvirt] [PATCH] Fix leak of mdnsGroupName in virNetServer object

2011-06-30 Thread Eric Blake
On 06/30/2011 06:14 AM, Daniel P. Berrange wrote: * src/rpc/virnetserver.c: Free mdnsGroupName --- src/rpc/virnetserver.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index 8a2b113..0ef81fd 100644 ---

Re: [libvirt] [PATCH] Fix leak of virStreamPtr object with callback added in fdstream impl

2011-06-30 Thread Eric Blake
On 06/30/2011 06:14 AM, Daniel P. Berrange wrote: When adding a callback to an FD stream, we take an extra reference on the virStreamPtr instance. We forgot to registered a free function with the callback, so when the callback was removed, the extra reference held on virStreamPtr was not

Re: [libvirt] SIGTERM undeclared, virNetSocketFree

2011-06-30 Thread Eric Blake
On 06/30/2011 08:53 AM, Daniel P. Berrange wrote: On Thu, Jun 30, 2011 at 07:36:24AM -0700, Jason Helfman wrote: Hi, I get this error when compiling 0.9.3-rc2 on FreeBSD. Is there a fix for this? We're using 'kill' without explicitly including signal.h. I suspect we're lucky to get it

Re: [libvirt] [PATCH] tests: Add valgrind.supp into EXTRA_DIST

2011-06-30 Thread Eric Blake
On 06/30/2011 09:31 AM, Osier Yang wrote: --- tests/Makefile.am |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7db9d1f..e6c5a5e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -74,7 +74,8 @@ EXTRA_DIST =

Re: [libvirt] [PATCH 1/3] Fix hardcoded limit on client requests in RPC code

2011-06-30 Thread Eric Blake
On 06/30/2011 05:29 AM, Daniel P. Berrange wrote: The virNetServerClient object had a hardcoded limit of 10 requests per client. Extend constructor to allow it to be passed in as a configurable variable. Wire this up to the 'max_client_requests' config parameter in libvirtd *

Re: [libvirt] [PATCH 2/3] Ensure RPC message is cleared before being reused

2011-06-30 Thread Eric Blake
On 06/30/2011 05:29 AM, Daniel P. Berrange wrote: To save on memory reallocation, virNetMessage instances that have been transmitted, may be reused for a subsequent incoming message. We forgot to clear out the old data of the message fully, which caused later confusion upon read. *

Re: [libvirt] [PATCH 3/3] Fix release of filtered stream messages

2011-06-30 Thread Eric Blake
On 06/30/2011 05:29 AM, Daniel P. Berrange wrote: The stream code was reusing a stream message object before it was removed from the linked list of filtered messages. This caused any later queued messages to be completely lost. * daemon/stream.c: Delay reuse of stream message until after

Re: [libvirt] [PATCH] tests: Add valgrind.supp into EXTRA_DIST

2011-06-30 Thread Osier Yang
于 2011年06月30日 23:07, Eric Blake 写道: On 06/30/2011 09:31 AM, Osier Yang wrote: --- tests/Makefile.am |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7db9d1f..e6c5a5e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am

[libvirt] [PATCH] Fix stream procedure number for virDomainMigratePrepareTunnel3

2011-06-30 Thread Daniel P. Berrange
The virDomainMigratePrepareTunnel3 impl in the remote driver was using the procedure number for the virDomainMigratePrepareTunnel method. This doesn't work out so well, because it makes the server ignore drop all stream packets * src/remote/remote_driver.c: Fix procedure for PrepareTunnel3 ---

[libvirt] [PATCH] Fix release of virNetMessagePtr instances in streams processing

2011-06-30 Thread Daniel P. Berrange
If a message packet for a invalid stream is received it is just free'd. This is not good because it doesn't let the client RPC request counter decrement. If a stream is shutdown with pending packets the message also isn't released properly because of an incorrect header type * daemon/stream.c:

[libvirt] [PATCH] Send back an error if we get unexpected stream control message

2011-06-30 Thread Daniel P. Berrange
We ignore any stream data packets which come in for streams which are not registered, since these packets are async and do not have a reply. If we get a stream control packet though we must send back an actual error, otherwise a (broken) client may hang forever making it hard to diagnose the

Re: [libvirt] [PATCH] Fix release of virNetMessagePtr instances in streams processing

2011-06-30 Thread Eric Blake
On 06/30/2011 10:09 AM, Daniel P. Berrange wrote: If a message packet for a invalid stream is received it is just free'd. This is not good because it doesn't let the client RPC request counter decrement. If a stream is shutdown with pending packets the message also isn't released properly

Re: [libvirt] [PATCH] Send back an error if we get unexpected stream control message

2011-06-30 Thread Eric Blake
On 06/30/2011 10:10 AM, Daniel P. Berrange wrote: We ignore any stream data packets which come in for streams which are not registered, since these packets are async and do not have a reply. If we get a stream control packet though we must send back an actual error, otherwise a (broken) client

Re: [libvirt] [PATCH] Fix stream procedure number for virDomainMigratePrepareTunnel3

2011-06-30 Thread Eric Blake
On 06/30/2011 10:10 AM, Daniel P. Berrange wrote: The virDomainMigratePrepareTunnel3 impl in the remote driver was using the procedure number for the virDomainMigratePrepareTunnel method. This doesn't work out so well, because it makes the server ignore drop all stream packets *

Re: [libvirt] [PATCH] Fix stream procedure number for virDomainMigratePrepareTunnel3

2011-06-30 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 10:22:59AM -0600, Eric Blake wrote: On 06/30/2011 10:10 AM, Daniel P. Berrange wrote: The virDomainMigratePrepareTunnel3 impl in the remote driver was using the procedure number for the virDomainMigratePrepareTunnel method. This doesn't work out so well, because it

Re: [libvirt] SIGTERM undeclared, virNetSocketFree

2011-06-30 Thread Jason Helfman
On Thu, Jun 30, 2011 at 03:53:01PM +0100, Daniel P. Berrange thus spake: On Thu, Jun 30, 2011 at 07:36:24AM -0700, Jason Helfman wrote: Hi, I get this error when compiling 0.9.3-rc2 on FreeBSD. Is there a fix for this? rpc/virnetsocket.c: In function 'virNetSocketFree':

Re: [libvirt] SIGTERM undeclared, virNetSocketFree

2011-06-30 Thread Eduardo Otubo
On 06/30/2011 01:51 PM, Jason Helfman wrote: On Thu, Jun 30, 2011 at 03:53:01PM +0100, Daniel P. Berrange thus spake: On Thu, Jun 30, 2011 at 07:36:24AM -0700, Jason Helfman wrote: Hi, I get this error when compiling 0.9.3-rc2 on FreeBSD. Is there a fix for this? rpc/virnetsocket.c: In

[libvirt] [PATCH] Add conditionals to allow build without SASL

2011-06-30 Thread Daniel P. Berrange
* daemon/libvirtd.c, daemon/remote.c: Add #if HAVE_SASL and suitable function stubs to allow build without SASL --- daemon/libvirtd.c |6 ++ daemon/remote.c | 44 2 files changed, 50 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH] Add conditionals to allow build without SASL

2011-06-30 Thread Eric Blake
On 06/30/2011 11:18 AM, Daniel P. Berrange wrote: * daemon/libvirtd.c, daemon/remote.c: Add #if HAVE_SASL and suitable function stubs to allow build without SASL --- daemon/libvirtd.c |6 ++ daemon/remote.c | 44 2 files changed, 50

Re: [libvirt] [PATCH] Add conditionals to allow build without SASL

2011-06-30 Thread Matthias Bolte
2011/6/30 Daniel P. Berrange berra...@redhat.com: * daemon/libvirtd.c, daemon/remote.c: Add #if HAVE_SASL and  suitable function stubs to allow build without SASL ---  daemon/libvirtd.c |    6 ++  daemon/remote.c   |   44  2 files changed, 50

Re: [libvirt] [PATCH] Add conditionals to allow build without SASL

2011-06-30 Thread Jason Helfman
On Thu, Jun 30, 2011 at 06:18:43PM +0100, Daniel P. Berrange thus spake: * daemon/libvirtd.c, daemon/remote.c: Add #if HAVE_SASL and suitable function stubs to allow build without SASL --- daemon/libvirtd.c |6 ++ daemon/remote.c | 44 2

Re: [libvirt] [PATCH 4/4] build: avoid double-close bug with pipe2

2011-06-30 Thread Eric Blake
On 06/30/2011 08:24 AM, Daniel P. Berrange wrote: On Thu, Jun 30, 2011 at 08:14:56AM -0600, Eric Blake wrote: Based on Coverity's finding on the previous patch, I audited gnulib's pipe2 code and found that we had the potential for a subtle double-close bug, unless gnulib guarantees that the

Re: [libvirt] mingw: test-poll pipe part fails

2011-06-30 Thread Eric Blake
[adding libvirt] On 06/04/2011 12:24 AM, Paolo Bonzini wrote: On Sat, Jun 4, 2011 at 00:37, Matthias Bolte matthias.bo...@googlemail.com wrote: After testing a while and reading MSDN docs the problem seems to be that MsgWaitForMultipleObjects doesn't work on pipes. It doesn't actually wait

[libvirt] [PATCH] build: fix virBufferVasprintf on mingw

2011-06-30 Thread Eric Blake
Gnulib documents that mingw [v]snprintf is broken (it returns -1 on out-of-space, instead of the count of what would have been printed); but while we were using the snprintf wrapper, we had not yet been using the vsnprintf wrapper. * bootstrap.conf (gnulib_modules): Add vsnprintf. Reported by

[libvirt] [PATCHv2] build: consistently use CFLAGS

2011-06-30 Thread Eric Blake
According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled in automake 1.9.6) should only include -I, -D, and -U directives; more generic directives like -Wall belong in CFLAGS since they affect more phases of the build process. Therefore, we should be sticking CFLAGS additions into a

[libvirt] [PATCH] build: ignore generated file

2011-06-30 Thread Eric Blake
* .gitignore: Exempt jsontest binary. --- Pushing under the trivial rule. .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index be4193d..1bfb7b9 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ /tests/*.log /tests/cputest

[libvirt] [PATCHv3] build: allow 'make syntax-check' on fresh checkout

2011-06-30 Thread Eric Blake
For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front. * cfg.mk (sc_po_check): Add prerequisites. --- v3: also

Re: [libvirt] building error

2011-06-30 Thread Eric Blake
On 06/29/2011 06:13 PM, Wen Congyang wrote: This sounds highly related to Matthias' issue: https://www.redhat.com/archives/libvir-list/2011-June/msg01484.html Matthias was using 1.3... What version of systemtap headers and gcc are you using, that produce this error? I use RHEL6RC, and

Re: [libvirt] [PATCH] build: fix virBufferVasprintf on mingw

2011-06-30 Thread Eric Blake
On 06/30/2011 12:00 PM, Eric Blake wrote: Gnulib documents that mingw [v]snprintf is broken (it returns -1 on out-of-space, instead of the count of what would have been printed); but while we were using the snprintf wrapper, we had not yet been using the vsnprintf wrapper. * bootstrap.conf

Re: [libvirt] [PATCHv3] build: allow 'make syntax-check' on fresh checkout

2011-06-30 Thread Laine Stump
On 06/30/2011 04:55 PM, Eric Blake wrote: For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but this patch makes it work up front. * cfg.mk

[libvirt] [PATCH] build: remove dead variables

2011-06-30 Thread Eric Blake
Detected by Coverity. No real harm in leaving these, but fixing them cuts down on the noise for future analysis. * src/rpc/virnetserver.c (virNetServerAddService): Delete unused entry. * src/util/sysinfo.c (virSysinfoRead): Delete dead assignment to base. --- src/rpc/virnetserver.c |7

Re: [libvirt] [PATCHv3] build: allow 'make syntax-check' on fresh checkout

2011-06-30 Thread Eric Blake
On 06/30/2011 04:38 PM, Laine Stump wrote: On 06/30/2011 04:55 PM, Eric Blake wrote: For good or for bad, I did a fresh checkout, ./autogen.sh, then 'configure', then 'make syntax-check', and was surprised that it failed. Running 'make' before 'make syntax-check' cleaned up the issue, but

Re: [libvirt] [PATCHv2] build: simplify sanlock distribution

2011-06-30 Thread Laine Stump
On 06/29/2011 11:31 AM, Eric Blake wrote: EXTRA_DIST files should unconditionally be part of the tarball, rather than depending on the presence of sanlock-devel. Meanwhile, parallel builds could fail if we don't use mkdir -p. * src/Makefile.am (EXTRA_DIST): Always ship sanlock .aug and

Re: [libvirt] [PATCHv2] build: consistently use CFLAGS

2011-06-30 Thread Laine Stump
On 06/30/2011 02:09 PM, Eric Blake wrote: According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled in automake 1.9.6) should only include -I, -D, and -U directives; more generic directives like -Wall belong in CFLAGS since they affect more phases of the build process. Therefore, we

Re: [libvirt] [PATCHv2] build: consistently use CFLAGS

2011-06-30 Thread Laine Stump
On 06/30/2011 07:12 PM, Laine Stump wrote: On 06/30/2011 02:09 PM, Eric Blake wrote: According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled in automake 1.9.6) should only include -I, -D, and -U directives; more generic directives like -Wall belong in CFLAGS since they affect more

Re: [libvirt] [PATCHv2] build: consistently use CFLAGS

2011-06-30 Thread Eric Blake
On 06/30/2011 05:12 PM, Laine Stump wrote: On 06/30/2011 02:09 PM, Eric Blake wrote: According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled in automake 1.9.6) should only include -I, -D, and -U directives; more generic directives like -Wall belong in CFLAGS since they affect more

Re: [libvirt] [PATCH] build: remove dead variables

2011-06-30 Thread Laine Stump
On 06/30/2011 07:06 PM, Eric Blake wrote: Detected by Coverity. No real harm in leaving these, but fixing them cuts down on the noise for future analysis. * src/rpc/virnetserver.c (virNetServerAddService): Delete unused entry. * src/util/sysinfo.c (virSysinfoRead): Delete dead assignment to

Re: [libvirt] [PATCHv2] build: simplify sanlock distribution

2011-06-30 Thread Eric Blake
On 06/30/2011 05:09 PM, Laine Stump wrote: On 06/29/2011 11:31 AM, Eric Blake wrote: EXTRA_DIST files should unconditionally be part of the tarball, rather than depending on the presence of sanlock-devel. Meanwhile, parallel builds could fail if we don't use mkdir -p. * src/Makefile.am

[libvirt] [PATCH 1/4] libvirtd: avoid memory leak on OOM

2011-06-30 Thread Eric Blake
Detected by Coverity; only strikes on OOM so not serious. * daemon/libvirtd.c (daemonPidFilePath): Plug leak. --- daemon/libvirtd.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 60ee705..06d2077 100644 ---

[libvirt] [PATCH 2/4] interface: avoid memory leak on parse error

2011-06-30 Thread Eric Blake
Detected by Coverity. Unlikely to hit unless the file contents were corrupted. * src/util/interface.c (ifaceRestoreMacAddress): Plug leak. --- src/util/interface.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/util/interface.c b/src/util/interface.c index

[libvirt] [PATCH 4/4] pci: avoid memory leak on error

2011-06-30 Thread Eric Blake
Detected by Coverity. Some, but not all, error paths were clean; but they were repetitive so I refactored them. * src/util/pci.c (pciGetDevice): Plug leak. --- src/util/pci.c | 31 +++ 1 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/util/pci.c

[libvirt] [PATCH 3/4] rpc: avoid memory leak on error

2011-06-30 Thread Eric Blake
Detected by Coverity. The leak is on an error path, but I'm not sure whether that path is likely to be triggered in practice. * src/rpc/virnetserverservice.c (virNetServerServiceAccept): Plug leak. --- src/rpc/virnetserverservice.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-)

Re: [libvirt] [PATCHv2] build: consistently use CFLAGS

2011-06-30 Thread Laine Stump
On 06/30/2011 07:29 PM, Laine Stump wrote: On 06/30/2011 07:12 PM, Laine Stump wrote: On 06/30/2011 02:09 PM, Eric Blake wrote: According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled in automake 1.9.6) should only include -I, -D, and -U directives; more generic directives like

Re: [libvirt] [PATCH 2/4] interface: avoid memory leak on parse error

2011-06-30 Thread Wen Congyang
At 07/01/2011 07:36 AM, Eric Blake Write: Detected by Coverity. Unlikely to hit unless the file contents were corrupted. * src/util/interface.c (ifaceRestoreMacAddress): Plug leak. --- src/util/interface.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

  1   2   >