Re: [libvirt] PATCH: 13/28: Reduce return points in network driver

2008-12-03 Thread Daniel Veillard
On Sun, Nov 30, 2008 at 11:55:03PM +, Daniel P. Berrange wrote: This patch reduces the number of return points in the network driver methods okay, looks fine, +1 Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ [EMAIL PROTECTED] | Rpmfind RPM search

Re: [libvirt] broken pipe?

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 02:25:58AM -0500, Itamar Heim wrote: As no one answered my previous problem., I'm trying to build latest libvirt to be able to be more productive and find out if happens on later versions. Some silly questions to save time (on FC10 64): 1. Can one build

Re: [libvirt] PATCH: 14/28: Thread safety for network driver

2008-12-03 Thread Daniel Veillard
On Sun, Nov 30, 2008 at 11:55:51PM +, Daniel P. Berrange wrote: This patch makes the network driver thread safe, following the pattern of the earlier patches @@ -95,6 +107,7 @@ networkAutostartConfigs(struct network_d unsigned int i; Hum, you're not locking the driver itself

Re: [libvirt] how to install updated python bindings

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 12:44:17AM -0500, ente linux wrote: hi i was trying to install libvirt 0.5 on my centos 5 machine which by default have libvirt 0.4. But after installing from the source of libvirt, still the output of i get from python remains that of 0.4 import libvirt

Re: [libvirt] is libvirt-python default in libvirt compilation from source?

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 12:46:48PM +0530, Shanmuga Rajan wrote: I was trying to install libvirt 0.5.0 from source.. It seems it went well. but when i tried to import libvirt module in python i got error no module named libvirt then i searched entire system for libvirt.py then i came to know

Re: [libvirt] PATCH: 14/28: Thread safety for network driver

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 10:32:58AM +0100, Daniel Veillard wrote: On Sun, Nov 30, 2008 at 11:55:51PM +, Daniel P. Berrange wrote: This patch makes the network driver thread safe, following the pattern of the earlier patches @@ -95,6 +107,7 @@ networkAutostartConfigs(struct network_d

Re: [libvirt] PATCH: 16/28: Thread safety for storage driver

2008-12-03 Thread Daniel Veillard
On Sun, Nov 30, 2008 at 11:57:47PM +, Daniel P. Berrange wrote: This patch makes the storage driver thread safe [...] static void storageDriverAutostart(virStorageDriverStatePtr driver) { Hum, there is something I find incherent, in the network side we don't lock the driver but we lock

Re: [libvirt] PATCH: 14/28: Thread safety for network driver

2008-12-03 Thread Daniel Veillard
On Wed, Dec 03, 2008 at 09:44:50AM +, Daniel P. Berrange wrote: On Wed, Dec 03, 2008 at 10:32:58AM +0100, Daniel Veillard wrote: On Sun, Nov 30, 2008 at 11:55:51PM +, Daniel P. Berrange wrote: This patch makes the network driver thread safe, following the pattern of the earlier

Re: [libvirt] PATCH: 14/28: Thread safety for network driver

2008-12-03 Thread Jim Meyering
Daniel Veillard [EMAIL PROTECTED] wrote: On Wed, Dec 03, 2008 at 09:44:50AM +, Daniel P. Berrange wrote: On Wed, Dec 03, 2008 at 10:32:58AM +0100, Daniel Veillard wrote: On Sun, Nov 30, 2008 at 11:55:51PM +, Daniel P. Berrange wrote: This patch makes the network driver thread safe,

Re: [libvirt] PATCH: 16/28: Thread safety for storage driver

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 10:59:20AM +0100, Daniel Veillard wrote: On Sun, Nov 30, 2008 at 11:57:47PM +, Daniel P. Berrange wrote: This patch makes the storage driver thread safe [...] static void storageDriverAutostart(virStorageDriverStatePtr driver) { Hum, there is something I

Re: [libvirt] PATCH: 17/28: Reduce return paths in OpenVZ driver

2008-12-03 Thread Daniel Veillard
On Sun, Nov 30, 2008 at 11:58:50PM +, Daniel P. Berrange wrote: This patch reduces the number of exit paths in the OpenVZ driver methods [...] +#define PROGRAM_SENTINAL ((char *)0x1) +static void openvzSetProgramSentinal(const char **prog, const char *key) +{ +const char **tmp =

Re: [libvirt] PATCH: 18/28: Thread safety for OpenVZ driver

2008-12-03 Thread Daniel Veillard
On Sun, Nov 30, 2008 at 11:59:55PM +, Daniel P. Berrange wrote: This patch makes the OpenVZ driver thread safe Quite regular, looks just fine, +1 Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ [EMAIL PROTECTED] | Rpmfind RPM search engine

Re: [libvirt] PATCH: 19/28: Reduce return paths for node device driver

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:03:39AM +, Daniel P. Berrange wrote: This patch reduces the number of return paths in the node device driver methods In doing this I noticed an annoying problem in the public API contract for virNodeDeviceGetParent. It returns a 'const char *', but the remote

Re: [libvirt] PATCH: 20/28: Thread safety for node device driver

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:05:40AM +, Daniel P. Berrange wrote: This patch makes the node device driver thread safe. Almost. There is on outstanding problem in that the 'reload' method is implemented by just calling shutdown/startup. This causes the mutex we're locking on to be free'd

Re: [libvirt] how to install updated python bindings

2008-12-03 Thread Daniel Veillard
On Wed, Dec 03, 2008 at 09:40:55AM +, Daniel P. Berrange wrote: On Wed, Dec 03, 2008 at 12:44:17AM -0500, ente linux wrote: hi i was trying to install libvirt 0.5 on my centos 5 machine which by default have libvirt 0.4. But after installing from the source of libvirt, still the

[libvirt] Adding VirtualBox support to libvirt

2008-12-03 Thread Pritesh Kothari
Hi, I am in the process of adding support for virtualbox in libvirt. Basically Virtualbox exports its API through XPCOM. Now to simplify things I was thinking of using C++ and already existing xpcom component in virtualbox but since libvirt exports C API i am not sure if i should use C++ or

Re: [libvirt] Adding VirtualBox support to libvirt

2008-12-03 Thread Daniel Veillard
On Wed, Dec 03, 2008 at 02:20:44PM +0100, Pritesh Kothari wrote: Hi, I am in the process of adding support for virtualbox in libvirt. Basically Virtualbox exports its API through XPCOM. Now to simplify things I was thinking of using C++ and already existing xpcom component in virtualbox

[libvirt] Re: [PATCH] bridge: set MTU of tap iface to the same value of the bridge

2008-12-03 Thread Eduardo Habkost
On Tue, Dec 02, 2008 at 10:15:51PM -0800, Chris Wright wrote: * Eduardo Habkost ([EMAIL PROTECTED]) wrote: +static int brSetInterfaceMtu(brControl *ctl, + const char *bridge, + const char *ifname) +{ +int mtu = ifGetMtu(ctl,

[libvirt] Re: [PATCH] bridge: set MTU of tap iface to the same value of the bridge

2008-12-03 Thread Mark McLoughlin
On Wed, 2008-12-03 at 11:14 -0200, Eduardo Habkost wrote: + * Returns the MTU value in case of success. + * On error, returns -1 and sets errno accordingly + */ +static int ifGetMtu(brControl *ctl, const char *ifname) You could make this return -errno on error. No big deal, though. Cheers,

Re: [libvirt] PATCH: 21/28: Fill in locking stubs

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:09:21AM +, Daniel P. Berrange wrote: This patch fills in the previous stub methods for locking/unlocking internal objects. With the following methods return a locked object virDomainFindByID virDomainFindByName virDomainFindByUUID

Re: [libvirt] PATCH: 22/28: Refactor libvirtd RPC call dispatcher

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:13:00AM +, Daniel P. Berrange wrote: This refactors the libvirtd RPC call dispatcher code to be driven off a table lookup, rather than a giant switch. This dramatically reduces the stack usage of this dispatcher and makes the code more efficient, since GCC

Re: [libvirt] PATCH: 23/28: Replace client linked list with array

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:14:04AM +, Daniel P. Berrange wrote: This replaces the linked list of 'struct qemud_client' instances with an array instead, allowing easy fine grained per-client locking +1 I'm still a bit afraid of those memmove scattered around the array code, and would

[libvirt] Re: [PATCH] bridge: set MTU of tap iface to the same value of the bridge

2008-12-03 Thread Eduardo Habkost
On Wed, Dec 03, 2008 at 02:14:24PM +, Mark McLoughlin wrote: On Wed, 2008-12-03 at 11:14 -0200, Eduardo Habkost wrote: + * Returns the MTU value in case of success. + * On error, returns -1 and sets errno accordingly + */ +static int ifGetMtu(brControl *ctl, const char *ifname)

Re: [libvirt] PATCH: 25/28: Thread safety for libvirtd event loop

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:18:24AM +, Daniel P. Berrange wrote: This patch makes the event loop in the libvirtd daemon thread safe, and re-entrant. This allows one thread to add/remove/update timers/file handle watches while other thread is doing the poll. This sometimes requires that we

Re: [libvirt] PATCH: 24/28: Change RPC handler error contract

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:16:29AM +, Daniel P. Berrange wrote: The current RPC handler methods have two possible return codes, -1 and -2, both indicate that an error occurred, but one says that the error has been serialized onto the outgoing dispatch buffer already, the other says that

Re: [libvirt] PATCH: 26/28: Threaded dispatch for the libvirt daemon

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:21:10AM +, Daniel P. Berrange wrote: This patch makes the libvirtd daemon itself use mutliple threads. Each individual client is still serialized, but mutliple clients can now be handled in parallel. This introduces a pool of worker threads to handle RPC call

Re: [libvirt] PATCH: 25/28: Thread safety for libvirtd event loop

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 03:48:05PM +0100, Daniel Veillard wrote: On Mon, Dec 01, 2008 at 12:18:24AM +, Daniel P. Berrange wrote: This patch makes the event loop in the libvirtd daemon thread safe, and re-entrant. This allows one thread to add/remove/update timers/file handle watches

Re: [libvirt] PATCH: 27/28: Configurable threading in libvirtd

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:22:49AM +, Daniel P. Berrange wrote: This patch extends the libvirtd configuration file to allow various thread related parameters to be tuned. It introduces a limit on the number of client connections allowed over TCP socket to prevent DOS attacks on the machine

Re: [libvirt] PATCH: 28/28: Remove unused param in QEMU monitor APIs

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:25:17AM +, Daniel P. Berrange wrote: The QEMU driver internal API for interacting with the monitor console takes a 'struct qemud_driver *' parameter. This is a problem because any access to this struct must be protected by a lock, but we do not want to hold the

Re: [libvirt] PATCH: 0/28: Thread safety for libvirtd daemon and drivers

2008-12-03 Thread Daniel Veillard
On Mon, Dec 01, 2008 at 12:26:48AM +, Daniel P. Berrange wrote: This is a diffstat summary for the combined series of 28 patches Okay, my take at this point is that those should be commited with the few fix found my manual examination, maybe extend the documentation a bit, and start

Re: [libvirt] [PATCH] also look for /usr/bin/kvm

2008-12-03 Thread Daniel Veillard
On Tue, Dec 02, 2008 at 10:22:28PM +0100, Guido Günther wrote: We do so in qemudCapsInitGuest() but not in qemudProbe(). O.k. to apply? -- Guido Looks fine to me ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ [EMAIL PROTECTED] | Rpmfind RPM search

Re: [libvirt] Re: [PATCH/RFC] kvm/qemu vs libvirtd restarts

2008-12-03 Thread Guido Günther
On Sun, Nov 30, 2008 at 12:43:48PM +0100, Guido Günther wrote: From 87db4a698ed9b49294c0f94137fc6beef13bd4e8 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Guido=20G=C3=BCnther?= [EMAIL PROTECTED] Date: Tue, 25 Nov 2008 13:02:43 +0100 Subject: [PATCH] differentiate between active and inactive

Re: [libvirt] PATCH: 0/28: Thread safety for libvirtd daemon and drivers

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 04:18:21PM +0100, Daniel Veillard wrote: On Mon, Dec 01, 2008 at 12:26:48AM +, Daniel P. Berrange wrote: This is a diffstat summary for the combined series of 28 patches Okay, my take at this point is that those should be commited with the few fix found my

Re: [libvirt] PATCH: 0/28: Thread safety for libvirtd daemon and drivers

2008-12-03 Thread Daniel Veillard
On Wed, Dec 03, 2008 at 06:52:32PM +, Daniel P. Berrange wrote: On Wed, Dec 03, 2008 at 04:18:21PM +0100, Daniel Veillard wrote: On Mon, Dec 01, 2008 at 12:26:48AM +, Daniel P. Berrange wrote: This is a diffstat summary for the combined series of 28 patches Okay, my take at

Re: [libvirt] PATCH: 0/28: Thread safety for libvirtd daemon and drivers

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 08:20:36PM +0100, Daniel Veillard wrote: On Wed, Dec 03, 2008 at 06:52:32PM +, Daniel P. Berrange wrote: On Wed, Dec 03, 2008 at 04:18:21PM +0100, Daniel Veillard wrote: On Mon, Dec 01, 2008 at 12:26:48AM +, Daniel P. Berrange wrote: This is a diffstat

RE: [libvirt] broken pipe?

2008-12-03 Thread Itamar Heim
Thanks for the tips. Next batch of issues... 1. while still trying to build manually... Any estimation on when/if 0.5 will make it to F10? 2. I'm using git, not cvs. Are these error in autobuild.sh of any significance? autopoint: *** cvs program not found autopoint: *** Stop. 3. the blocking

Re: [libvirt] PATCH: 0/28: Thread safety for libvirtd daemon and drivers

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 06:52:32PM +, Daniel P. Berrange wrote: On Wed, Dec 03, 2008 at 04:18:21PM +0100, Daniel Veillard wrote: On Mon, Dec 01, 2008 at 12:26:48AM +, Daniel P. Berrange wrote: This is a diffstat summary for the combined series of 28 patches Okay, my take at

Re: [libvirt] PATCH: 0/28: Thread safety for libvirtd daemon and drivers

2008-12-03 Thread Daniel P. Berrange
On Wed, Dec 03, 2008 at 07:44:02PM +, Daniel P. Berrange wrote: Its fairly easy to extend to track other rules we define. eg validate that you lock the 'qemud_driver *' object before locking the virDomainObjPtr instance. It can now also do - Check that you lock the driver before an

Re: [libvirt] PATCH: 0/28: Thread safety for libvirtd daemon and drivers

2008-12-03 Thread Chris Wright
* Daniel P. Berrange ([EMAIL PROTECTED]) wrote: (* * This is the list of all libvirt methods which return * pointers to locked objects *) let lockedObjMethods = [ virDomainFindByID; virDomainFindByUUID; virDomainFindByName; virDomainAssignDef; ... All quite cool. Anyway