Re: [libvirt] [PATCH] add the check whether the domain has alreadyused a disk which attach

2008-11-14 Thread S.Sakamoto
attach-disk does not give an error, when the domain which is attached has already used the source which attach. This has danger of the data corruption. I make the patch to add the check of this. This patch outputs an error, when the domain which is

Re: [libvirt] PATCH: 2/12: Make use of versioned linker scripts

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 09:44:42PM +, Daniel P. Berrange wrote: On Thu, Nov 13, 2008 at 06:31:04PM +0100, Daniel Veillard wrote: When I removed the __ from the 'private' symbols exported, this internal driver typedef now clashes with the following public symbol: okay, just one more

Re: [libvirt] [PATCH]: Implement Qemu/KVM live migration

2008-11-14 Thread Daniel Veillard
On Wed, Nov 12, 2008 at 09:29:12AM +0100, Daniel Veillard wrote: On Tue, Nov 11, 2008 at 10:11:40PM +, Daniel P. Berrange wrote: Now that the QEMU bug is fixed, I'm inclined to say we should commit this migration support - minus the sleep(5) of course. It is well overdue to have

Re: [libvirt] PATCH: 4/12: Refactoring URI probing

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 05:25:53PM +, Daniel P. Berrange wrote: This patch changes the way hypervisor URIs are probed when NULL is passed to the virConnectOpen() method. Previously we had an explicit probe method called in each driver. This does not work when we move some drivers out of

Re: [libvirt] PATCH: 5/12: Module build linking

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 05:27:48PM +, Daniel P. Berrange wrote: This patch changes the module biuld so that stateful drivers like QEMU and LXC are directly linked into the libvirtd daemon, and not part of the libvirt.so file. It also does this for network and storage drivers. We need to

Re: [libvirt] PATCH: 2/12: Make use of versioned linker scripts

2008-11-14 Thread Daniel P. Berrange
On Thu, Nov 13, 2008 at 05:21:23PM +, Daniel P. Berrange wrote: This patch changes the way we use linker scripts to have fully versioned symbols, and a versioned private section for symbols needed by libvirtd and virsh. If you look at the version script below, you'll see that I've added

[libvirt] RFC: Add a 'reason' argument for domain events ?

2008-11-14 Thread Daniel P. Berrange
We currently have a set of domain lifecycle events VIR_DOMAIN_EVENT_ADDED = 0, VIR_DOMAIN_EVENT_REMOVED = 1, VIR_DOMAIN_EVENT_STARTED = 2, VIR_DOMAIN_EVENT_SUSPENDED = 3, VIR_DOMAIN_EVENT_RESUMED = 4, VIR_DOMAIN_EVENT_STOPPED = 5, VIR_DOMAIN_EVENT_SAVED =

Re: [libvirt] [RFC] making (newly public) EventImpl interface moreconsistent

2008-11-14 Thread Daniel P. Berrange
On Wed, Nov 05, 2008 at 05:32:36PM -0500, David Lively wrote: Ugh. I see what you mean. It seems more complicated than that, though. For one thing, the AvahiWatch/AvahiPoll stuff is sufficiently abstract that it doesn't mention DBusConnection (or any other DBus type, AFAIK), so there's no

Re: [libvirt] PATCH: 4/12: Refactoring URI probing

2008-11-14 Thread Daniel P. Berrange
On Fri, Nov 14, 2008 at 11:26:49AM +0100, Daniel Veillard wrote: On Thu, Nov 13, 2008 at 05:25:53PM +, Daniel P. Berrange wrote: This patch changes the way hypervisor URIs are probed when NULL is passed to the virConnectOpen() method. Previously we had an explicit probe method called in

Re: [libvirt] PATCH: 6/12: Optional dlopen() support

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 05:29:15PM +, Daniel P. Berrange wrote: This patch is a small incremental change to optionally allow us to build every driver as a dlopen()able module. This is disabled by default for now. I'm not sure whether this is hugely usefl or not, but it was easy enough to

Re: [libvirt] PATCH: 7/12: Public API for node devices

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 05:30:29PM +, Daniel P. Berrange wrote: This patch is the public API parts of the node device enumeration code. No changes since David's last submission of this, except for some Makefile tweaks okidoc, reviewed many times already, +1 Daniel -- Daniel Veillard

[libvirt] [PATCH] avoid format string warnings

2008-11-14 Thread Jim Meyering
From f06595fb110e1e5a4c4f6ea8c729da3341f89ac4 Mon Sep 17 00:00:00 2001 From: Jim Meyering [EMAIL PROTECTED] Date: Fri, 14 Nov 2008 13:19:29 +0100 Subject: [PATCH] avoid format string warnings * src/openvz_driver.c (ADD_ARG_LIT): Add %s arg before _(...). * src/qemu_driver.c (PCI_ATTACH_OK_MSG):

RE: [libvirt] RFC: Add a 'reason' argument for domain events ?

2008-11-14 Thread Ben Guthro
To revisit the DEFINED, UNDEFINED topic - I have been giving this some thought, and it seems like it is redundant information to me. Doesn't the existence of a config file define the difference between a transient and a persistent domain? Therefore this could be tracked solely with the enum

Re: [libvirt] RFC: Add a 'reason' argument for domain events ?

2008-11-14 Thread Daniel Veillard
On Fri, Nov 14, 2008 at 11:18:48AM +, Daniel P. Berrange wrote: [...] One option is to add alot more events VIR_DOMAIN_MIGRATED_IN (migrated to another node) VIR_DOMAIN_MIGRATED_OUT (migrated from another node) VIR_DOMAIN_SHUTDOWN (graceful shutdown by host admin)

RE: [libvirt] [RFC] making (newly public) EventImpl interface moreconsistent

2008-11-14 Thread Ben Guthro
I'll answer for Dave, while I'm looking at this. As far as I know, Dave is of the opinion that we are just getting lucky using the APIs as we are, and remains convinced that his suggested change is necessary here. He (and I) remain worried that release of the EventImpl API without this API

Re: [libvirt] [PATCH] avoid format string warnings

2008-11-14 Thread Daniel Veillard
On Fri, Nov 14, 2008 at 01:22:26PM +0100, Jim Meyering wrote: From f06595fb110e1e5a4c4f6ea8c729da3341f89ac4 Mon Sep 17 00:00:00 2001 From: Jim Meyering [EMAIL PROTECTED] Date: Fri, 14 Nov 2008 13:19:29 +0100 Subject: [PATCH] avoid format string warnings * src/openvz_driver.c

Re: [libvirt] PATCH: 2/12: Make use of versioned linker scripts

2008-11-14 Thread Daniel Veillard
On Fri, Nov 14, 2008 at 10:37:51AM +, Daniel P. Berrange wrote: On Thu, Nov 13, 2008 at 05:21:23PM +, Daniel P. Berrange wrote: This patch changes the way we use linker scripts to have fully versioned symbols, and a versioned private section for symbols needed by libvirtd and virsh.

Re: [libvirt] PATCH: 4/12: Refactoring URI probing

2008-11-14 Thread Daniel Veillard
On Fri, Nov 14, 2008 at 11:35:16AM +, Daniel P. Berrange wrote: On Fri, Nov 14, 2008 at 11:26:49AM +0100, Daniel Veillard wrote: On Thu, Nov 13, 2008 at 05:25:53PM +, Daniel P. Berrange wrote: This patch changes the way hypervisor URIs are probed when NULL is passed to the

Re: [libvirt] PATCH: 6/12: Optional dlopen() support

2008-11-14 Thread Daniel P. Berrange
On Fri, Nov 14, 2008 at 01:05:18PM +0100, Daniel Veillard wrote: On Thu, Nov 13, 2008 at 05:29:15PM +, Daniel P. Berrange wrote: This patch is a small incremental change to optionally allow us to build every driver as a dlopen()able module. This is disabled by default for now. I'm

Re: [libvirt] PATCH: 9/12: HAL/DevitKit node device impl

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 05:33:20PM +, Daniel P. Berrange wrote: This is the main implementation of the local device enumation driver. The main change since David's patch is that we hav a single nodedevRegister() API call, instead of initializing HAL/DevKit separtely. This was needed to

Re: [libvirt] PATCH: 11/12: virsh support

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 05:35:09PM +, Daniel P. Berrange wrote: This patch adds two node virsh commands for the node device enumeration APIs. The only change here is to change the command names to have a shorter prefix, nodedev-list and nodedev-dumpxml okay then +1 Daniel -- Daniel

Re: [libvirt] PATCH: 12/12: python bindings for node devices

2008-11-14 Thread Daniel Veillard
On Thu, Nov 13, 2008 at 05:36:06PM +, Daniel P. Berrange wrote: This is the python bindings for node devices. No change from David's last patches. sure, +1 Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ [EMAIL PROTECTED] | Rpmfind RPM search engine

Re: [libvirt] PATCH: 8/12:Interal driver API for node devices

2008-11-14 Thread Mark McLoughlin
On Thu, 2008-11-13 at 17:31 +, Daniel P. Berrange wrote: This is the basic internal driver support code for the node device APIs. The actual registration of the drivers was pushed to a later patch to allow this to compile on its own thus be fully bisectable. Daniel diff -r

Re: [libvirt] PATCH: 7/12: Public API for node devices

2008-11-14 Thread Daniel P. Berrange
On Fri, Nov 14, 2008 at 12:46:09PM +, Mark McLoughlin wrote: On Thu, 2008-11-13 at 17:30 +, Daniel P. Berrange wrote: This patch is the public API parts of the node device enumeration code. No changes since David's last submission of this, except for some Makefile tweaks +

Re: [libvirt] PATCH: 9/12: HAL/DevitKit node device impl

2008-11-14 Thread Mark McLoughlin
On Thu, 2008-11-13 at 17:33 +, Daniel P. Berrange wrote: This is the main implementation of the local device enumation driver. The main change since David's patch is that we hav a single nodedevRegister() API call, instead of initializing HAL/DevKit separtely. This was needed to make the

Re: [libvirt] RFC: Add a 'reason' argument for domain events ?

2008-11-14 Thread Daniel P. Berrange
On Fri, Nov 14, 2008 at 07:28:09AM -0500, Ben Guthro wrote: To revisit the DEFINED, UNDEFINED topic - I have been giving this some thought, and it seems like it is redundant information to me. Doesn't the existence of a config file define the difference between a transient and a

Re: [libvirt] PATCH: 11/12: virsh support

2008-11-14 Thread Mark McLoughlin
On Thu, 2008-11-13 at 17:35 +, Daniel P. Berrange wrote: This patch adds two node virsh commands for the node device enumeration APIs. The only change here is to change the command names to have a shorter prefix, nodedev-list and nodedev-dumpxml Daniel diff -r 0136f215fc06

Re: [libvirt] [RFC] making (newly public) EventImpl interface moreconsistent

2008-11-14 Thread Daniel P. Berrange
On Fri, Nov 14, 2008 at 07:36:27AM -0500, Ben Guthro wrote: I'll answer for Dave, while I'm looking at this. As far as I know, Dave is of the opinion that we are just getting lucky using the APIs as we are, and remains convinced that his suggested change is necessary here. He (and I)

Re: [libvirt] [PATCH] avoid format string warnings

2008-11-14 Thread Jim Meyering
Daniel Veillard [EMAIL PROTECTED] wrote: Subject: [PATCH] avoid format string warnings * src/openvz_driver.c (ADD_ARG_LIT): Add %s arg before _(...). * src/qemu_driver.c (PCI_ATTACH_OK_MSG): Likewise. * src/util.c (virExec, virRun): Likewise. Oops, sure, +1 ! Committed. -- Libvir-list

Re: [libvirt] [RFC] making (newly public) EventImpl interface moreconsistent

2008-11-14 Thread Daniel P. Berrange
On Fri, Nov 14, 2008 at 10:46:22AM -0500, David Lively wrote: On Fri, 2008-11-14 at 14:11 +, Daniel P. Berrange wrote: On Fri, Nov 14, 2008 at 07:36:27AM -0500, Ben Guthro wrote: I'll answer for Dave, while I'm looking at this. As far as I know, Dave is of the opinion that we are

Re: [libvirt] [PATCH] Fix lv scanning with encrypted volumes

2008-11-14 Thread Cole Robinson
Daniel P. Berrange wrote: On Wed, Nov 12, 2008 at 04:37:16PM -0500, Cole Robinson wrote: See https://bugzilla.redhat.com/show_bug.cgi?id=470693 Using ':' as a delimiter for the lvs command isn't reliable, since it looks like encrypted volume groups have a colon in the physical device name,

Re: [libvirt] PATCH: OpenVZ bridge support

2008-11-14 Thread Evgeniy Sokolov
Sorry for delay. Big thanks for docs! This is an update of the patch http://www.redhat.com/archives/libvir-list/2008-October/msg00326.html To enable bridge support in the OpenVZ driver. As well as the fixes suggested last time, it includes an initial bit of HTML doc for the openvz driver,

Re: [libvirt] PATCH: 0/12: Modular build node devices integration

2008-11-14 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote: The following series of patches are updated version of patches 7-11 of this series http://www.redhat.com/archives/libvir-list/2008-October/msg00718.html And integrating David Lively's node device patches ontop Hi Dan, I built that and ran make

[libvirt] PATCH: Support events for define/undefine in QEMU

2008-11-14 Thread Daniel P. Berrange
This patch adds support for the DEFINED and UNDEFINED events in the QEMU drive. This was more involved than I expected, because when the daemon gets SIGHUP it re-loads config files and we need to broadcast events for each new config file it finds. So I had to add a callback to the internal

Re: [libvirt] PATCH: Add domain event detail information

2008-11-14 Thread Ben Guthro
Looks pretty much exactly how I pictured it +1 Daniel P. Berrange wrote on 11/14/2008 12:44 PM: As per our earlier discussion today, this patch expands the callback for domain events so that it also gets a event type specific 'detail' field. This is also kept as an int, and we define

Re: [libvirt] [PATCH] Java bindings for domain events

2008-11-14 Thread David Lively
On Fri, 2008-11-14 at 17:09 +, Daniel P. Berrange wrote: On Fri, Nov 14, 2008 at 12:00:10PM -0500, David Lively wrote: +JNIEXPORT void JNICALL Java_org_libvirt_Connect_registerForDomainEvents +(JNIEnv *env, jobject obj, jlong VCP){ +// TODO: Need to DeleteGlobalRef(obj)

Re: [libvirt] PATCH: 8/12:Interal driver API for node devices

2008-11-14 Thread David Lively
On Fri, 2008-11-14 at 13:20 +, Mark McLoughlin wrote: On Thu, 2008-11-13 at 17:31 +, Daniel P. Berrange wrote: +virBufferVSprintf(buf, capability type='%s'\n, + virNodeDevCapTypeToString(caps-type)); +switch (caps-type) { ... +

Re: [libvirt] PATCH: 7/12: Public API for node devices

2008-11-14 Thread David Lively
On Fri, 2008-11-14 at 13:28 +, Daniel P. Berrange wrote: On Fri, Nov 14, 2008 at 12:46:09PM +, Mark McLoughlin wrote: On Thu, 2008-11-13 at 17:30 +, Daniel P. Berrange wrote: This patch is the public API parts of the node device enumeration code. No changes since David's

Re: [libvirt] PATCH: 9/12: HAL/DevitKit node device impl

2008-11-14 Thread David Lively
On Fri, 2008-11-14 at 13:41 +, Mark McLoughlin wrote: The DeviceKit implementation seems to be much more of a work-in-progress than the HAL implementation - maybe disable it by default in configure? (i.e. with_devkit=no instead of with_devkit=check) That's a good idea. I don't think the