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

2011-07-01 Thread Paolo Bonzini
On 06/30/2011 07:56 PM, Eric Blake wrote: Yes, Windows pipes are that broken.:( Using socketpair is a possibly good idea, but I would do it on libvirtd only. I don't know exactly how libvirtd uses this pipe, but perhaps it can be changed to an eventfd-like abstraction that can be

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Daniel Veillard
On Mon, Jun 27, 2011 at 09:29:34AM -0700, Jason Helfman wrote: Hi, On Thu, Jun 09, 2011 at 08:55:01PM +0800, Daniel Veillard thus spake: On Wed, Jun 08, 2011 at 07:44:43AM -0700, Jason Helfman wrote: On Tue, Jun 07, 2011 at 11:08:02PM -0700, Jason Helfman wrote: I found the issue in

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-07-01 Thread Michal Privoznik
On 27.06.2011 19:37, Christian Benvenuti (benve) wrote: -Original Message- From: Michal Privoznik [mailto:mpriv...@redhat.com] Sent: Monday, June 27, 2011 8:34 AM To: Christian Benvenuti (benve) Cc: Laine Stump; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH 0/7] Add support

[libvirt] [PATCH] fix the failure of nodedev-reattach caused by the variables from nodedev-attach

2011-07-01 Thread Guannan Ren
the virsh nodedev-reattch command could return successfully, but the pci device is still bound to pci-stub driver. The reason is noddev-reattach trys to use the variables set by nodedev-dettach commands. Becuase these variables is not persistent, this is not we expected. the patch try to fix

[libvirt] [PATCH] kill vm if saving config failed in v3 protocol

2011-07-01 Thread Wen Congyang
If virDomainSaveConfig() failed, we will return NULL to source, and the vm is still available to restart during confirm() step in v3 protocol. So we should kill it off in qemuMigrationFinish(). In v2 protocol, we should not set vm to NULL, because we hold a reference of vm and should unrefernce

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

2011-07-01 Thread Matthias Bolte
2011/6/30 Eric Blake ebl...@redhat.com: 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

[libvirt] [PATCH] fix virParseVersionString with linux 3.0

2011-07-01 Thread Scott Moser
linux 3.0 has no micro version number, and that is causing problems for virParseVersionString. The patch below should allow for: major major.minor major.minor.micro If major or minor are not present they just default to zero. We found this in Ubuntu (https://bugs.launchpad.net/bugs/802977)

[libvirt] PPPoE-Server problem

2011-07-01 Thread B Veera-B37207
HI, I am using Libvirt with LXC as hypervisor. When I am starting pppoe-server , unable to create ppp0 interface in Virtual machine, it is unable to serve ips to clients. Let me know is there any plug-in for this (Or) What is the solution. Regards, Veera. -- libvir-list mailing list

Re: [libvirt] [Libvirt-test-API][PATCH 5/6] add migration testing configuration file to cases

2011-07-01 Thread Nan Zhang
On 06/28/2011 01:54 PM, Guannan.ren wrote: --- cases/migrate.conf | 97 1 files changed, 97 insertions(+), 0 deletions(-) create mode 100644 cases/migrate.conf diff --git a/cases/migrate.conf b/cases/migrate.conf new file mode 100644

Re: [libvirt] [Libvirt-test-API][PATCH 6/6] add target_machine variable and login name with root default and password variable into env.cfg

2011-07-01 Thread Nan Zhang
On 06/28/2011 01:54 PM, Guannan.ren wrote: --- env.cfg |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/env.cfg b/env.cfg index e1237de..b5e404a 100644 --- a/env.cfg +++ b/env.cfg @@ -135,3 +135,9 @@ testnic = eth1 # a PCI device to use for attach/detach/reset

Re: [libvirt] [Libvirt-test-API][PATCH 4/6] add migrate.py testcases based on Daniel Berrage's migration testing scenarios

2011-07-01 Thread Nan Zhang
On 06/28/2011 01:54 PM, Guannan.ren wrote: --- repos/domain/migrate.py | 335 +++ 1 files changed, 335 insertions(+), 0 deletions(-) create mode 100644 repos/domain/migrate.py diff --git a/repos/domain/migrate.py b/repos/domain/migrate.py new

Re: [libvirt] [PATCH] fix virParseVersionString with linux 3.0

2011-07-01 Thread Matthias Bolte
2011/7/1 Scott Moser smo...@ubuntu.com: linux 3.0 has no micro version number, and that is causing problems for virParseVersionString.  The patch below should allow for:  major  major.minor  major.minor.micro If major or minor are not present they just default to zero. We found this in

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

2011-07-01 Thread Eric Blake
[adding bug-gnulib, bug-gnu-libiconv] On 07/01/2011 04:50 AM, Matthias Bolte wrote: 2011/6/30 Eric Blake ebl...@redhat.com: 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

Re: [libvirt] [PATCH] fix virParseVersionString with linux 3.0

2011-07-01 Thread Eric Blake
On 07/01/2011 07:00 AM, Matthias Bolte wrote: 2011/7/1 Scott Moser smo...@ubuntu.com: linux 3.0 has no micro version number, and that is causing problems for virParseVersionString. The patch below should allow for: major major.minor major.minor.micro If major or minor are not present

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

2011-07-01 Thread Eric Blake
On 06/30/2011 05:30 PM, Laine Stump wrote: 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

Re: [libvirt] [PATCH] fix virParseVersionString with linux 3.0

2011-07-01 Thread Eric Blake
On 07/01/2011 04:40 AM, Scott Moser wrote: linux 3.0 has no micro version number, and that is causing problems for virParseVersionString. The patch below should allow for: major major.minor major.minor.micro If major or minor are not present they just default to zero. We found this

[libvirt] [PATCH] util: choose whether to require micro in version strings

2011-07-01 Thread Eric Blake
To avoid regressions, we let callers specify whether to require a micro version. Callers that were parsing uname() output benefit from the defaults, whereas callers that were parsing version strings from other sources should not change in behavior. * src/util/util.c (virParseVersionString):

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

2011-07-01 Thread Eric Blake
On 07/01/2011 07:06 AM, Eric Blake wrote: Why is libintl's [v]snprintf broken on mingw? Even if libintl is compiled against an older mingw where there is no mingw snprintf replacement, it seems like libintl should be honoring the correct return values. It is because libintl on mingw is

[libvirt] [PATCH] monitor-proxy: Tool for testing qemu monitor interaction

2011-07-01 Thread Jiri Denemark
It has two modes, normal and interactive. In normal mode, messages are passed from libvirt to qemu and back as they come and copyied to stdout so that one can monitor the communication. In interactive mode, whenever a message comes from either libvirt or qemu, it is printed to stdout and the

Re: [libvirt] [PATCH] monitor-proxy: Tool for testing qemu monitor interaction

2011-07-01 Thread Eric Blake
On 07/01/2011 08:07 AM, Jiri Denemark wrote: It has two modes, normal and interactive. In normal mode, messages are passed from libvirt to qemu and back as they come and copyied to stdout so that one can monitor the communication. Cool! But post-0.9.3, so I haven't reviewed the patch itself

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Eric Blake
On 07/01/2011 01:08 AM, Daniel Veillard wrote: another way would be to launch python directly giving the path to the python script, this is likely to solve the issue there. I was wondering if this issue was addressed in the upcoming release? Oops, no but it should be as simple as the

Re: [libvirt] building error

2011-07-01 Thread Eric Blake
On 06/30/2011 08:34 PM, Wen Congyang wrote: # rpm -qa 'systemtap*' systemtap-sdt-devel-1.2-9.el6.x86_64 What does STAP_PROBE3 look like in your /usr/include/sys/sdt.h? #if ! defined EXPERIMENTAL_KPROBE_SDT #define STAP_PROBE3_(probe,label,parm1,parm2,parm3) \ do

Re: [libvirt] [PATCH] fix the failure of nodedev-reattach caused by the variables from nodedev-attach

2011-07-01 Thread ghostwcy
At 2011-7-1 18:24, Guannan Ren write: the virsh nodedev-reattch command could return successfully, but the pci device is still bound to pci-stub driver. The reason is noddev-reattach trys to use the variables set by nodedev-dettach commands. Becuase these variables is not persistent, this is

Re: [libvirt] building error

2011-07-01 Thread Eric Blake
On 07/01/2011 09:04 AM, Eric Blake wrote: And if we really are dealing with a macro that broken, then I'm entirely in favor of fixing our definition of PROBE to do the casting in advance, rather than making all PROBE callers worry about broken sys/sdt.h. Yuck - we defined PROBE as a var-arg

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Daniel Veillard
On Fri, Jul 01, 2011 at 08:57:35AM -0600, Eric Blake wrote: On 07/01/2011 01:08 AM, Daniel Veillard wrote: another way would be to launch python directly giving the path to the python script, this is likely to solve the issue there. I was wondering if this issue was addressed in the

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

2011-07-01 Thread Eric Blake
On 07/01/2011 07:50 AM, Eric Blake wrote: But now we have a problem - if gnulib did _not_ replace snprintf because it probed the mingw version and found that the return value was correct, then the libintl override violates gnulib's assumptions. If gnulib _does_ replace snprintf, but does not

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

2011-07-01 Thread Eric Blake
On 06/30/2011 05:51 PM, Laine Stump wrote: ACK. I spoke too soon - this patch causes /usr/include/libxml2 to be lost from the include path, which breaks the build. Okay, I found the problem. ACK with the following patch squashed in. (I checked all the other ..._CFLAGS in this particular

Re: [libvirt] [PATCH] util: choose whether to require micro in version strings

2011-07-01 Thread Eric Blake
On 07/01/2011 07:25 AM, Eric Blake wrote: To avoid regressions, we let callers specify whether to require a micro version. Callers that were parsing uname() output benefit from the defaults, whereas callers that were parsing version strings from other sources should not change in behavior.

Re: [libvirt] [PATCH] util: choose whether to require micro in version strings

2011-07-01 Thread Eric Blake
On 07/01/2011 10:54 AM, Eric Blake wrote: +++ w/src/util/util.c @@ -1619,6 +1619,9 @@ virParseVersionString(const char *str, unsigned long *version, if ((*tmp == '.') virStrToLong_ui(tmp + 1, tmp, 10, micro) 0) return -1; +if (major ULONG_MAX / 100 || minor 999 ||

[libvirt] [PATCHv3] util: choose whether to require micro in version strings

2011-07-01 Thread Eric Blake
To avoid regressions, we let callers specify whether to require a micro version. Callers that were parsing uname() output benefit from the defaults, whereas callers that were parsing version strings from other sources should not change in behavior. * src/util/util.c (virParseVersionString):

Re: [libvirt] [PATCHv3] util: choose whether to require micro in version strings

2011-07-01 Thread Matthias Bolte
2011/7/1 Eric Blake ebl...@redhat.com: To avoid regressions, we let callers specify whether to require a micro version.  Callers that were parsing uname() output benefit Actually this affects minor and micro. from the defaults, whereas callers that were parsing version strings from other

Re: [libvirt] [PATCHv3] util: choose whether to require micro in version strings

2011-07-01 Thread Eric Blake
On 07/01/2011 11:12 AM, Matthias Bolte wrote: 2011/7/1 Eric Blake ebl...@redhat.com: To avoid regressions, we let callers specify whether to require a micro version. Callers that were parsing uname() output benefit Actually this affects minor and micro. from the defaults, whereas callers

[libvirt] [PATCH] tests: Add a general util test

2011-07-01 Thread Matthias Bolte
Move non-esx specific tests from esxutilstest there and add a test for virParseVersionString. --- tests/.gitignore |1 + tests/Makefile.am|8 ++- tests/esxutilstest.c | 70 tests/utiltest.c | 178 ++ 4

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

2011-07-01 Thread Eric Blake
On 07/01/2011 11:52 AM, Eric Blake wrote: * .gnulib: Update to latest, for vsnprintf fix. * bootstrap.conf (gnulib_modules): Add vsnprintf. This patch cannot be applied until commit d1776f5 goes into upstream gnulib (possibly under a different commit id); but you can test it now in order

Re: [libvirt] [PATCH] tests: Add a general util test

2011-07-01 Thread Matthias Bolte
2011/7/1 Eric Blake ebl...@redhat.com: On 07/01/2011 11:59 AM, Matthias Bolte wrote: Move non-esx specific tests from esxutilstest there and add a test for virParseVersionString. ---  tests/.gitignore     |    1 +  tests/Makefile.am    |    8 ++-  tests/esxutilstest.c |   70

[libvirt] virtual switch - how to store state information

2011-07-01 Thread Laine Stump
(If you already know about my work on putting a logical switch abstraction into libvirt's network, skip to part 2) INTRODUCTION === The rudimentary logical network switch capability I'm currently implementing (see https://bugzilla.redhat.com/show_bug.cgi?id=643947) is intended to

Re: [libvirt] [RFC] exporting KVM host power saving capabilities through libvirt

2011-07-01 Thread Dave Allan
On Tue, Jun 28, 2011 at 08:55:31PM +0530, Vaidyanathan Srinivasan wrote: Hi, Linux host systems running KVM support various power management capabilities. Most of the features like DVFS and sleep states can be independently exploited by the host system itself based on system utilisation

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Jason Helfman
On Fri, Jul 01, 2011 at 08:57:35AM -0600, Eric Blake thus spake: On 07/01/2011 01:08 AM, Daniel Veillard wrote: another way would be to launch python directly giving the path to the python script, this is likely to solve the issue there. I was wondering if this issue was addressed in the

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Eric Blake
On 07/01/2011 02:58 PM, Jason Helfman wrote: I applied this patch (cleanly), and it still breaks: gmake[3]: Leaving directory `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/tools' gmake[2]: Leaving directory `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/tools' Making all

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Jason Helfman
On Fri, Jul 01, 2011 at 03:07:06PM -0600, Eric Blake thus spake: On 07/01/2011 02:58 PM, Jason Helfman wrote: I applied this patch (cleanly), and it still breaks: gmake[3]: Leaving directory `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/tools' gmake[2]: Leaving directory

Re: [libvirt] [RFC] exporting KVM host power saving capabilities through libvirt

2011-07-01 Thread Dave Allan
On Fri, Jul 01, 2011 at 04:56:29PM -0400, Dave Allan wrote: On Tue, Jun 28, 2011 at 08:55:31PM +0530, Vaidyanathan Srinivasan wrote: Hi, Linux host systems running KVM support various power management capabilities. Most of the features like DVFS and sleep states can be independently

[libvirt] [PATCH] build: work around older systemtap header

2011-07-01 Thread Eric Blake
Systemtap 1.2 sys/sdt.h tried to expand STAP_PROBE3 into an initialization: volatile __typeof__(arg) foo = arg; but that fails if arg was declared as 'char arg[100]'. Rather than make all callers to PROBE deal with the stupidity of sys/sdt.h, we instead make PROBE cast away the problem. Some of

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Eric Blake
On 07/01/2011 03:15 PM, Jason Helfman wrote: On Fri, Jul 01, 2011 at 03:07:06PM -0600, Eric Blake thus spake: On 07/01/2011 02:58 PM, Jason Helfman wrote: I applied this patch (cleanly), and it still breaks: gmake[3]: Leaving directory

Re: [libvirt] FreeBSD Port, update to 0.9.2 compile error

2011-07-01 Thread Jason Helfman
On Fri, Jul 01, 2011 at 04:21:54PM -0600, Eric Blake thus spake: On 07/01/2011 03:15 PM, Jason Helfman wrote: On Fri, Jul 01, 2011 at 03:07:06PM -0600, Eric Blake thus spake: On 07/01/2011 02:58 PM, Jason Helfman wrote: I applied this patch (cleanly), and it still breaks: gmake[3]: Leaving

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

2011-07-01 Thread Eric Blake
On 06/30/2011 07:13 PM, Wen Congyang wrote: At 07/01/2011 07:36 AM, Eric Blake Write: 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

[libvirt] [PATCH 7/8] vmware: avoid null deref on failed lookup

2011-07-01 Thread Eric Blake
Detected by Coverity. * src/vmware/vmware_driver.c (vmwareDomainReboot): Check error before dereferencing memory. --- src/vmware/vmware_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index

[libvirt] [PATCH 5/8] rpc: fix logic bug

2011-07-01 Thread Eric Blake
Spotted by Coverity. If we don't update tmp each time through the loop, then if the filter being removed was not the head of the list, we accidentally lose all filters prior to the one we wanted to remove. * src/rpc/virnetserverclient.c (virNetServerClientRemoveFilter): Don't lose unrelated

[libvirt] [PATCHv2 1/8] rpc: avoid memory leak on error

2011-07-01 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. --- v2: incorporate fixes suggested here:

[libvirt] [PATCH 0/8] more coverity cleanups

2011-07-01 Thread Eric Blake
Many are minor (silencing warnings or only affect OOM), but at least patch 5/8 is a real bug that needs to be fixed pre-release. Eric Blake (8): rpc: avoid memory leak on error qemu: silence coverity warnings rpc: silence coverity warning cgroup: silence coverity warning rpc: fix logic

[libvirt] [PATCH 6/8] qemu: avoid null deref on low memory

2011-07-01 Thread Eric Blake
Detected by Coverity. qemuDomainEventQueue requires a non-NULL pointer; most callers silently drop the event if we encountered and OOM situation trying to create the event. * src/qemu/qemu_migration.c (qemuMigrationFinish): Check for OOM. --- src/qemu/qemu_migration.c |3 ++- 1 files

[libvirt] [PATCH 4/8] cgroup: silence coverity warning

2011-07-01 Thread Eric Blake
Coverity noted that most clients reacted to failure to hash; but in a best-effort kill loop, we can ignore failure. * src/util/cgroup.c (virCgroupKillInternal): Ignore hash failure. --- src/util/cgroup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/cgroup.c

[libvirt] [PATCH 8/8] storage: avoid crash on parse error

2011-07-01 Thread Eric Blake
Coverity detected that we could crash on bogus input. Meanwhile, strtok_r is rather heavy compared to strchr. * src/storage/storage_backend_iscsi.c (virStorageBackendIQNFound): Check for parse failure, and use lighter-weight functions. --- src/storage/storage_backend_iscsi.c | 14

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

2011-07-01 Thread Gui Jianfeng
On 2011-6-30 17:34, Daniel P. Berrange wrote: 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

[libvirt] [PATCH V2] cpuset: Add cpuset cgroup support.

2011-07-01 Thread Gui Jianfeng
Currently, libvirt makes use of sched_setaffinity() to set Guest'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, such kernel thread won't inherit QEmu's cpu affinity. This patch enables

Re: [libvirt] [PATCH] fix the failure of nodedev-reattach caused by the variables from nodedev-attach

2011-07-01 Thread Guannan Ren
On 07/01/2011 11:30 PM, ghostwcy wrote: At 2011-7-1 18:24, Guannan Ren write: the virsh nodedev-reattch command could return successfully, but the pci device is still bound to pci-stub driver. The reason is noddev-reattach trys to use the variables set by nodedev-dettach commands. Becuase