Re: [libvirt] [RFC PATCH 0/4] powerpc : Libvirt for the PowerPC platform

2011-10-14 Thread Prerna Saxena
On 10/13/2011 06:53 PM, Jiri Denemark wrote: On Thu, Oct 13, 2011 at 17:48:52 +0530, Prerna Saxena wrote: Yep, these 2 are the bulk of the work, mostly in the qemu_command.c file I expect. Yes. For starters, I'm seeing if qemu-command.c can be split into : qemu-command-common.c qemu-command-x8

Re: [libvirt] [PATCH] build: add compiler attributes to virUUIDParse

2011-10-14 Thread Daniel P. Berrange
On Thu, Oct 13, 2011 at 12:24:02PM -0600, Eric Blake wrote: > On 10/13/2011 02:55 AM, Daniel Veillard wrote: > >On Wed, Oct 12, 2011 at 05:27:40PM -0600, Eric Blake wrote: > >>Coverity complained that most, but not all, clients of virUUIDParse > >>were checking for errors. Silence those coverity w

Re: [libvirt] [RFC PATCH 0/4] powerpc : Libvirt for the PowerPC platform

2011-10-14 Thread Daniel P. Berrange
On Fri, Oct 14, 2011 at 01:20:01PM +0530, Prerna Saxena wrote: > On 10/13/2011 06:53 PM, Jiri Denemark wrote: > >On Thu, Oct 13, 2011 at 17:48:52 +0530, Prerna Saxena wrote: > >>>Yep, these 2 are the bulk of the work, mostly in the qemu_command.c > >>>file I expect. > >> > >>Yes. For starters, I'm

[libvirt] [PATCH] Fix syntax problem in mingw32-libvirt.spec.in

2011-10-14 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When defining macros, you can't put comments on the end of the line because they will get included in the macro definition * mingw32-libvirt.spec.in: Fix comment about hyperv --- mingw32-libvirt.spec.in |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Pus

Re: [libvirt] [PATCH] esx: drop dead code to silence Coverity

2011-10-14 Thread Matthias Bolte
2011/10/14 Eric Blake : > Coverity detected that the only way to get to the cleanup label > is if objectSpec had been successfully allocated, so the null > check was dead code. > > * src/esx/esx_vi.c (esxVI_LookupObjectContentByType): Drop > redundant null check. > --- ACK. Eric, I'll probably ha

[libvirt] [PATCH] [libvirt-tck] vol->as_xml: fix backing store element

2011-10-14 Thread Guido Günther
Fix typo that breaks setting the backing store format. --- lib/Sys/Virt/TCK/StorageVolBuilder.pm |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Sys/Virt/TCK/StorageVolBuilder.pm b/lib/Sys/Virt/TCK/StorageVolBuilder.pm index 515795f..da90788 100644 --- a/lib/Sys/Virt

Re: [libvirt] [PATCH] [libvirt-tck] vol->as_xml: fix backing store element

2011-10-14 Thread Daniel P. Berrange
On Fri, Oct 14, 2011 at 11:36:14AM +0200, Guido Günther wrote: > Fix typo that breaks setting the backing store format. > --- > lib/Sys/Virt/TCK/StorageVolBuilder.pm |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lib/Sys/Virt/TCK/StorageVolBuilder.pm > b/lib/Sys/V

Re: [libvirt] [PATCH] [libvirt-tck] vol->as_xml: fix backing store element

2011-10-14 Thread Guido Günther
On Fri, Oct 14, 2011 at 10:39:12AM +0100, Daniel P. Berrange wrote: > On Fri, Oct 14, 2011 at 11:36:14AM +0200, Guido Günther wrote: > > Fix typo that breaks setting the backing store format. > > --- > > lib/Sys/Virt/TCK/StorageVolBuilder.pm |2 +- > > 1 files changed, 1 insertions(+), 1 delet

[libvirt] [test-API][PATCH 2/2] Add optional argument uuid in create and install module

2011-10-14 Thread Wayne Sun
--- repos/domain/create.py|6 -- repos/domain/install_image.py |5 +++-- repos/domain/install_linux_cdrom.py | 12 +++- repos/domain/install_linux_net.py | 13 - repos/domain/install_windows_cdrom.py | 12 +++- 5 files cha

[libvirt] [test-API][PATCH 1/2] Update define module with remote define

2011-10-14 Thread Wayne Sun
* Add support for define domain on remote host Added optional argument target_machine, username and password. If they are provided, define domain on remote host, else define domain on local. * added new optional argument uuid it supports define domain with given static uuid if i

[libvirt] (no subject)

2011-10-14 Thread Wayne Sun
For last patch of update migrate module, remote define domain is deleted in migrate. Now add this function into define module in this fix. Also update modules which include create, define and installation for the new option uuid added. [test-API][PATCH 1/2] Update define module with remote defin

Re: [libvirt] (no subject)

2011-10-14 Thread Guannan Sun
Sorry for missing subject, this is for libvirt-test-API. The subject should be: [test-API][PATCH 0/2] Update define module and add uuid in related modules Thanks! Best Regards! Wayne Sun Redhat QE, Beijing, China +86-10-6260-8246 - Original Message - From: "Wayne Sun" To: libvir-list@re

Re: [libvirt] [PATCH v2] support setting bandwidth from virsh attach-interface(was Re: [PATCH] support setting bandwidth from virsh attach-interface)

2011-10-14 Thread Michal Privoznik
On 14.10.2011 04:49, Hu Tao wrote: > Here is v2: > >>From 3c5885380ffd68769f2c7d82eb21bd7aca49393e Mon Sep 17 00:00:00 2001 > From: Hu Tao > Date: Fri, 14 Oct 2011 09:10:39 +0800 > Subject: [PATCH v2] support setting bandwidth from virsh attach-interface > > Adds two options, inbound and outboun

[libvirt] [PATCH] virNetSocketNewConnectSSH: Escape netcat path too

2011-10-14 Thread Guido Günther
What holds for netcat is also true for the socket path since it can be part of the connection URI as well. Make both subject to the same amount of shell parsing. Cheers, -- Guido --- src/rpc/virnetsocket.c | 30 +- tests/virnetsockettest.c | 14 +++--- 2

Re: [libvirt] [libvirt PATCHv3 00/10] DHCP snooping support for libvirt

2011-10-14 Thread Stefan Berger
On 10/12/2011 05:25 PM, David Stevens wrote: Stefan Berger wrote on 10/12/2011 02:02:59 PM: The problem we're having at the moment is that it's not possible to evaluate fields of packets that may have more than one possible value. This is the general problem, the specific one being allowin

Re: [libvirt] [PATCH 1/2] Fix occasional container creation failure due to misuse of grantpt

2011-10-14 Thread Serge E. Hallyn
Quoting Eric Blake (ebl...@redhat.com): ... > of /dev/pts, then passing that fd back to the parent; the > alternative solution would be to ditch glibc interfaces and do the > raw ioctl calls on the master pty ourselves. Since lxc is already > Linux-specific, I think that I would favor this approac

[libvirt] [RFC PATCH v2 2/2] Make the API public

2011-10-14 Thread Srivatsa S. Bhat
Define the required interfaces to make the API publicly accessible. Signed-off-by: Srivatsa S. Bhat --- include/libvirt/libvirt.h.in |4 src/driver.h |5 + src/libvirt.c| 46 ++ src/libvirt_public.syms

[libvirt] [RFC PATCH v2 0/2] API to invoke S3/S4 on a host and also resume from within libvirt

2011-10-14 Thread Srivatsa S. Bhat
This patch adds a new API to put a host to a suspended state (either Suspend-to-RAM or Suspend-to-Disk) and also resume the host back from within libvirt. This uses the RTC wakeup mechanism to set up a timer alarm before suspending the host, so that in-band resume is facilitated by the firing of th

[libvirt] [RFC PATCH v2 1/2] Implement the asynchronous suspend and RTC wakeup

2011-10-14 Thread Srivatsa S. Bhat
Add the core functions that implement the functionality of the API. Suspend is done by using an asynchronous mechanism so that we can return the status to the caller successfully before the host gets suspended. This asynchronous operation is achieved by suspending the host in a separate thread of e

[libvirt] [PATCH v2 0/2] Xen: skip xenHypervisor version init in tests

2011-10-14 Thread Philipp Hahn
Several tests fail when run as root on a Xen-dom0-system, since virInitialize() then succeeds to open /proc/xen/privcmd and returns the actual supported features instead of the faked one when calling xenHypervisorMakeCapabilitiesInternal(). Since Xen-3.3 supports additional features like "hap" and

[libvirt] [PATCH v2 1/2] Xen: move versions to struct

2011-10-14 Thread Philipp Hahn
Calling virInitialize() → xenRegister() → xenhypervisorInit() directly opens a connection to the Xen Hypervisor, which breaks some unit tests. Move all static variables into a struct to make it easier to override them when testing. Signed-off-by: Philipp Hahn --- src/xen/xen_hypervisor.c | 293

Re: [libvirt] [PATCH] virNetSocketNewConnectSSH: Escape netcat path too

2011-10-14 Thread Eric Blake
On 10/14/2011 06:18 AM, Guido Günther wrote: What holds for netcat is also true for the socket path since it can be part of the connection URI as well. Make both subject to the same amount of shell parsing. Hmm, I'm not sure about this. -.path = "/tmp/socket", +.path = "/tmp/s

[libvirt] [PATCH v2 2/2] Xen: Fake versions in xencapstest

2011-10-14 Thread Philipp Hahn
virInitialize() → xenRegister() → xenhypervisorInit() determins the version of the Hypervisor. This breaks xencapstest when building as root on a dom0 system, since xenHypervisorBuildCapabilities() adds the "hap" and "viridian" features based on the detected version. Add an optional parameter to x

Re: [libvirt] [PATCH] esx: drop dead code to silence Coverity

2011-10-14 Thread Eric Blake
On 10/14/2011 12:28 AM, Michal Privoznik wrote: On 14.10.2011 00:08, Eric Blake wrote: Coverity detected that the only way to get to the cleanup label is if objectSpec had been successfully allocated, so the null check was dead code. * src/esx/esx_vi.c (esxVI_LookupObjectContentByType): Drop re

Re: [libvirt] [PATCH v2 1/2] Xen: move versions to struct

2011-10-14 Thread Eric Blake
On 10/14/2011 04:58 AM, Philipp Hahn wrote: Calling virInitialize() → xenRegister() → xenhypervisorInit() directly opens a connection to the Xen Hypervisor, which breaks some unit tests. Move all static variables into a struct to make it easier to override them when testing. Signed-off-by: Phil

Re: [libvirt] [PATCH v2 2/2] Xen: Fake versions in xencapstest

2011-10-14 Thread Eric Blake
On 10/14/2011 06:10 AM, Philipp Hahn wrote: virInitialize() → xenRegister() → xenhypervisorInit() determins the s/determins/determines/ version of the Hypervisor. This breaks xencapstest when building as root on a dom0 system, since xenHypervisorBuildCapabilities() adds the "hap" and "viridia

[libvirt] [PATCH 1/1] lxc: use our own hand-rolled code in place of unlockpt and grantpt

2011-10-14 Thread Serge Hallyn
The glibc ones cannot handle ptys opened in a devpts not mounted at /dev/pts. Signed-off-by: Serge Hallyn --- src/lxc/lxc_controller.c | 82 +++-- 1 files changed, 78 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_cont

Re: [libvirt] [PATCH] qemu: Log debug messages when changing job

2011-10-14 Thread Jiri Denemark
On Thu, Oct 13, 2011 at 16:43:18 +0200, Michal Privoznik wrote: > On 13.10.2011 14:57, Jiri Denemark wrote: > > Log debug messages anytime we call *BeginJob* or *EndJob* so that it's > > easier to spot incorrect usage of domain job APIs. > > --- > > src/qemu/qemu_domain.c | 12 > >

Re: [libvirt] [PATCH] qemu: Make sure BeginJob is always followed by EndJob

2011-10-14 Thread Jiri Denemark
On Thu, Oct 13, 2011 at 15:59:46 +0200, Michal Privoznik wrote: > On 13.10.2011 14:58, Jiri Denemark wrote: > > Otherwise we can end up with a dangling job that can only be cleared by > > restarting libvirtd. > > --- > > src/qemu/qemu_driver.c | 24 > > 1 files changed,

Re: [libvirt] [PATCH] util: Make getaddrinfo failure nonfatal in virGetHostname

2011-10-14 Thread Jiri Denemark
On Thu, Oct 13, 2011 at 08:47:06 -0600, Eric Blake wrote: > On 10/13/2011 08:41 AM, Jiri Denemark wrote: > > Setting a hostname that cannot be resolved is not the best configuration > > but since virGetHostname only calls getaddrinfo to get host's canonical > > name and we do not fail if the return

[libvirt] [PATCH] docs: fix network XML documentation

2011-10-14 Thread Laine Stump
A few people have attempted to use the new forwarding modes with older versions of libvirt. The docs where the modes are described have always stated the minimum required libvirt version, but the examples at the end didn't, which I believe is what has caused the confusion. Similarly, the section o

Re: [libvirt] [PATCH v2] qemu: Do not reattach PCI device used by other domain when shutdown

2011-10-14 Thread Eric Blake
On 10/12/2011 10:05 PM, Osier Yang wrote: When failing on starting a domain, it tries to reattach all the PCI devices defined in the domain conf, regardless of whether the devices are still used by other domain. This will cause the devices to be deleted from the list qemu_driver->activePciHostdev

[libvirt] [PATCH] Clarify semantics of virDomainMigrate2

2011-10-14 Thread Jiri Denemark
Explicitly disallow conflicts between domain name from dxml and dname. --- src/libvirt.c |3 +++ src/qemu/qemu_driver.c|4 ++-- src/qemu/qemu_migration.c | 17 ++--- src/qemu/qemu_migration.h |1 + 4 files changed, 20 insertions(+), 5 deletions(-) diff --

Re: [libvirt] [PATCH] docs: fix network XML documentation

2011-10-14 Thread Eric Blake
On 10/14/2011 12:40 PM, Laine Stump wrote: A few people have attempted to use the new forwarding modes with older versions of libvirt. The docs where the modes are described have always stated the minimum required libvirt version, but the examples at the end didn't, which I believe is what has ca

Re: [libvirt] [PATCH] Clarify semantics of virDomainMigrate2

2011-10-14 Thread Eric Blake
On 10/14/2011 01:34 PM, Jiri Denemark wrote: Explicitly disallow conflicts between domain name from dxml and dname. --- src/libvirt.c |3 +++ src/qemu/qemu_driver.c|4 ++-- src/qemu/qemu_migration.c | 17 ++--- src/qemu/qemu_migration.h |1 + 4 file

Re: [libvirt] [PATCH] Clarify semantics of virDomainMigrate2

2011-10-14 Thread Jiri Denemark
On Fri, Oct 14, 2011 at 13:40:07 -0600, Eric Blake wrote: > On 10/14/2011 01:34 PM, Jiri Denemark wrote: > > Explicitly disallow conflicts between domain name from dxml and dname. > > --- > > src/libvirt.c |3 +++ > > src/qemu/qemu_driver.c|4 ++-- > > src/qemu/qemu_migr

Re: [libvirt] [PATCH] macvtap: plug memory leak for 802.1Qbh

2011-10-14 Thread Roopa Prabhu
On 10/13/11 3:49 PM, "Eric Blake" wrote: > Detected by Coverity. Leak present since commit ca3b22b. > > * src/util/macvtap.c (doPortProfileOp8021Qbh): Release device name. > --- > getPhysfnDev allocates physfndev, but nothing freed it. > Pushing under the trivial rule. > > src/util/macvtap

Re: [libvirt] [PATCH] macvtap: plug memory leak for 802.1Qbh

2011-10-14 Thread Eric Blake
On 10/14/2011 02:41 PM, Roopa Prabhu wrote: On 10/13/11 3:49 PM, "Eric Blake" wrote: Detected by Coverity. Leak present since commit ca3b22b. * src/util/macvtap.c (doPortProfileOp8021Qbh): Release device name. --- getPhysfnDev allocates physfndev, but nothing freed it. Pushing under the t

Re: [libvirt] [PATCH] macvtap: plug memory leak for 802.1Qbh

2011-10-14 Thread Roopa Prabhu
On 10/14/11 1:55 PM, "Eric Blake" wrote: > On 10/14/2011 02:41 PM, Roopa Prabhu wrote: >> >> >> >> On 10/13/11 3:49 PM, "Eric Blake" wrote: >> >>> Detected by Coverity. Leak present since commit ca3b22b. >>> >>> * src/util/macvtap.c (doPortProfileOp8021Qbh): Release device name. >>> ---

Re: [libvirt] [PATCH] macvtap: plug memory leak for 802.1Qbh

2011-10-14 Thread Eric Blake
On 10/14/2011 03:05 PM, Roopa Prabhu wrote: I had already pushed mine. Yours is missing a virReportOOMError() on allocation failure; but ACK with that improvement. Great. Thanks!. I will send out a patch for the bug fix and later work on the fixing the error return convention. I already push

Re: [libvirt] [PATCH v3] qemu: Honor the orginal PCI dev properties when reattaching

2011-10-14 Thread Eric Blake
On 10/13/2011 02:30 AM, Osier Yang wrote: BZ# https://bugzilla.redhat.com/show_bug.cgi?id=736214 The problem is caused by the original info of domain's PCI dev is maintained by qemu_driver->activePciHostdevs list, (E.g. dev->reprobe, which stands for whether need to reprobe driver for the dev wh

Re: [libvirt] [PATCH] macvtap: plug memory leak for 802.1Qbh

2011-10-14 Thread Roopa Prabhu
On 10/14/11 2:08 PM, "Eric Blake" wrote: > On 10/14/2011 03:05 PM, Roopa Prabhu wrote: >>> I had already pushed mine. Yours is missing a virReportOOMError() on >>> allocation failure; but ACK with that improvement. >>> >> Great. Thanks!. I will send out a patch for the bug fix and later work

Re: [libvirt] [PATCH] Bug Fix: Fix getPhysfnDev to always allocate memory for physfndev on success

2011-10-14 Thread Eric Blake
On 10/14/2011 04:12 PM, Roopa Prabhu wrote: From: Roopa Prabhu getPhysfnDev was conditionally allocating memory for physfndev on success. Recently added unconditional free in the caller of getPhysfnDev can result in a crash. So fix getPhysfnDev to unconditionally allocate memory for physfndev on

Re: [libvirt] New repositories and comments for Code Search

2011-10-14 Thread Richard W.M. Jones
Heh, well just a week later, and Google shuts down the service ... http://googleblog.blogspot.com/2011/10/fall-sweep.html Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the

[libvirt] [PATCH] Add missing strdup return value check

2011-10-14 Thread Roopa Prabhu
From: Roopa Prabhu Check strdup return value and fail if error Signed-off-by: Roopa Prabhu --- src/util/pci.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/util/pci.c b/src/util/pci.c index 2bbb90c..df4e6c8 100644 --- a/src/util/pci.c +++ b/src/util/pci.c

[libvirt] [PATCH] docs: document managed=yes of hostdev passthrough

2011-10-14 Thread Eric Blake
Clarify some of the effects of managed passthrough devices; with today's recent changes, a nodedev-reattach is only needed to pair up to an explicit nodedev-dettach (but beware that virt-manager has a bug where it uses explicit nodedev-dettach under the hood when using the gui to hotplug a hostdev

Re: [libvirt] [PATCH] Add missing strdup return value check

2011-10-14 Thread Eric Blake
On 10/14/2011 04:25 PM, Roopa Prabhu wrote: From: Roopa Prabhu Check strdup return value and fail if error Signed-off-by: Roopa Prabhu --- src/util/pci.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/util/pci.c b/src/util/pci.c index 2bbb90c..df4e6c8 10

Re: [libvirt] [PATCH] add a default event handle, to passthough the new events come from qemu

2011-10-14 Thread Eric Blake
On 10/13/2011 08:53 PM, shu ming wrote: Also I think it would be better if we were able to connect to explicit JSON events, rather than a catch all. THe number of events from QEMU is only going to increase over time& as it does, a 'catch all' becomes increasingly bandwidth wasteful. If I unde

Re: [libvirt] [RFC PATCH 2/2] Routines to parse ...

2011-10-14 Thread Eric Blake
On 10/13/2011 10:10 PM, Bharata B Rao wrote: Using VIR_ALLOC_N + snprintf here is not desirable, when you already have a nice virBufferPtr object in the call that you could use. Just pass the virBufferPtr straight into this method. Wanted to user virBufferPtr, but I realized that I need to re

Re: [libvirt] [PATCH] Add missing strdup return value check

2011-10-14 Thread Roopa Prabhu
On 10/14/11 4:22 PM, "Eric Blake" wrote: > On 10/14/2011 04:25 PM, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> Check strdup return value and fail if error >> >> Signed-off-by: Roopa Prabhu >> --- >> src/util/pci.c |8 +++- >> 1 files changed, 7 insertions(+), 1 deletions(-) >>

Re: [libvirt] [PATCH v3] qemu: Honor the orginal PCI dev properties when reattaching

2011-10-14 Thread Osier Yang
于 2011年10月15日 05:47, Eric Blake 写道: On 10/13/2011 02:30 AM, Osier Yang wrote: BZ# https://bugzilla.redhat.com/show_bug.cgi?id=736214 The problem is caused by the original info of domain's PCI dev is maintained by qemu_driver->activePciHostdevs list, (E.g. dev->reprobe, which stands for whether

Re: [libvirt] [PATCH v3] qemu: Honor the orginal PCI dev properties when reattaching

2011-10-14 Thread Osier Yang
于 2011年10月15日 05:47, Eric Blake 写道: On 10/13/2011 02:30 AM, Osier Yang wrote: BZ# https://bugzilla.redhat.com/show_bug.cgi?id=736214 The problem is caused by the original info of domain's PCI dev is maintained by qemu_driver->activePciHostdevs list, (E.g. dev->reprobe, which stands for whether

Re: [libvirt] [libvirt PATCHv3 08/10] add DHCP snooping

2011-10-14 Thread Stefan Berger
On 10/12/2011 03:50 PM, David L Stevens wrote: This patch adds DHCP Snooping support to libvirt. Signed-off-by: David L Stevens --- examples/xml/nwfilter/no-ip-spoofing.xml |5 + src/Makefile.am |2 + src/nwfilter/nwfilter_dhcpsnoop.c| 602 ++