Re: [Libvir] [PATCH] avoid virsh hang due to missing virDomainFree(dom) call

2008-01-30 Thread Daniel P. Berrange
On Wed, Jan 30, 2008 at 06:36:37PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: On Wed, Jan 30, 2008 at 06:25:19PM +0100, Jim Meyering wrote: Without the following patch, this command would hang printf 'domuuid fc4\ndomstate fc4\n' \ | ./virsh

Re: [Libvir] [PATCH] avoid virsh hang due to missing virDomainFree(dom) call

2008-01-30 Thread Daniel P. Berrange
On Wed, Jan 30, 2008 at 06:25:19PM +0100, Jim Meyering wrote: Without the following patch, this command would hang printf 'domuuid fc4\ndomstate fc4\n' \ | ./virsh --connect test://$PWD/../docs/testnode.xml with this stack trace: __lll_lock_wait ... _L_lock_105 ...

Re: [Libvir] [PATCH] avoid virsh hang due to missing virDomainFree(dom) call

2008-01-30 Thread Daniel P. Berrange
On Wed, Jan 30, 2008 at 07:00:30PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: Not, its a bug in virUnrefDomain/Network - it calls mutex_lock() twice in one codepath, instead of calling unlock(). Of course your patch to avoid the memory leak is still needed

Re: [Libvir] PATCH: Allow Xen HVM kernel+initrd booting

2008-02-04 Thread Daniel P. Berrange
On Mon, Feb 04, 2008 at 09:44:12AM -0500, Daniel Veillard wrote: So basically Xen PV, Xen FV and KVM os blocks should now share the same set of functionalities, sharight the same syntax, right ? And the refactoring comes from the 3 being able to share more code, if yes that sounds

Re: [Libvir] libvirt vde_switch

2008-02-04 Thread Daniel P. Berrange
On Tue, Feb 05, 2008 at 12:53:57AM +0100, Loic Dachary wrote: In reply to http://www.redhat.com/archives/libvir-list/2007-April/msg00177.html an area where vde_switch support is usefull is an unprivileged user running tests. A test suite involving the creation of qemu instances thru

Re: [Libvir] Re: [PATCH] add missing qemudReportError

2008-02-05 Thread Daniel P. Berrange
On Tue, Feb 05, 2008 at 01:09:15PM +0100, Guido Guenther wrote: On Tue, Feb 05, 2008 at 01:06:14PM +0100, Guido Guenther wrote: without this qemudParseVMDef might return NULL when the boot dev configuration is invalid but virGetLastError returns NULL either since no error has been set, this

Re: [Libvir] don't use virBufferAdd with string literals

2008-02-05 Thread Daniel P. Berrange
On Mon, Feb 04, 2008 at 08:27:41PM +0100, Jim Meyering wrote: I noticed a little glitch here: src/xml.c: virBufferAdd(buf, (usbdevice tablet), 13); src/xml.c: virBufferAdd(buf, (usbdevice tablet), 18); So I mounted a campaign to remove all such uses of virBufferAdd and

Re: [PATCH] for MinGW Re: [Libvir] Pthreads error in windows compilation

2008-02-06 Thread Daniel P. Berrange
On Wed, Feb 06, 2008 at 06:26:04PM +, Richard W.M. Jones wrote: Atsushi SAKAI wrote: Hi, ???Today I recognized. It would be better to write #include pthread.h in hash.h than hash.c. And compilation works if configure.in changes in MINGW? Would you apply this patch? I think actually

Re: [Libvir] PATCH: 16/16: website documentation

2008-02-11 Thread Daniel P. Berrange
This patch adds a new 'storage.html' page to the website giving examples of the XML format for each pool type, the XML format for volumes, a description of all XML elements, and other storage pool specific information. libvir.html | 576

Re: [Libvir] PATCH: 7/16: virsh core commands

2008-02-11 Thread Daniel P. Berrange
This patch adds new virsh commands for all the libvirt storage APIs allowing their use from the shell. The style follows that of the existing domain network commands, so I won't bother listing them in great detail. The only complexity is in dealing with the vol-XXX commands. These can accept

Re: [Libvir] PATCH: 6/16: python API

2008-02-11 Thread Daniel P. Berrange
This extends the generator / manual bindings to implement all the storage APIs. Most are handle automatically, and those which are not, pretty much follow the existing pattern for virDomain and virNetwork APIs. generator.py | 93 +- libvir.c | 293

Re: [Libvir] PATCH: 1/16: public API

2008-02-11 Thread Daniel P. Berrange
This defines the public API for the storage pool and volume support. The naming of the APIs follows the example set by the network and domain APIs whereever the logical functions match. The main change since previous iterations is the addition of an explicit API for virStoragePoolBuild and

Re: [Libvir] PATCH: 12/16: logical volume backend

2008-02-11 Thread Daniel P. Berrange
Thu Feb 07 14:17:16 2008 -0500 @@ -0,0 +1,497 @@ +/* + * storage_backend_logvol.c: storage backend for logical volume handling + * + * Copyright (C) 2007-2008 Red Hat, Inc. + * Copyright (C) 2007-2008 Daniel P. Berrange + * + * This library is free software; you can redistribute

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-11 Thread Daniel P. Berrange
+ * + * Copyright (C) 2007-2008 Red Hat, Inc. + * Copyright (C) 2007-2008 Daniel P. Berrange + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either

Re: [Libvir] PATCH: 8/16: virsh convenience commands

2008-02-11 Thread Daniel P. Berrange
This patch adds 3 extra commands to virsh to allow storage pools and volumes to be defined created without using XML. These have the names 'pool-define-as', 'pool-create-as', 'vol-create-as'. virsh will take the args to these commands and build suitable XML to pass into the libvirt APIs. This is

Re: [Libvir] PATCH: 0/16: Storage management APIs

2008-02-12 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 10:50:35AM -0800, Dan Smith wrote: DB The patch series that follows provides storage management APIs for dealing DB with local directories, local filesystems, remote filesystems, logical DB volumes (LVM), disk partitioning, and iSCSI. It will also soon support DB SCSI

Re: [Libvir] PATCH: 0/16: Storage management APIs

2008-02-12 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 02:13:59PM -0800, Dan Smith wrote: DL It would eliminate the need for mounts. Why? DL Does it make more sense to integrate into the storage API design DL or leave the separate container specific mounts? From the perspective of a CIM provider, being able to

Re: [Libvir] PATCH: 0/16: Storage management APIs

2008-02-12 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 01:29:55PM -0800, Dan Smith wrote: DL So, if I understand correctly, the user would specify a directory DL containing an image of the entire file system they want for the DL container. This would be clone'd and setup so that it appears as DL / in the container

Re: [Libvir] PATCH: 13/16: iSCSI backend

2008-02-12 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 08:37:02AM -0500, Chris Lalancette wrote: +static char *virStorageBackendISCSIPortal(virConnectPtr conn, + virStoragePoolObjPtr pool) +{ +char ipaddr[NI_MAXHOST]; +char *portal; + +if

Re: [Libvir] [PATCH] autobuild.sh: Run make syntax-check

2008-02-14 Thread Daniel P. Berrange
On Thu, Feb 14, 2008 at 05:42:28AM -0500, Daniel Veillard wrote: On Thu, Feb 07, 2008 at 07:15:22PM +0100, Jim Meyering wrote: Tiny change. So the autobuilder runs these checks, too. I guess it make sense, but I don't think I receive the autobuilder failures :-) If anyone wants to

Re: [Libvir] PATCH: 1/16: public API

2008-02-14 Thread Daniel P. Berrange
On Thu, Feb 14, 2008 at 06:06:08AM -0500, Daniel Veillard wrote: On Tue, Feb 12, 2008 at 04:30:07AM +, Daniel P. Berrange wrote: + + +typedef enum { + VIR_STORAGE_POOL_BUILD_NEW = 0, /* Regular build from scratch */ + VIR_STORAGE_POOL_BUILD_REPAIR = 1, /* Repair / reinitialize

Re: [Libvir] PATCH: 2/16: Internal driver API

2008-02-14 Thread Daniel P. Berrange
On Thu, Feb 14, 2008 at 12:15:26PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: I tried to apply all of these patches, and ended up with a bunch of failed hunks. For example, the one above fails due to the fact that there is no jobs member in checked-in sources

Re: [Libvir] PATCH: 2/16: Internal driver API

2008-02-14 Thread Daniel P. Berrange
On Thu, Feb 14, 2008 at 06:24:09AM -0500, Daniel Veillard wrote: On Tue, Feb 12, 2008 at 04:30:45AM +, Daniel P. Berrange wrote: This defines the internal driver API for the storage APIs. The pattern follows that used for the existing APIs. NB, both the storage pool and storage volume

Re: [Libvir] PATCH: 0/16: Storage management APIs

2008-02-14 Thread Daniel P. Berrange
On Thu, Feb 14, 2008 at 05:51:13AM -0500, Daniel Veillard wrote: On Tue, Feb 12, 2008 at 04:28:29AM +, Daniel P. Berrange wrote: The patch series that follows provides storage management APIs for dealing with local directories, local filesystems, remote filesystems, logical volumes (LVM

Re: [Libvir] PATCH: 0/16: Storage management APIs

2008-02-14 Thread Daniel P. Berrange
On Thu, Feb 14, 2008 at 01:27:18PM +0100, Jim Meyering wrote: Daniel Veillard [EMAIL PROTECTED] wrote: ... In general I like the approach 'let's put what we consider fine first and discuss other parts later' . I guess it's the third round of review and I really find easier to comment

Re: [Libvir] Deprecated PolicyKit function

2008-02-15 Thread Daniel P. Berrange
On Fri, Feb 15, 2008 at 11:03:47AM +, Mark McLoughlin wrote: Hi, Just a heads-up ... trying to build with -Werror on Fedora rawhide, I see: Yep, I've got a patch for this pending - just need to get my rawhide box working again to test properly. Dan -- |=- Red Hat, Engineering,

Re: [Libvir] PATCH: 14/16: disk partition backend

2008-02-15 Thread Daniel P. Berrange
On Fri, Feb 15, 2008 at 05:11:03PM +0100, Jim Meyering wrote: +static const char *virStorageBackendDiskVolFormatToString(virConnectPtr conn, + int format) { +switch (format) { +case VIR_STORAGE_VOL_DISK_NONE: +

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-16 Thread Daniel P. Berrange
On Fri, Feb 15, 2008 at 10:03:30PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: ... +if (virRun(conn, (char**)mntargv, NULL) 0) { +free(src); +virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR, cannot mount %s on %s: %d

Re: [Libvir] PATCH: 10/16: general purpose helper APIs

2008-02-18 Thread Daniel P. Berrange
On Mon, Feb 18, 2008 at 10:36:06AM -0500, Daniel Veillard wrote: On Tue, Feb 12, 2008 at 04:37:08AM +, Daniel P. Berrange wrote: The SELinux code is optional, and can be replaced with calls to any other library which can provide MAC file labels, or just disabled completely

Re: [Libvir] PATCH: 9/16: main internal storage driver

2008-02-18 Thread Daniel P. Berrange
On Mon, Feb 18, 2008 at 10:25:04AM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: ... diff -r 77cf7f42edd4 src/storage_conf.c --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/src/storage_conf.cThu Feb 07 12:59:40 2008 -0500 ... +if (options-flags

Re: [Libvir] PATCH: 9/16: main internal storage driver

2008-02-18 Thread Daniel P. Berrange
On Mon, Feb 18, 2008 at 03:20:37PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: +static int virStorageSize(virConnectPtr conn, + const char *unit, + const char *val, + unsigned long long

Re: [Libvir] PATCH: 7/16: virsh core commands

2008-02-18 Thread Daniel P. Berrange
On Mon, Feb 18, 2008 at 06:12:47AM -0500, Daniel Veillard wrote: +static int +cmdPoolDelete(vshControl * ctl, vshCmd * cmd) +{ +virStoragePoolPtr pool; +int ret = TRUE; +char *name; + +if (!vshConnectionUsability(ctl, ctl-conn, TRUE)) +return FALSE; +

Re: [Libvir] PATCH: 9/16: main internal storage driver

2008-02-18 Thread Daniel P. Berrange
On Mon, Feb 18, 2008 at 09:51:28AM -0500, Daniel Veillard wrote: On Tue, Feb 12, 2008 at 04:36:04AM +, Daniel P. Berrange wrote: This patch provides the general purpose code for the storage driver. The storage_driver.{c,h} file implements the libvirt internal storage driver API

Re: [Libvir] PATCH: 13/16: iSCSI backend

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 19, 2008 at 08:45:03AM +, Mark McLoughlin wrote: On Tue, 2008-02-19 at 03:24 -0500, Daniel Veillard wrote: +# For ISCSI driver +Requires: iscsi-initiator-utils Apparently iscsi-initiator-utils exists in RHEL 4 (and 3 but we are not tergetting that old) it would be

Re: [Libvir] PATCH: 12/16: logical volume backend

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 19, 2008 at 03:43:11AM -0500, Daniel Veillard wrote: diff -r 31abfd8687b3 qemud/qemud.c --- a/qemud/qemud.c Thu Feb 07 13:44:25 2008 -0500 +++ b/qemud/qemud.c Thu Feb 07 14:17:16 2008 -0500 @@ -2089,7 +2089,9 @@ int main(int argc, char **argv) { if (pipe(sigpipe) 0

Re: [Libvir] PATCH: 1/16: public API

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 04:30:07AM +, Daniel P. Berrange wrote: This defines the public API for the storage pool and volume support. The naming of the APIs follows the example set by the network and domain APIs whereever the logical functions match. The main change since previous

Re: [Libvir] PATCH: 5/16: remote driver client

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 04:33:03AM +, Daniel P. Berrange wrote: This patch adds support for the storage APIs to the remote driver client end. As with the network driver, things are configured such that all virtualization drivers will end up delegating to the remote driver for storage APIs

Re: [Libvir] PATCH: 11/16: directory/fs/netfs backend

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 04:37:57AM +, Daniel P. Berrange wrote: This patch implements 3 storage pools in one go. This provides the base level 'directory' storage pool, where an existing directory contains files as volumes. This is guarenteed to be available on any OS since it just uses

Re: [Libvir] PATCH: 12/16: logical volume backend

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 04:38:39AM +, Daniel P. Berrange wrote: This patch implements a storage pool based on logical volume management. The underlying implementation calls out to LVM on Linux. A future implementation for Solaris would use the ZFS pool support to achieve the same

Re: [Libvir] PATCH: 0/16: Storage management APIs

2008-02-19 Thread Daniel P. Berrange
On Tue, Feb 12, 2008 at 04:28:29AM +, Daniel P. Berrange wrote: The patch series that follows provides storage management APIs for dealing with local directories, local filesystems, remote filesystems, logical volumes (LVM), disk partitioning, and iSCSI. It will also soon support SCSI host

Re: [Libvir] PATCH: 1/16: public API

2008-02-20 Thread Daniel P. Berrange
On Wed, Feb 20, 2008 at 02:52:54AM -0500, Daniel Veillard wrote: On Wed, Feb 20, 2008 at 04:00:39AM +, Daniel P. Berrange wrote: On Tue, Feb 12, 2008 at 04:30:07AM +, Daniel P. Berrange wrote: This defines the public API for the storage pool and volume support. The naming

Re: [Libvir] PATCH: 1/16: public API

2008-02-20 Thread Daniel P. Berrange
On Wed, Feb 20, 2008 at 04:10:30PM +, Daniel P. Berrange wrote: On Wed, Feb 20, 2008 at 02:52:54AM -0500, Daniel Veillard wrote: On Wed, Feb 20, 2008 at 04:00:39AM +, Daniel P. Berrange wrote: On Tue, Feb 12, 2008 at 04:30:07AM +, Daniel P. Berrange wrote: This defines

[Libvir] RFC: Updated async job public API

2008-02-20 Thread Daniel P. Berrange
A little over a month ago I proposed an API extension for enabling long operations to be done as asynchronous background jobs. http://www.redhat.com/archives/libvir-list/2008-January/msg00040.html While the proof of concept definitely worked, having played around thought about it a little more

Re: [Libvir] [PATCH] Use virErrorMsg in qemudReportError

2008-02-20 Thread Daniel P. Berrange
On Wed, Feb 20, 2008 at 12:28:23PM -0500, Cole Robinson wrote: Currently the qemu driver doesn't use virErrorMsg when raising error messages. This causes some errors to appear as libvir: QEMU error: if a custom string wasn't raised, which isn't all that useful. The patch below fixes this.

Re: [Libvir] [RFC] 1/3 Base linux container support

2008-02-21 Thread Daniel P. Berrange
On Wed, Feb 20, 2008 at 10:24:49PM -0800, Dave Leskovec wrote: This patch contains the base linux container support * new switch --with-lxc to enable support (off by default) Any reason this can't be on-by-default ? I know OpenVZ is off by default but I'd like to see that on by default too.

Re: [Libvir] [RFC] 2/3 Config functions for managing linux containers

2008-02-21 Thread Daniel P. Berrange
On Wed, Feb 20, 2008 at 10:25:11PM -0800, Dave Leskovec wrote: This patch contains the new files lxc_conf.c and lxc_conf.h This looks pretty good to me - you follow all our coding conventions and use all the appropriate utility / helper functions. Only thing I ca nfind to comment on so far is:

Re: [Libvir] [RFC] 3/3 Driver functions for linux container support

2008-02-21 Thread Daniel P. Berrange
On Wed, Feb 20, 2008 at 10:28:36PM -0800, Dave Leskovec wrote: This patch contains the new files lxc_driver.c and lxc_driver.h Looks fine to me. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/

Re: [Libvir] [RFC] 1/3 Base linux container support

2008-02-21 Thread Daniel P. Berrange
On Thu, Feb 21, 2008 at 02:40:07PM +, Daniel P. Berrange wrote: On Wed, Feb 20, 2008 at 10:24:49PM -0800, Dave Leskovec wrote: This patch contains the base linux container support * new switch --with-lxc to enable support (off by default) Any reason this can't be on-by-default ? I

Re: [Libvir] default hypervisor selection

2008-02-21 Thread Daniel P. Berrange
On Thu, Feb 21, 2008 at 09:26:38AM -0500, Daniel Veillard wrote: While going though the ovirt installation steps I got annoyed with the need to add -c qemu:///system each time we are trying to start a virsh command if using KVM. The dfault setup is basically to assume a Xen hypervisor if the

Re: [Libvir] [RFC] 0/3 Add Linux Container support to libvirt

2008-02-21 Thread Daniel P. Berrange
On Wed, Feb 20, 2008 at 10:24:18PM -0800, Dave Leskovec wrote: The following set of patches add the first batch of linux container support to libvirt. The work is not complete but I wanted to start getting some of this out for comments. This set of patches supports the following: * new

Re: [Libvir] default hypervisor selection

2008-02-21 Thread Daniel P. Berrange
On Thu, Feb 21, 2008 at 03:26:08PM +, Mark McLoughlin wrote: On Thu, 2008-02-21 at 14:57 +, Daniel P. Berrange wrote: On Thu, Feb 21, 2008 at 02:51:20PM +, Richard W.M. Jones wrote: I'm mostly with Dan Berrange here. Surely an environment variable is the right thing to do

Re: [libvir] [PATCH] Double free in openvzGetVPSInfo

2008-02-21 Thread Daniel P. Berrange
On Thu, Feb 21, 2008 at 03:20:41PM +, Richard W.M. Jones wrote: On Thu, Feb 21, 2008 at 06:07:48PM +0300, Anton Protopopov wrote: Hi, without this openvzGetVPSInfo() will cause double free when parse bad (i.e., really bad or empty) output from vzlist. Patch applied, thanks. Can

Re: [Libvir] 1/4 Additions to the public API

2008-02-21 Thread Daniel P. Berrange
On Thu, Feb 21, 2008 at 05:13:51PM -0500, Daniel Veillard wrote: On Thu, Feb 21, 2008 at 08:56:17PM +, Richard W.M. Jones wrote: This just adds the four new functions to the public API. [...] +/** + * virNetworkDHCPHostMapping: + * + * hostname mappings are returned by

Re: [Libvir] [RFC] 0/3 Add Linux Container support to libvirt

2008-02-21 Thread Daniel P. Berrange
On Thu, Feb 21, 2008 at 02:04:31PM -0800, Dan Smith wrote: DL Right. For a container, init would be the only member of os DL as well right? At the moment, I don't know of anything else that DL we will be adding to container. No, os contains lots of stuff, just none of it applies to a

Re: [Libvir] [PATCH]: Make iSCSI login actually work

2008-02-21 Thread Daniel P. Berrange
On Thu, Feb 21, 2008 at 05:27:17PM -0500, Chris Lalancette wrote: Hello, I mentioned this before, but this patch must have been dropped when Dan committed storage stuff to CVS. In order for iSCSI login to work properly, you must properly --sendtargets before trying to login, otherwise

Re: [Libvir] Problem using libvirtd on RHEL5.1

2008-02-22 Thread Daniel P. Berrange
On Fri, Feb 22, 2008 at 04:56:24PM -0300, Tiago Cruz wrote: Hello 8-) I'm using libvirt-0.4.0-1 (re)compiled from libvirt-0.4.0.tar.gz, on Red Hat EL 5.1 x86_64. The problem is: # /etc/init.d/libvirtd start Starting libvirtd daemon: libvir: QEMU error : cannot create bridge 'virbr0'

Re: [Libvir] Proposal: More script hooks for interface type='ethernet'

2008-02-24 Thread Daniel P. Berrange
On Sat, Feb 23, 2008 at 09:38:02PM -0600, Charles Duffy wrote: I have a few issues with interface type='ethernet': - The requirement that either (1) the tap device already exists and has a constant name, or (2) the tap device can be created by the current user without privilege

Re: [Libvir] [PATCH] default hypervisor selection

2008-02-24 Thread Daniel P. Berrange
On Fri, Feb 22, 2008 at 10:59:43AM -0500, Daniel Veillard wrote: Okay, first patch enclosed, it seems to work for me: - grow the internal driver adding a const char *probe(void) entry point, it returns the URI to use to access the driver I did a bit of reformating of

Re: [Libvir] [Discussion] 0/4 Implement DHCP host mappings for virtual networks

2008-02-24 Thread Daniel P. Berrange
On Fri, Feb 22, 2008 at 08:04:26AM +, Mark McLoughlin wrote: Hi Rich, On Thu, 2008-02-21 at 20:54 +, Richard W.M. Jones wrote: What this patch allows you to do is to create a table of IP address to host (defined by its hardware / MAC address) for each virtual network. Optionally

Re: [Libvir] 1/4 Additions to the public API

2008-02-24 Thread Daniel P. Berrange
On Fri, Feb 22, 2008 at 11:07:15AM +, Richard W.M. Jones wrote: On Fri, Feb 22, 2008 at 10:47:44AM +, Mark McLoughlin wrote: On Fri, 2008-02-22 at 05:16 -0500, Daniel Veillard wrote: I also agree to some extend with Mark, the on disk storage should probably go in the network

Re: [Libvir] 1/4 Additions to the public API

2008-02-25 Thread Daniel P. Berrange
On Mon, Feb 25, 2008 at 10:07:48AM +, Richard W.M. Jones wrote: On Sun, Feb 24, 2008 at 10:20:24PM +, Daniel P. Berrange wrote: We can't change the semantics of these calls. virNetworkDefineXML() explicitly does not affect the current live config, saving the config to take effect

[Libvir] [PATCH 0/2] Re-organize generation / handling of capabilities data

2008-02-25 Thread Daniel P. Berrange
Earlier today I started the 'simple' task of extending the QEMU driver to support Xenner for running Xen paravirt guests under KVM. This was at first glance easy because it basically looks like QEMU - in fact all we needed was to extend the capabilities XML for the QEMU driver to include data

Re: [Libvir] [PATCH 1/2] Add internal API for managing capabilities data

2008-02-25 Thread Daniel P. Berrange
/capabilities.c --- /dev/null 1 Jan 1970 00:00:00 - +++ src/capabilities.c 26 Feb 2008 04:47:00 - @@ -0,0 +1,696 @@ +/* + * capabilities.c: hypervisor capabilities + * + * Copyright (C) 2006-2008 Red Hat, Inc. + * Copyright (C) 2006-2008 Daniel P. Berrange + * + * This library is free software

Re: [Libvir] [PATCH] default hypervisor selection

2008-02-26 Thread Daniel P. Berrange
On Tue, Feb 26, 2008 at 03:34:56AM -0500, Daniel Veillard wrote: Okay, commited, seems to work well for me as root and as normal user on RHEL-5.1 , but on Fedora-8 as non-root this doesn't work the debug shows DEBUG: libvirt.c: do_open (Probed qemu:///session) DEBUG: libvirt.c:

Re: [Libvir] [PATCH]Change MAC address to case insensitive

2008-02-26 Thread Daniel P. Berrange
On Tue, Feb 26, 2008 at 12:13:43PM +0100, Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: I'll apply this today (using our STRCASEEQ macros) if no one else objects. Hi, What do you think about using a MAC-address-specific comparison function? I.e., one that is not only

Re: [Libvir] [PATCH 1/2] Add internal API for managing capabilities data

2008-02-26 Thread Daniel P. Berrange
On Tue, Feb 26, 2008 at 09:39:49AM +, Richard W.M. Jones wrote: Yes, this all looks good. Another advantage of doing this is that we can be sure that the capabilities XML generated by each driver will have the same schema. Yes indeed - this is a very good benefit, particularly as we

Re: [Libvir] [PATCH 1/2] Add internal API for managing capabilities data

2008-02-26 Thread Daniel P. Berrange
On Tue, Feb 26, 2008 at 08:24:53AM -0500, Daniel Veillard wrote: On Tue, Feb 26, 2008 at 12:52:32PM +, Daniel P. Berrange wrote: On Tue, Feb 26, 2008 at 09:39:49AM +, Richard W.M. Jones wrote: Yes, this all looks good. Another advantage of doing this is that we can be sure

Re: [Libvir] Re: RFC: Supporting serial parallel ports for QEMU (and improving Xen)

2008-02-26 Thread Daniel P. Berrange
On Tue, Feb 26, 2008 at 08:01:11AM -0600, Charles Duffy wrote: Daniel P. Berrange wrote: Lots of difficult bits, but I'm starting to get onto coding it. Was this ever completed and merged? I don't see it documented at http://libvirt.org/format.html No, I never got a nice solution

Re: [Libvir] [PATCH 0/2] Re-organize generation / handling of capabilities data

2008-02-26 Thread Daniel P. Berrange
On Tue, Feb 26, 2008 at 08:29:54AM -0500, Daniel Veillard wrote: On Tue, Feb 26, 2008 at 04:57:56AM +, Daniel P. Berrange wrote: Earlier today I started the 'simple' task of extending the QEMU driver to support Xenner for running Xen paravirt guests under KVM. This was at first glance

Re: [Libvir] [PATCH] Avoid link errors with configure --disable-shared.

2008-02-27 Thread Daniel P. Berrange
On Wed, Feb 27, 2008 at 04:52:21PM +0100, Jim Meyering wrote: I got link errors when building with --disable-shared, and finally fixed it. Here's most of the solution. The patch after this one adjusts the gcov (test-coverage)-related things so that works with the new setup, too. diff --git

[Libvir] PATCH: Set mac address on TUN device to fix Xenner

2008-02-27 Thread Daniel P. Berrange
The QEMU driver pre-allocates a TAP device and connects it to a bridge when using virtual networking. The FD associated with the tap device is then passed to QEMU. When running Xen guests, Xenner needs to turn this FD back into a TUN device name. It does this by querying the hardware address of

Re: [Libvir] many more translatable strings need to be marked

2008-03-04 Thread Daniel P. Berrange
On Fri, Feb 29, 2008 at 10:02:35AM -0500, Daniel Veillard wrote: On Fri, Feb 29, 2008 at 03:48:18PM +0100, Jim Meyering wrote: I've found many more strings that should be marked for translation. The first part of this change is to add to the list of diagnostic-printing function names in

Re: [Libvir] [PATCH] Add xen and hvm guest types to test drive caps

2008-03-04 Thread Daniel P. Berrange
On Tue, Mar 04, 2008 at 04:17:34PM -0500, Cole Robinson wrote: The attached patch adds xen and hvm guest types to the test driver's capabilities. It was currently set to offer only a 'linux' type which doesn't seem to follow the conventions of the other drivers, so I removed that. Please yell

Re: [Libvir] Re: RPM build issue

2008-03-04 Thread Daniel P. Berrange
On Tue, Mar 04, 2008 at 05:59:53PM -0800, Vadim Zaliva wrote: It was due to missing build dependency in SRPM: e2fsprogs-devel. Hmm, are you sure about that ? AFAIK, we don't have any (direct) dependancy on e2fsprogs-devel. Our primary dependancy for this particular binary is the parted-devel

Re: [Libvir] Re: RPM build issue

2008-03-05 Thread Daniel P. Berrange
On Tue, Mar 04, 2008 at 07:07:26PM -0800, Vadim Zaliva wrote: On Mar 4, 2008, at 19:03, Daniel P. Berrange wrote: Hmm, are you sure about that ? AFAIK, we don't have any (direct) dependancy on e2fsprogs-devel. Our primary dependancy for this particular binary is the parted-devel RPM

[Libvir] PATCH: Fix libvirtd to not shutdown at startup

2008-03-09 Thread Daniel P. Berrange
Changes to the daemon to make it called qemudShutdown() broke the network driver when run in --daemon mode. This is because the main daemon forks into the background, and the original PID then exits destroying any active networks removing the iptables rules. # /usr/sbin/libvirtd --daemon

[Libvir] PATCH: Remove use of polkit-grant

2008-03-09 Thread Daniel P. Berrange
I formerly added support for calling polkit-auth and/or polkit-grant to get PolicyKit credentials. It turns out that polkit-grant is fundamentally flawed unusable, so this patch removes use of polkit-grant. This is not a big issue, since polkit-auth is more functional and present in 0.7 or later.

[Libvir] PATCH: Don't make connection read-only when non-root

2008-03-09 Thread Daniel P. Berrange
The virsh commands has long forced the connection to be read-only if running as non-root. This is bogus because it is perfectly capable of authenticating full read-write connections as non-root since we gained kerberos/policykit support. The user can always use the explicit --readonly flag if they

Re: [Libvir] Patch for routed virtual networks

2008-03-09 Thread Daniel P. Berrange
On Sat, Mar 08, 2008 at 04:33:32PM +0100, Mads Chr. Olesen wrote: Greetings! The attached patch adds support for having routed virtual networks, in addition to the masquerading setup possible with the forward / stanza. I have added a route dev=ethX / stanza (dev is optional), completely

Re: [Libvir] PATCH: Allow Xen HVM kernel+initrd booting

2008-03-09 Thread Daniel P. Berrange
On Fri, Mar 07, 2008 at 02:50:03PM +, Mark McLoughlin wrote: On Sun, 2008-02-03 at 18:47 +, Daniel P. Berrange wrote: - -if ((str == NULL) || (strcmp(str, hvm))) { -res = virDomainParseXMLOSDescPV(conn, node

Re: [Libvir] PATCH: Allow Xen HVM kernel+initrd booting

2008-03-10 Thread Daniel P. Berrange
On Mon, Mar 10, 2008 at 11:33:49AM +, Richard W.M. Jones wrote: On Sun, Mar 09, 2008 at 09:11:49PM +, Daniel P. Berrange wrote: The problem is that the Xen driver expects the OS type to be 'linux' but the capabilities XML is advertising the OS type as 'xen'. Technically 'xen

Re: [Libvir] virsh start problem + patch

2008-03-10 Thread Daniel P. Berrange
On Mon, Mar 10, 2008 at 11:37:19AM +, Richard W.M. Jones wrote: On Sat, Mar 08, 2008 at 09:47:43AM +0100, Toth Istvan wrote: I've looked into the virsh code, and it seems that it was written with only only old-style xen in mind, and xen 3.1's managed domains break the logic. I don't

Re: [libvir] Could not connect to xend

2008-03-11 Thread Daniel P. Berrange
On Tue, Mar 11, 2008 at 05:23:24PM +0300, Anton Protopopov wrote: Hi. When I tried to run virsh to connect to xen, I have got an error --- libvirt failed to open connection to xend. Here is output with DEBUG enabled. What kind of additional information do you need? [EMAIL PROTECTED] ~]#

Re: [Libvir] virsh start problem + patch

2008-03-11 Thread Daniel P. Berrange
On Tue, Mar 11, 2008 at 06:57:33AM +0100, Toth Istvan wrote: # virsh list --all Id Name State -- 0 Domain-0 running - windows-xen shut off - windows-xen2 no state # xm list Name

Re: [Libvir] Release of libvirt-0.4.1

2008-03-12 Thread Daniel P. Berrange
On Wed, Mar 12, 2008 at 01:38:05PM +0100, Guido G?nther wrote: On Fri, Mar 07, 2008 at 04:23:13PM +0100, Guido Günther wrote: Hi Daniel. On Mon, Mar 03, 2008 at 10:13:12AM -0500, Daniel Veillard wrote: It was really time for a new release, quite a lot of patches had accumulated

[Libvir] PATCH: Fix dir/fs storage pool when SELinux is disabled

2008-03-14 Thread Daniel P. Berrange
When SELinux is disabled fgetfilecon() may well return -1, if a file has no extended attribute with security context data. This causes the storage pool to skip that file. The fix is to check whether errno is ENODATA and treat that as an expected error case ignore it. Dan. Index:

[Libvir] PATCH: Fix virStoragePoolCreate() operation

2008-03-14 Thread Daniel P. Berrange
The virStoragePoolCreate() was not checking for a potentially NULL field against startPool() backend driver. It was also failing to run the refresh operation after starting it. The former caused a crash, the latter caused no volumes to show up Dan. Index: src/storage_driver.c

Re: [Libvir] PATCH: Fix xen unified driver open logic

2008-03-17 Thread Daniel P. Berrange
On Tue, Mar 11, 2008 at 06:47:47AM -0400, Daniel Veillard wrote: On Mon, Mar 10, 2008 at 07:09:36PM +, Daniel P. Berrange wrote: When adding PolicyKit support we disabled the proxy driver, but did not correctly fix up the Xen unified driver. The result is that it is still trying to run

Re: [Libvir] PATCH: Fix dir/fs storage pool when SELinux is disabled

2008-03-17 Thread Daniel P. Berrange
On Mon, Mar 17, 2008 at 05:36:49PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: When SELinux is disabled fgetfilecon() may well return -1, if a file has no extended attribute with security context data. This causes the storage pool to skip that file. The fix

Re: [libvir] How to seek a running QEMU instance

2008-03-18 Thread Daniel P. Berrange
On Tue, Mar 18, 2008 at 06:38:44PM +, Richard W.M. Jones wrote: On Tue, Mar 18, 2008 at 05:47:38PM +0300, Anton Protopopov wrote: I have the following question. How can virsh (or, more accurately, libvirt) detect a running QEMU vm, when latter was already started? For example, I have

Re: [Libvir] [PATCH] * qemud/remote.c: Don't include getopt.h. Not used.

2008-03-19 Thread Daniel P. Berrange
On Wed, Mar 19, 2008 at 01:11:18PM +, Richard W.M. Jones wrote: On Wed, Mar 19, 2008 at 02:08:44PM +0100, Jim Meyering wrote: I had a few in-progress changes from a week or two ago, and am clearing the decks. I added a new build-checking rule (coming separately) and it exposed an

Re: [Libvir] [PATCH] * qemud/remote.c: Don't include getopt.h. Not used.

2008-03-19 Thread Daniel P. Berrange
On Wed, Mar 19, 2008 at 01:50:27PM +, Richard W.M. Jones wrote: On Wed, Mar 19, 2008 at 01:25:33PM +, Daniel P. Berrange wrote: On Wed, Mar 19, 2008 at 01:11:18PM +, Richard W.M. Jones wrote: On Wed, Mar 19, 2008 at 02:08:44PM +0100, Jim Meyering wrote: I had a few

Re: [Libvir] [PATCH] Add new testing framework and the first test to use it.

2008-03-20 Thread Daniel P. Berrange
On Wed, Mar 19, 2008 at 03:27:30PM +0100, Jim Meyering wrote: A week or so ago, I read a bug report on this list with a simple reproducer + fix that was just begging for a test suite addition. This change adds framework to make that easy, and adds the first test. I uncovered problems in

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-20 Thread Daniel P. Berrange
On Thu, Mar 20, 2008 at 12:11:39PM -0400, Daniel Veillard wrote: On Wed, Mar 19, 2008 at 11:14:59PM -0700, Dave Leskovec wrote: This patch adds the lxc_driver source files. [...] +static int lxcCheckContainerSupport( void ) +{ +int rc = 0; +int flags =

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Daniel P. Berrange
On Thu, Mar 20, 2008 at 02:43:28PM -0700, Dave Leskovec wrote: Daniel Veillard wrote: [...] +static int lxcListDomains(virConnectPtr conn, int *ids, int nids) +{ +lxc_driver_t *driver = (lxc_driver_t *)conn-privateData; +lxc_vm_t *vm; +int numDoms = 0; + +for (vm =

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Daniel P. Berrange
On Wed, Mar 19, 2008 at 11:16:32PM -0700, Dave Leskovec wrote: This patch adds the start container support. A couple new source files are added - lxc_container.h and lxc_container.c These contain the setup code that runs within the container namespace prior to exec'ing the user specified

[Libvir] Adding suppport for daemon restarts with stateful drivers

2008-03-21 Thread Daniel P. Berrange
The libvirt daemon has the ability to reload itself by sending it SIGHUP. For the QEMU network drivers this makes it reload the config files for VMs and re-init the iptables rules. It would be desirable though to allow the daemon to perform a full restart. Principally this is for RPM upgrades

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 06:32:45PM +0100, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: ... The following patches make the driver properly integrate with the stateful driver APIs. It also changes the config files to be named by on VM name instead of UUID, since

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 01:33:55PM -0400, Daniel Veillard wrote: On Fri, Mar 21, 2008 at 10:30:36AM -0700, Dan Smith wrote: DB The patch I posted to make it use the state driver means all LXC DB driver calls go via the daemon. So nothing happens directly as a DB child of the calling

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 01:29:07PM -0400, Daniel Veillard wrote: On Fri, Mar 21, 2008 at 10:17:35AM -0700, Dave Leskovec wrote: Daniel Veillard wrote: I will look now at cleaning up the parsing code as explained in my review, that I can do easilly, Excellent. Thanks! No

  1   2   3   4   5   6   7   8   9   10   >