[libvirt] [PATCH] openvz: read vmguarpages/privvmpages to set memory tunables [v2]

2012-04-27 Thread Guido Günther
--- This is a reworked version of the patch already sent, now adding handling for unlimited (represented by LONG_MAX in openvz) as well as a schema testcase. I also switched all value to unsigned long long to avoid overflows. Note that privvmpages is the amount of memory available to the

Re: [libvirt] libvirt stable releases

2012-04-27 Thread Daniel P. Berrange
On Thu, Apr 26, 2012 at 01:12:58PM -0600, Eric Blake wrote: On 04/26/2012 12:39 PM, Cole Robinson wrote: Hi all, An idea we've kicked around for awhile in Red Hat/Fedora land is doing official libvirt stable releases, but nothing ever took shape. The idea was brought up again recently

Re: [libvirt] libvirt stable releases

2012-04-27 Thread Daniel P. Berrange
On Thu, Apr 26, 2012 at 02:39:14PM -0400, Cole Robinson wrote: Hi all, An idea we've kicked around for awhile in Red Hat/Fedora land is doing official libvirt stable releases, but nothing ever took shape. The idea was brought up again recently and I've offered to help get something going.

[libvirt] How to disconnect a NIC

2012-04-27 Thread Hendrik Schwartke
Hi, some time ago I wrote I patch to change the source bridge of a running domain. Now I'm wondering what's the best way to disconnect a NIC. My first thought was to set virDomainNetDef.data.bridge.brname to NULL. There are quite some places in the code that had to be modified to support

[libvirt] [PATCHv3] show `vcpu usages' by `virt-top -1'

2012-04-27 Thread Hu Tao
Before this patch, `virt-top -1' shows total cpu usages which euqal to `vcpu usages' + `hypervisor usages'. This patch adds another column for domains showing `vcpu usages'. An example is: PHYCPU %CPU example_domain 0 10.4 10.4 0.8 11.6 1.6 1.4 22.6 2.6 2.6 30.0

[libvirt] [PATCHv3 1/2] add parameter flags to D.get_cpu_stats()

2012-04-27 Thread Hu Tao
--- examples/get_cpu_stats.ml |2 +- libvirt/libvirt.ml |6 +- libvirt/libvirt.mli |6 +- libvirt/libvirt_c_oneoffs.c | 21 + 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/examples/get_cpu_stats.ml

[libvirt] [PATCHv3 2/2] refactor Libvirt.Domain.get_cpu_stats

2012-04-27 Thread Hu Tao
Remove parameter nr_pcpus. Add another parameter total of type bool to indicate wheter to get total cpu statistic or per_cpu statistics. --- examples/get_cpu_stats.ml | 50 ++-- libvirt/libvirt.ml |2 +- libvirt/libvirt.mli |2 +-

[libvirt] [PATCH v2 2/2] bsd-user: Output package version

2012-04-27 Thread Andreas Färber
Commit 4a19f1eced611e7c3a0fba07d13515cbc73da09f (r7036) added a configure option --with-pkgversion for distributions and forks to label their derived versions. bsd-user was not updated at the time, so fix this while at it. Signed-off-by: Andreas Färber afaer...@suse.de --- bsd-user/main.c |

[libvirt] [PATCH v2 0/2] QEMU copyright update

2012-04-27 Thread Andreas Färber
Hello, For 1.0 I had brought up the issue that the copyright statement reads 2008. Mentor Graphics have solved this for their Sourcery CodeBench fork by printing: Copyright (c) 2003-2008 Fabrice Bellard, 2008-2011 Mentor Graphics For the QEMU community it's less clear whom to assign the

[libvirt] [PATCH v2 1/2] Update copyright banners

2012-04-27 Thread Andreas Färber
The copyright statements printed by the various executables have not been touched since r3893 / 68d0f70e3c180253b637996f985dd9d248bd910a. So, judging by -version output, a user could get the impression that QEMU was last modified in 2008. We should therefore update it to the current year. However

Re: [libvirt] [PATCH 1/2] qemu: Use common helper when probing qemu capabilities

2012-04-27 Thread Jiri Denemark
On Thu, Apr 26, 2012 at 10:42:36 -0600, Eric Blake wrote: On 04/26/2012 08:28 AM, Jiri Denemark wrote: QEMU binary is called several times when we probe different kinds of capabilities the binary supports. This patch introduces new common helper so that all probes use a consistent way of

Re: [libvirt] [Qemu-devel] [PATCH v2 1/2] Update copyright banners

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 27, 2012 at 12:08:14PM +0200, Andreas Färber wrote: The copyright statements printed by the various executables have not been touched since r3893 / 68d0f70e3c180253b637996f985dd9d248bd910a. So, judging by -version output, a user could get the impression that QEMU was last modified

Re: [libvirt] [PATCH 2/2] nwfilter: address more coverity findings

2012-04-27 Thread Stefan Berger
On 04/26/2012 04:35 PM, Eric Blake wrote: And again, this should be: VIR_ERROR(_(Lookup of value at index %u resulted in a NULL pointer), cie-curValue); ACK with those fixes; I'm okay if you push without posting a v2. Pushed this series. -- libvir-list mailing list

Re: [libvirt] [PATCH 2/2] [TCK] nwfilter: Add test cases for ipset

2012-04-27 Thread Stefan Berger
On 04/26/2012 05:13 PM, Eric Blake wrote: On 04/23/2012 06:20 AM, Stefan Berger wrote: + if [ -n ${cmd} ]; then +eval ${cmd} 21 1/dev/null This says output any errors from command to our stdout, and to ignore normal output of $cmd. Is that what you meant, or did you want to ignore both

[libvirt] [PATCH v2] [TCK] nwfilter: Add test cases for ipset

2012-04-27 Thread Stefan Berger
Add test cases for ipset support. Since ipset may not be available on all system, the first line of the XML file containing the test filter has been extended with a specially formatted XML comment containing a command line test for whether the test case can be run at all. The format of that line

Re: [libvirt] [libvirt-glib 1/5] Make GVirConfigDomainTimer abstract

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 13, 2012 at 05:20:14PM +0200, Christophe Fergeau wrote: Specialized timer classes will inherit from it --- libvirt-gconfig/libvirt-gconfig-domain-timer.c | 22 +- libvirt-gconfig/libvirt-gconfig-domain-timer.h |4 libvirt-gconfig/libvirt-gconfig.sym

Re: [libvirt] [libvirt-glib 2/5] Implement gvir_config_domain_timer_[gs]et_tick_policy

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 13, 2012 at 05:20:15PM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain-timer.c | 26 libvirt-gconfig/libvirt-gconfig-domain-timer.h |9 libvirt-gconfig/libvirt-gconfig.sym|3 +++ 3 files

Re: [libvirt] [libvirt-glib 3/5] Implement gvir_config_domain_clock_add_timer

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 13, 2012 at 05:20:16PM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain-clock.c | 10 ++ libvirt-gconfig/libvirt-gconfig-domain-clock.h |4 libvirt-gconfig/libvirt-gconfig.sym|1 + 3 files changed, 15 insertions(+)

Re: [libvirt] [libvirt-glib 5/5] Add GVirConfigDomainTimerPit class

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 13, 2012 at 05:20:18PM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/Makefile.am|2 + libvirt-gconfig/libvirt-gconfig-domain-timer-pit.c | 72 libvirt-gconfig/libvirt-gconfig-domain-timer-pit.h | 67 ++

Re: [libvirt] [libvirt-glib 4/5] Add GVirConfigDomainTimerRtc class

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 13, 2012 at 05:20:17PM +0200, Christophe Fergeau wrote: --- libvirt-gconfig/Makefile.am|2 + libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.c | 72 libvirt-gconfig/libvirt-gconfig-domain-timer-rtc.h | 67 ++

Re: [libvirt] [PATCH 2/2] [TCK] nwfilter: Add test cases for ipset

2012-04-27 Thread Eric Blake
On 04/27/2012 05:12 AM, Stefan Berger wrote: On 04/26/2012 05:13 PM, Eric Blake wrote: On 04/23/2012 06:20 AM, Stefan Berger wrote: + if [ -n ${cmd} ]; then +eval ${cmd} 21 1/dev/null This says output any errors from command to our stdout, and to ignore normal output of $cmd. Is that

Re: [libvirt] [PATCHv2] blockjob: fix block-stream bandwidth race

2012-04-27 Thread Jiri Denemark
On Thu, Apr 26, 2012 at 13:08:36 -0600, Eric Blake wrote: With RHEL 6.2, virDomainBlockPull(dom, dev, bandwidth, 0) has a race with non-zero bandwidth: there is a window between the block_stream and block_job_set_speed monitor commands where an unlimited amount of data was let through,

[libvirt] [PATCH 0/2] Rework RPC message buffer

2012-04-27 Thread Michal Privoznik
This patch set tries to fix corner cases where libvirt runs on huge system, e.g. 4K CPU monster. In these cases, capabilities XML is enormously big, as we are transferring info about each singe CPU core (to which NUMA node it belongs, etc.). This XML is bigger than our RPC limit, therefore users

[libvirt] [PATCH 1/2] rpc: Switch to dynamically allocated message buffer

2012-04-27 Thread Michal Privoznik
Currently, we are allocating buffer for RPC messages statically. This is not such pain when RPC limits are small. However, if we want ever to increase those limits, we need to allocate buffer dynamically, based on RPC message len (= the first 4 bytes). Therefore we will decrease our mem usage in

[libvirt] [PATCH 2/2] rpc: Size up RPC limits

2012-04-27 Thread Michal Privoznik
Since we are allocating RPC buffer dynamically, we can increase limits for max. size of RPC message and RPC string. This is needed to cover some corner cases where libvirt is run on such huge machines that their capabilities XML is 4 times bigger than our current limit. This leaves users with

Re: [libvirt] [PATCH v2] [TCK] nwfilter: Add test cases for ipset

2012-04-27 Thread Eric Blake
On 04/27/2012 05:25 AM, Stefan Berger wrote: Add test cases for ipset support. Since ipset may not be available on all system, the first line of the XML file containing the test filter has been extended with a specially formatted XML comment containing a command line test for whether the

Re: [libvirt] [libvirt-TCK][PATCH] use 'raw' format as the format of backing file of qcow2 image

2012-04-27 Thread Eric Blake
On 04/26/2012 10:26 PM, Guannan Ren wrote: On 04/27/2012 05:15 AM, Eric Blake wrote: On 02/28/2012 03:38 AM, Guannan Ren wrote: If we don't explicitly specify the format of backing file, it should use raw by default, if so, libvirt's security drivers should *not* grant

[libvirt] [PATCH] qemu: Make sure qemu can access its directory in hugetlbfs

2012-04-27 Thread Jiri Denemark
When libvirtd is started, we create libvirt/qemu directories under hugetlbfs mount point. Only the qemu subdirectory is chowned to qemu user and libvirt remains owned by root. If umask was too restrictive when libvirtd started, qemu user may lose access to qemu subdirectory. Let's explicitly grant

[libvirt] Memory leak due to virCopyError()

2012-04-27 Thread Stefan Berger
If someone has the time ... I am seeing a memory leak in this code path. The leak seems to be triggerable by shutting down a VM: ==4717== 40 bytes in 1 blocks are definitely lost in loss record 547 of 1,014 ==4717==at 0x4A05E46: malloc (vg_replace_malloc.c:195) ==4717==by

Re: [libvirt] [PATCH V13 2/5] nwfilter: add DHCP snooping

2012-04-27 Thread Stefan Berger
On 04/25/2012 08:59 AM, Stefan Berger wrote: + +/* + * Create a new Snoop request. Initialize it with the given + * interface key. The caller must release the request with a call + * to virNWFilerSnoopReqPut(req). + */ +static virNWFilterSnoopReqPtr +virNWFilterSnoopReqNew(const char *ifkey) +{

[libvirt] [PATCH] lxc: Fix coverity findings

2012-04-27 Thread Stefan Berger
Fix lxc related coverity findings... Error: UNINIT: /libvirt/src/lxc/lxc_driver.c:1412: var_decl: Declaring variable fd without initializer. /libvirt/src/lxc/lxc_driver.c:1460: uninit_use_in_call: Using uninitialized value fd when calling virFileClose. /libvirt/src/util/virfile.c:50:

Re: [libvirt] [PATCH] lxc: Fix coverity findings

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 27, 2012 at 12:30:10PM -0400, Stefan Berger wrote: Fix lxc related coverity findings... Error: UNINIT: /libvirt/src/lxc/lxc_driver.c:1412: var_decl: Declaring variable fd without initializer. /libvirt/src/lxc/lxc_driver.c:1460: uninit_use_in_call: Using uninitialized value fd

[libvirt] [PATCH] configure: Use ustar format for dist tarball

2012-04-27 Thread Cole Robinson
Since for stable releases, some test files were over the 99 char limit for traditional tar filenames. Suggested by Osier here: https://www.redhat.com/archives/libvir-list/2012-April/msg01435.html Signed-off-by: Cole Robinson crobi...@redhat.com --- configure.ac |2 +- 1 files changed, 1

[libvirt] [PATCH] python: Fix doc directory name for stable releases

2012-04-27 Thread Cole Robinson
We were using the libvirt release version (like 0.9.11) and not the configure version (which for stable releases is 0.9.11.X) Most other places got this right so hopefully that's all the fallout from the version format change :) Signed-off-by: Cole Robinson crobi...@redhat.com ---

[libvirt] [PATCH] docs: Serialize running apibuild.py

2012-04-27 Thread Cole Robinson
Use a witness file approach like we do for python/generator.py, as suggested by Eric. Fixes the build issue reported here: https://www.redhat.com/archives/libvir-list/2012-April/msg01435.html Signed-off-by: Cole Robinson crobi...@redhat.com --- .gitignore |1 + docs/Makefile.am | 12

Re: [libvirt] [PATCH] configure: Use ustar format for dist tarball

2012-04-27 Thread Daniel P. Berrange
On Fri, Apr 27, 2012 at 12:59:45PM -0400, Cole Robinson wrote: Since for stable releases, some test files were over the 99 char limit for traditional tar filenames. Suggested by Osier here: https://www.redhat.com/archives/libvir-list/2012-April/msg01435.html Signed-off-by: Cole Robinson

[libvirt] [ANNOUNCE] libvirt-glib 0.0.8 release

2012-04-27 Thread Daniel P. Berrange
am pleased to announce that a new release of the libvirt-glib package, version 0.0.8 is now available from ftp://libvirt.org/libvirt/glib/ The packages are GPG signed with Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R) New in this release: - Fix build of

Re: [libvirt] [PATCH] configure: Use ustar format for dist tarball

2012-04-27 Thread Eric Blake
On 04/27/2012 11:02 AM, Daniel P. Berrange wrote: On Fri, Apr 27, 2012 at 12:59:45PM -0400, Cole Robinson wrote: Since for stable releases, some test files were over the 99 char limit for traditional tar filenames. Suggested by Osier here:

Re: [libvirt] [PATCH] docs: Serialize running apibuild.py

2012-04-27 Thread Eric Blake
On 04/27/2012 10:59 AM, Cole Robinson wrote: Use a witness file approach like we do for python/generator.py, as suggested by Eric. Fixes the build issue reported here: https://www.redhat.com/archives/libvir-list/2012-April/msg01435.html Signed-off-by: Cole Robinson crobi...@redhat.com ---

Re: [libvirt] [PATCH] python: Fix doc directory name for stable releases

2012-04-27 Thread Eric Blake
On 04/27/2012 10:59 AM, Cole Robinson wrote: We were using the libvirt release version (like 0.9.11) and not the configure version (which for stable releases is 0.9.11.X) Most other places got this right so hopefully that's all the fallout from the version format change :) Signed-off-by:

Re: [libvirt] [PATCH] python: Fix doc directory name for stable releases

2012-04-27 Thread Cole Robinson
On 04/27/2012 02:06 PM, Eric Blake wrote: On 04/27/2012 10:59 AM, Cole Robinson wrote: We were using the libvirt release version (like 0.9.11) and not the configure version (which for stable releases is 0.9.11.X) Most other places got this right so hopefully that's all the fallout from the

[libvirt] [PATCH] More coverity findings addressed

2012-04-27 Thread Stefan Berger
More bug extermination in the category of: Error: CHECKED_RETURN: /libvirt/src/conf/network_conf.c:595: check_return: Calling function virAsprintf without checking return value (as is done elsewhere 515 out of 543 times). /libvirt/src/qemu/qemu_process.c:2780: unchecked_value: No check of

Re: [libvirt] [PATCH] More coverity findings addressed

2012-04-27 Thread Eric Blake
On 04/27/2012 12:34 PM, Stefan Berger wrote: More bug extermination in the category of: Error: CHECKED_RETURN: One note about the error in commandtest line 809: setsid() seems to fail when running the test -- could be removed ? Odd. I think we had to add it to make the test pass under

Re: [libvirt] [PATCHv2] blockjob: fix block-stream bandwidth race

2012-04-27 Thread Eric Blake
On 04/27/2012 06:37 AM, Jiri Denemark wrote: On Thu, Apr 26, 2012 at 13:08:36 -0600, Eric Blake wrote: With RHEL 6.2, virDomainBlockPull(dom, dev, bandwidth, 0) has a race with non-zero bandwidth: there is a window between the block_stream and block_job_set_speed monitor commands where an

[libvirt] [PATCHv6 10/8] blockjob: check for active vm before checking blockcopy bits

2012-04-27 Thread Eric Blake
Similar to 8e532d3, but for block copy. * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Avoid misleading error. --- v6: new patch; although it might be worth squashing this into 6/8 when upstream qemu ever adds 'drive-mirror' src/qemu/qemu_driver.c |5 + 1 files changed, 5

Re: [libvirt] libvirt stable releases

2012-04-27 Thread Cole Robinson
On 04/27/2012 04:18 AM, Daniel P. Berrange wrote: On Thu, Apr 26, 2012 at 02:39:14PM -0400, Cole Robinson wrote: Hi all, An idea we've kicked around for awhile in Red Hat/Fedora land is doing official libvirt stable releases, but nothing ever took shape. The idea was brought up again

Re: [libvirt] [PATCH] More coverity findings addressed

2012-04-27 Thread Stefan Berger
On 04/27/2012 03:17 PM, Eric Blake wrote: On 04/27/2012 12:34 PM, Stefan Berger wrote: More bug extermination in the category of: Error: CHECKED_RETURN: Maybe worth logging a warning if we see the failure, but since this is test code, I'm also okay if we just ignore it (as long as the test

Re: [libvirt] [PATCH] More coverity findings addressed

2012-04-27 Thread Laine Stump
On 04/27/2012 03:17 PM, Eric Blake wrote: On 04/27/2012 12:34 PM, Stefan Berger wrote: One note about the error in commandtest line 809: setsid() seems to fail when running the test -- could be removed ? Odd. I think we had to add it to make the test pass under some situations, so I don't

Re: [libvirt] [PATCH] docs: Serialize running apibuild.py

2012-04-27 Thread Laine Stump
On 04/27/2012 12:59 PM, Cole Robinson wrote: Use a witness file approach like we do for python/generator.py, as suggested by Eric. Fixes the build issue reported here: https://www.redhat.com/archives/libvir-list/2012-April/msg01435.html I think you're referencing the wrong message here. The

Re: [libvirt] Schedule for next release libvirt-0.9.12

2012-04-27 Thread Daniel Veillard
On Fri, Apr 20, 2012 at 05:22:29PM +0800, Daniel Veillard wrote: Assuming we try to stay on a monthly schedule, then I would suggest to enter the freeze around next Friday (27th April) and shoot for a release around the 4th of May. I'm supposed to be in vacation most of next week, but I