Re: [libvirt] [PATCH] phyp: Fixing possible buffer overflow

2010-07-15 Thread Laine Stump
On 07/15/2010 06:37 PM, Eduardo Otubo wrote: > The line src/phyp/phyp_driver.c:427 was crashing by buffer overflow > if the return of the command wasn't <=10. The highest number for a > LPAR ID is 256 per machine, no need to allocate 10 bytes for it. So, > adjusting the correct size (+1 byte for th

[libvirt] [PATCH] phyp: Fixing possible buffer overflow

2010-07-15 Thread Eduardo Otubo
The line src/phyp/phyp_driver.c:427 was crashing by buffer overflow if the return of the command wasn't <=10. The highest number for a LPAR ID is 256 per machine, no need to allocate 10 bytes for it. So, adjusting the correct size (+1 byte for the '\n') and checking for errors. --- src/phyp/phyp_

Re: [libvirt] where is "virsh pool-stop"?

2010-07-15 Thread Camilo Aguilar
Same here, I'm doing bindings for NodeJS and I used stop instead of destroy and also I used start instead create. On Thu, Jul 15, 2010 at 5:44 AM, Harald Dunkel wrote: > Hi folks, > > Suggestion: > > "virsh pool-destroy" sounds highly destructive. There is a > "pool-start" command, so how about "

Re: [libvirt] where is "virsh pool-stop"?

2010-07-15 Thread Chris Lalancette
On 07/16/10 - 04:56:43AM, Justin Clift wrote: > On 07/16/2010 04:48 AM, Dave Allan wrote: > > >I wouldn't object to aliasing pool-stop to pool-destroy, but I'm > >curious to know what others on the list think. > > Full agreement from me. :) I also think it is a good idea in general. -- Chris La

Re: [libvirt] where is "virsh pool-stop"?

2010-07-15 Thread Justin Clift
On 07/16/2010 04:48 AM, Dave Allan wrote: I wouldn't object to aliasing pool-stop to pool-destroy, but I'm curious to know what others on the list think. Full agreement from me. :) + Justin -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] where is "virsh pool-stop"?

2010-07-15 Thread Dave Allan
On Thu, Jul 15, 2010 at 11:44:33AM +0200, Harald Dunkel wrote: > Hi folks, > > Suggestion: > > "virsh pool-destroy" sounds highly destructive. There is a > "pool-start" command, so how about "pool-stop"? Similar > commands could be introduced for the other *-start commands. For pools especially

Re: [libvirt] Segfault in virDomainObjListSearchName when listing domains (qemu backend)

2010-07-15 Thread Daniel P. Berrange
On Thu, Jul 15, 2010 at 07:00:50PM +0200, Guido Winkelmann wrote: > Am Donnerstag, 1. Juli 2010 schrieb Guido Winkelmann: > > Am Dienstag, 29. Juni 2010 schrieb Daniel P. Berrange: > > > Actually that patch wasn't very nice, so I've prepared a different one > > > which should fix the problem in a b

Re: [libvirt] Segfault in virDomainObjListSearchName when listing domains (qemu backend)

2010-07-15 Thread Guido Winkelmann
Am Donnerstag, 1. Juli 2010 schrieb Guido Winkelmann: > Am Dienstag, 29. Juni 2010 schrieb Daniel P. Berrange: > > Actually that patch wasn't very nice, so I've prepared a different one > > which should fix the problem in a better way. Separately, I'd like to > > know what errors you get when QEMU

Re: [libvirt] [PATCH 11/11] Use the extract backing store format in storage volume lookup

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:48PM +0100, Daniel P. Berrange wrote: > The storage volume lookup code was probing for the backing store > format, instead of using the format extracted from the file > itself. This meant it could report in accurate information. If > a format is included in the file, t

Re: [libvirt] [PATCH 09/11] Add ability to set a default driver name/type when parsing disks

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:46PM +0100, Daniel P. Berrange wrote: > Record a default driver name/type in capabilities struct. Use this > when parsing disks if value is not set in XML config. > > * src/conf/capabilities.h: Record default driver name/type for disks > * src/conf/domain_conf.c: Fall

Re: [libvirt] [PATCH 10/11] Rewrite qemu-img backing store format handling

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:47PM +0100, Daniel P. Berrange wrote: > When creating qcow2 files with a backing store, it is important > to set an explicit format to prevent QEMU probing. The storage > backend was only doing this if it found a 'kvm-img' binary. This > is wrong because plenty of kvm-

Re: [libvirt] [PATCH 07/11] Pass security driver object into all security driver callbacks

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:44PM +0100, Daniel P. Berrange wrote: > The implementation of security driver callbacks often needs > to access the security driver object. Currently only a handful > of callbacks include the driver object as a parameter. Later > patches require this is many more place

Re: [libvirt] [PATCH 08/11] Disable all disk probing in QEMU driver & add config option to re-enable

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:45PM +0100, Daniel P. Berrange wrote: > Disk format probing is now disabled by default. A new config > option in /etc/qemu/qemu.conf will re-enable it for existing > deployments where this causes trouble Okay, my answer to question on patch 2 :-) ACK Daniel --

[libvirt] [PATCH] Remove inappropriate use of VIR_ERR_NO_SUPPORT

2010-07-15 Thread Daniel P. Berrange
The VIR_ERR_NO_SUPPORT refers to an API which is not implemented. There is a separate VIR_ERR_CONFIG_UNSUPPORTED for XML config options that are not available with the current hypervisor. * src/qemu/qemu_conf.c, src/qemu/qemu_driver.c: Remove many VIR_ERR_NO_SUPPORT replace with VIR_ERR_CONFIG_U

[libvirt] [PATCH 1/2] Rearrange VGA/IDE controller address reservation

2010-07-15 Thread Daniel P. Berrange
The first VGA and IDE devices need to have fixed PCI address reservations. Currently this is handled inline with the other non-primary VGA/IDE devices. The fixed virtio balloon device at slot 3, ensures auto-assignment skips the slots 1/2. The virtio address will shortly become configurable though.

[libvirt] [PATCH 0/2] Explicitly manage balloon devices

2010-07-15 Thread Daniel P. Berrange
The balloon device is not present in the XML currently. This means we can't track custom PCI addresses for it. This means we can't provide a way for apps to get the same PCI address ordering as found with older QEMU -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman

[libvirt] Question about libxml.

2010-07-15 Thread erik . e . bengtson
Hi, I saw a post by Daniel veillard regarding memory leaks using libxml. The suggestion was to use malloc_trim(0), to correct the issue. However, I canot find it anywhere on Solaris. Do you know if this is located on Solaris 5.10, and if so, what header file is it located in. If it is not on So

Re: [libvirt] [PATCH 06/11] Convert all disk backing store loops to shared helper API

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:43PM +0100, Daniel P. Berrange wrote: > Update the QEMU cgroups code, QEMU DAC security driver, SELinux > and AppArmour security drivers over to use the shared helper API > virDomainDiskDefForeachPath(). > > * src/qemu/qemu_driver.c, src/qemu/qemu_security_dac.c, >

Re: [libvirt] [PATCH 05/11] Add an API for iterating over disk paths

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:42PM +0100, Daniel P. Berrange wrote: > There is duplicated code which iterates over disk backing stores > performing some action. Provide a convenient helper for doing > this to eliminate duplication & risk of mistakes with disk format > probing > > * src/conf/domain

Re: [libvirt] [PATCH 04/11] Require format to be passed into virStorageFileGetMetadata

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:41PM +0100, Daniel P. Berrange wrote: > Require the disk image to be passed into virStorageFileGetMetadata. > If this is set to VIR_STORAGE_FILE_AUTO, then the format will be > resolved using probing. This makes it easier to control when > probing will be used > > * s

Re: [libvirt] [PATCH 03/11] Refactor virStorageFileGetMetadataFromFD to separate functionality

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:40PM +0100, Daniel P. Berrange wrote: > The virStorageFileGetMetadataFromFD did two jobs in one. First > it probed for storage type, then it extracted metadata for the > type. It is desirable to be able to separate these jobs, allowing > probing without querying metada

Re: [libvirt] [PATCH 01/11] Extract the backing store format as well as name, if available

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:38PM +0100, Daniel P. Berrange wrote: > When QEMU opens a backing store for a QCow2 file, it will > normally auto-probe for the format of the backing store, > rather than assuming it has the same format as the referencing > file. There is a QCow2 extension that allows

Re: [libvirt] [PATCH 02/11] Remove 'type' field from FileTypeInfo struct

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 02:30:39PM +0100, Daniel P. Berrange wrote: > Instead of including a field in FileTypeInfo struct for the > disk format, rely on the array index matching the format. > Use verify() to assert the correct number of elements in the > array. > > * src/util/storage_file.c: remov

Re: [libvirt] [RFC][PATCH] Fix a deadlock in bi-directional p2p concurrent migration.

2010-07-15 Thread Daniel P. Berrange
On Thu, Jul 15, 2010 at 10:44:46AM -0400, Chris Lalancette wrote: > If you try to execute two concurrent migrations p2p > from A->B and B->A, the two libvirtd's will deadlock > trying to perform the migrations. The reason for this is > that in p2p migration, the libvirtd's are responsible for > ma

Re: [libvirt] [PATCH] CVE-2010-2242 Apply a source port mapping to virtual network masquerading

2010-07-15 Thread Daniel Veillard
On Mon, Jul 12, 2010 at 09:19:33AM -0400, Daniel P. Berrange wrote: > For > > https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2010-2242 > > IPtables will seek to preserve the source port unchanged when > doing masquerading, if possible. NFS has a pseudo-security > option where it checks for the

Re: [libvirt] [RFC][PATCH] Fix a deadlock in bi-directional p2p concurrent migration.

2010-07-15 Thread Daniel Veillard
On Thu, Jul 15, 2010 at 10:44:46AM -0400, Chris Lalancette wrote: > If you try to execute two concurrent migrations p2p > from A->B and B->A, the two libvirtd's will deadlock > trying to perform the migrations. The reason for this is > that in p2p migration, the libvirtd's are responsible for > ma

[libvirt] [RFC][PATCH] Fix a deadlock in bi-directional p2p concurrent migration.

2010-07-15 Thread Chris Lalancette
If you try to execute two concurrent migrations p2p from A->B and B->A, the two libvirtd's will deadlock trying to perform the migrations. The reason for this is that in p2p migration, the libvirtd's are responsible for making the RPC Prepare, Migrate, and Finish calls. However, they are currentl

Re: [libvirt] [PATCH 3/5] domain conf: char: Add an explicit targetType field

2010-07-15 Thread Cole Robinson
On 07/15/2010 05:31 AM, Daniel P. Berrange wrote: > On Wed, Jul 14, 2010 at 03:44:54PM -0400, Cole Robinson wrote: >> targetType only tracks the actual format we are parsing. >> TYPE_DEFAULT is the typical serial/parallel format, NONE is for the >> device which prints nothing. >> >> Signed-off-by

Re: [libvirt] [PATCH 1/8] Remove the "showerror" parameter from vshConnectionUsability.

2010-07-15 Thread Matthias Bolte
2010/7/8 Chris Lalancette : > Nobody was using it anyway. > > Signed-off-by: Chris Lalancette > --- >  tools/virsh.c |  270 > - >  1 files changed, 134 insertions(+), 136 deletions(-) > Mostly search & replace. ACK. Matthias -- libvir-li

Re: [libvirt] [PATCH 2/8] Remove error checking after using vshMalloc.

2010-07-15 Thread Matthias Bolte
2010/7/8 Chris Lalancette : > vshMalloc and friends always exit() on allocation failure, > so there is no reason to do checking for NULL in the code > that uses it. > > Signed-off-by: Chris Lalancette > --- ACK. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/

Re: [libvirt] [PATCH 3/8] Remove unused and bitrotting vshCommandOptStringList

2010-07-15 Thread Matthias Bolte
2010/7/8 Chris Lalancette : > Signed-off-by: Chris Lalancette > --- >  tools/virsh.c |   29 - >  1 files changed, 0 insertions(+), 29 deletions(-) > > diff --git a/tools/virsh.c b/tools/virsh.c > index d539fbc..c1451d8 100644 > --- a/tools/virsh.c > +++ b/tools/virsh.c

Re: [libvirt] iscsi support?

2010-07-15 Thread Dave Allan
On Thu, Jul 15, 2010 at 11:11:40AM +0200, Harald Dunkel wrote: > Hi Dave, > > Sorry for the delay. See below > > On 07/12/10 20:23, Dave Allan wrote: > > > > Hi Harri, > > > > I spun up a Debian testing box with the versions of libvirt, iet& > > open-iscsi that you're using, and it works fine for

[libvirt] where is "virsh pool-stop"?

2010-07-15 Thread Harald Dunkel
Hi folks, Suggestion: "virsh pool-destroy" sounds highly destructive. There is a "pool-start" command, so how about "pool-stop"? Similar commands could be introduced for the other *-start commands. This would make using virsh _much_ easier. In Unix world "start" and "stop" belong together, "st

Re: [libvirt] [PATCH 3/5] domain conf: char: Add an explicit targetType field

2010-07-15 Thread Daniel P. Berrange
On Wed, Jul 14, 2010 at 03:44:54PM -0400, Cole Robinson wrote: > targetType only tracks the actual format we are parsing. > TYPE_DEFAULT is the typical serial/parallel format, NONE is for the > device which prints nothing. > > Signed-off-by: Cole Robinson > --- > src/conf/domain_conf.c | 108

Re: [libvirt] iscsi support?

2010-07-15 Thread Harald Dunkel
Hi Dave, Sorry for the delay. See below On 07/12/10 20:23, Dave Allan wrote: > > Hi Harri, > > I spun up a Debian testing box with the versions of libvirt, iet& > open-iscsi that you're using, and it works fine for me. My pool xml > is: > > >iscsitest > > > > > >

Re: [libvirt] [PATCH] daemon: dispatch.c should include stdio.h (and stdarg.h)

2010-07-15 Thread Jiri Denemark
> >> dispatch.c requires stdio.h (and stdarg.h), however, currently > >> dispatch.c implicitly relys on rpc/xdr.h to include stdio.h. > >> If rpc/xdr.h unxpectedly does not include stdio.h, the compilation > >> of dispatch.c fails. > >> > >> This can happen, for example, when portablexdr is install