Re: [libvirt] [PATCH] update domain status forcibly even if attach a device failed

2011-03-23 Thread Wen Congyang
At 03/24/2011 03:26 AM, Eric Blake Write: > On 02/17/2011 02:09 PM, Eric Blake wrote: >> On 02/16/2011 08:32 PM, Wen Congyang wrote: >>> Steps to reproduce this bug: >>> 1. virsh attach-disk domain --source diskimage --target sdb --sourcetype >>> file --driver qemu --subdriver qcow2 >>>error:

[libvirt] [PATCHv6 3/3] libvirt/qemu - support persistent modification of qemu nics.

2011-03-23 Thread KAMEZAWA Hiroyuki
>From fa4ecbfabe3ec0bcf120bedf20583a2045430f65 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Thu, 24 Mar 2011 10:26:56 +0900 Subject: [PATCHv6 3/3] libvirt/qemu - support persistent modification of qemu nics. support changes of interfaces by VIR_DOMAIN_DEVICE_MODIFY_CONFIG for qemu. S

[libvirt] [PATCHv6 2/3] libvirt/qemu - support persistent modification of qemu disks

2011-03-23 Thread KAMEZAWA Hiroyuki
>From 1d2630896a950b87043c9e77fdbcdc23626098ee Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Thu, 24 Mar 2011 10:05:18 +0900 Subject: [PATCHv6 2/3] libvirt/qemu - support persistent modification of qemu disks support changes of disks by VIR_DOMAIN_DEVICE_MODIFY_CONFIG for qemu. Signed-

[libvirt] [PATCHv6 1/3] libvirt/qemu - support persistent modification of devices.

2011-03-23 Thread KAMEZAWA Hiroyuki
Thank you for comments. This is a rebased/fixed one. = >From 5858b9d6b33a9d917576f6179be13a306272ff45 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Wed, 23 Mar 2011 17:45:12 +0900 Subject: [PATCHv6 1/3] libvirt/qemu - support persistent modification of devices. Now, qemudDomainAttachDe

Re: [libvirt] [PATCHv2 3/3] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Eric Blake
On 03/23/2011 05:48 PM, Eric Blake wrote: > Sometimes, an asynchronous helper is started (such as a compressor > or iohelper program), but a later error means that we want to > abort that child. Make this easier. > > Note that since daemons and virCommandRunAsync can't mix, the only > time virCom

[libvirt] [PATCHv2 2/3] command: don't mix RunAsync and daemons

2011-03-23 Thread Eric Blake
It doesn't make sense to run a daemon without synchronously waiting for the child process to reply whether the daemon has been kicked off and pidfile written yet. * src/util/command.c (VIR_EXEC_RUN_SYNC): New constant. (virCommandRun): Set temporary flag. (virCommandRunAsync): Use it to prevent as

[libvirt] [PATCHv2 3/3] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Eric Blake
Sometimes, an asynchronous helper is started (such as a compressor or iohelper program), but a later error means that we want to abort that child. Make this easier. Note that since daemons and virCommandRunAsync can't mix, the only time virCommandFree can reap a process is if someone did virComma

[libvirt] [PATCHv2 1/3] command: properly diagnose process exit via signal

2011-03-23 Thread Eric Blake
Child processes don't always reach _exit(); if they die from a signal, then any messages should still be accurate. Most users either expect a 0 status (thankfully, if status==0, then WIFEXITED(status) is true and WEXITSTATUS(status)==0 for all known platforms) or were filtering on WIFEXITED before

[libvirt] [PATCHv2 0/3] virCommand improvements on cleanup path

2011-03-23 Thread Eric Blake
Should address findings from v1. Eric Blake (3): command: properly diagnose process exit via signal command: don't mix RunAsync and daemons command: add virCommandAbort for cleanup paths daemon/remote.c |7 +- src/libvirt_private.syms |2 +

Re: [libvirt] [PATCH RFC] Remove the Open Nebula driver

2011-03-23 Thread Ruben S. Montero
Hi, Thanks for the headup. We totally agree with the reasoning in the thread. In fact, the last version of OpenNebula is not compatible with the libvirt driver. We planned to propose the removal of the OpenNebula driver, and focus our efforts in the DeltaCloud adapter. So please go ahead and remov

Re: [libvirt] [PATCH] build: nuke all .x-sc* files

2011-03-23 Thread Eric Blake
On 03/23/2011 11:40 AM, Daniel P. Berrange wrote: > On Wed, Mar 16, 2011 at 04:52:01PM -0600, Eric Blake wrote: >> Not every day you see a patch that nukes 27 files! >> >> * .gnulib: Update to latest, for maint.mk improvements >> * bootstrap: Resync to gnulib. >> * bootstrap.conf (ACLOCAL): Swap th

Re: [libvirt] [PATCH 3/1] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Eric Blake
On 03/23/2011 06:30 AM, Eric Blake wrote: >> We allow virCommandRunAsync to be used for daemonized >> commands, so I don't think it is safe to unconditionally >> kill off the PID when free'ing the virCommandPtr instance. > > No, we don't. 'git grep virCommandRunAsync' shows that the only current

Re: [libvirt] [PATCH 2/1] command: reject pidfile on non-daemon

2011-03-23 Thread Eric Blake
On 03/23/2011 06:24 AM, Daniel P. Berrange wrote: > On Tue, Mar 22, 2011 at 04:45:08PM -0600, Eric Blake wrote: >> * src/util/command.c (virCommandRunAsync): Since virExec only >> creates pidfiles for daemon, enforce this in virCommand. >> --- >> src/util/command.c |6 +- >> 1 files change

[libvirt] [PATCH] docs: document recent hook additions

2011-03-23 Thread Eric Blake
* src/qemu/qemu_process.c (qemuProcessStart, qemuProcessStop): Fix typos. * docs/hooks.html.in: Document 'prepare' and 'release' hooks. --- > Now there is a small TODO left consisting of extending the > documentation about those two, and maybe look if the LXC driver could > support those hooks too

[libvirt] [PATCH] tests: don't alter state in $HOME

2011-03-23 Thread Eric Blake
Diego reported a bug where virsh tries to initialize a readline history directory during 'make check' run as root, but fails because /root was read-only. It turns out that I could reproduce this as non-root, by using: mv ~/.virsh{,.bak} chmod a-w ~ make check -C tests TESTS=int-overflow chmod u+w

Re: [libvirt] int-overflow test fails if /root is not writable and /root/.virsh does not exist yet

2011-03-23 Thread Eric Blake
On 03/17/2011 05:43 PM, Diego Elio Pettenò wrote: > --- err 2011-03-18 00:07:36.0 +0100 > +++ exp 2011-03-18 00:07:36.0 +0100 > @@ -1,2 +1 @@ > error: failed to get domain '4294967298' > -error: Failed to create '/root/.virsh': Permission denied > FAIL: int-overflow >

Re: [libvirt] [libvirt-snmp][PATCH v3 3/3] Add SNMP trap/notification support.

2011-03-23 Thread Eric Blake
On 03/23/2011 07:30 AM, Daniel P. Berrange wrote: > > What is the oldest version of libvirt that you need to be able to > run libvirt-snmp against ? > > This impl of the file handle / timer callbacks taken from the > C example program is really not a very good one to copy / use. > > If you are a

Re: [libvirt] [PATCH] update domain status forcibly even if attach a device failed

2011-03-23 Thread Eric Blake
On 02/17/2011 02:09 PM, Eric Blake wrote: > On 02/16/2011 08:32 PM, Wen Congyang wrote: >> Steps to reproduce this bug: >> 1. virsh attach-disk domain --source diskimage --target sdb --sourcetype >> file --driver qemu --subdriver qcow2 >>error: Failed to attach disk >>error: operation fail

[libvirt] [PATCH] logging: always NUL-terminate circular buffer

2011-03-23 Thread Eric Blake
* src/util/logging.c (virLogStartup, virLogSetBufferSize): Over-allocate, so that a debugger can just print the circular buffer. Suggested by Daniel Veillard. --- > > I see two ways to do things - either malloc an extra byte (which will > > always be NUL from the malloc, so deleting 'virLogBuffer

Re: [libvirt] [PATCH] domain_conf: drop unused ref-count in snapshot object

2011-03-23 Thread Eric Blake
On 03/23/2011 09:16 AM, Daniel P. Berrange wrote: > On Fri, Mar 18, 2011 at 09:28:08AM -0600, Eric Blake wrote: >> The ref count was assigned to 1 at creation, then never modified again >> until it was decremented just before freeing the object. >> >> * src/conf/domain_conf.h (_virDomainSnapshotObj

Re: [libvirt] [PATCHv4 2/2] rpm: add missing dependencies

2011-03-23 Thread Eric Blake
On 03/23/2011 11:32 AM, Daniel P. Berrange wrote: > On Wed, Mar 23, 2011 at 11:24:08AM -0600, Eric Blake wrote: >> Among others, the missing radvd dependency showed up as: >> >> error: Failed to start network ipv6net >> error: Cannot find radvd - Possibly the package isn't installed: No such file >

Re: [libvirt] [PATCH] build: nuke all .x-sc* files

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 16, 2011 at 04:52:01PM -0600, Eric Blake wrote: > Not every day you see a patch that nukes 27 files! > > * .gnulib: Update to latest, for maint.mk improvements > * bootstrap: Resync to gnulib. > * bootstrap.conf (ACLOCAL): Swap the secondary aclocal include > directory, now that bootst

[libvirt] [PATCH 4/6] Support volume data upload/download APIs in storage driver

2011-03-23 Thread Daniel P. Berrange
Use generic FD streams to allow data upload/download to/from any storage volume * src/storage/storage_driver.c: Wire up upload/download APIs --- src/storage/storage_driver.c | 132 +- 1 files changed, 130 insertions(+), 2 deletions(-) diff --git a/src/sto

[libvirt] [PATCH 6/6] Fix infinite loop in daemon if client quits with multiple streams open

2011-03-23 Thread Daniel P. Berrange
The daemon loops over the linked list of streams when a client quits, closing any that the client hadn't already closed. Except it didn't ever move to the next element in the list! * daemon/stream.c: Fix loop over linked list of streams --- daemon/stream.c |1 + 1 files changed, 1 insertions(

[libvirt] [PATCH 5/6] Remote protocol support for storage vol upload/download APIs

2011-03-23 Thread Daniel P. Berrange
* daemon/remote.c, src/remote/remote_driver.c: Implementation of storage vol upload/download APIs * src/remote/remote_protocol.x: Wire protocol definition for upload/download * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h, daemon/remote_dispatch_table.h, src/remote/remot

[libvirt] [PATCH 0/6] v3: Allow data upload/download to/from storage volumes

2011-03-23 Thread Daniel P. Berrange
An update of http://www.redhat.com/archives/libvir-list/2011-March/msg00880.html Addressing all the feedback from v2 and this time with the correct set of patches! -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/6] Enhance the streams helper to support plain file I/O

2011-03-23 Thread Daniel P. Berrange
The O_NONBLOCK flag doesn't work as desired on plain files or block devices. Introduce an I/O helper program that does the blocking I/O operations, communicating over a pipe that can support O_NONBLOCK * src/fdstream.c, src/fdstream.h: Add non-blocking I/O on plain files/block devices * src/Make

[libvirt] [PATCH 3/6] Add vol-upload and vol-download commands to virsh

2011-03-23 Thread Daniel P. Berrange
The new commands vol-upload and vol-download, allow a local file to be transferred to/from a storage volume. * tools/virsh.c: Add vol-upload and vol-download commands --- tools/virsh.c | 230 + 1 files changed, 230 insertions(+), 0 deletion

[libvirt] [PATCH 2/6] Add public APIs for storage volume upload/download

2011-03-23 Thread Daniel P. Berrange
New APIs are added allowing streaming of content to/from storage volumes. * include/libvirt/libvirt.h.in: Add virStorageVolUpload and virStorageVolDownload APIs * src/driver.h, src/libvirt.c, src/libvirt_public.syms: Stub code for new APIs * src/storage/storage_driver.c, src/esx/esx_storage_dr

Re: [libvirt] [PATCHv4 2/2] rpm: add missing dependencies

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 11:24:08AM -0600, Eric Blake wrote: > Among others, the missing radvd dependency showed up as: > > error: Failed to start network ipv6net > error: Cannot find radvd - Possibly the package isn't installed: No such file > or directory > > even when radvd was installed, becau

Re: [libvirt] [PATCHv3 1/2] rpm: separate runtime and build requirements

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 10:38:25AM -0600, Eric Blake wrote: > * libvirt.spec.in (Requires): Reorganize requirements a bit; no > functional change. > --- > > v3: new patch, to cleanly separate Requires: from BuildRequires:. > > Should I also do a patch to sort requirements, to make it easier > to

[libvirt] [PATCHv4 2/2] rpm: add missing dependencies

2011-03-23 Thread Eric Blake
Among others, the missing radvd dependency showed up as: error: Failed to start network ipv6net error: Cannot find radvd - Possibly the package isn't installed: No such file or directory even when radvd was installed, because the RADVD preprocessor symbol was missing at configure time. * libvirt

Re: [libvirt] [PATCH 3/8] Add vcpu functions to libxl driver

2011-03-23 Thread Eric Blake
On 03/23/2011 10:59 AM, Jim Fehlig wrote: >> +unsigned int i = 0; >> > > I thought I recalled variable declaration only at start of a block but > don't see anything about it in HACKING. Perhaps someone else can clarify. We require C99 for other reasons, but where it is easy to do, yes, we

Re: [libvirt] [PATCHv3 2/2] rpm: add missing dependencies

2011-03-23 Thread Eric Blake
On 03/23/2011 10:38 AM, Eric Blake wrote: > Among others, the missing radvd dependency showed up as: > > error: Failed to start network ipv6net > error: Cannot find radvd - Possibly the package isn't installed: No such file > or directory > > even when radvd was installed, because the RADVD prepr

Re: [libvirt] [PATCH] Make error reporting in libvirtd thread safe

2011-03-23 Thread Eric Blake
On 03/23/2011 09:52 AM, Jiri Denemark wrote: > Bug https://bugzilla.redhat.com/show_bug.cgi?id=689374 reported libvirtd > crash during error dispatch. > > The reason is that libvirtd uses remoteDispatchConnError() with non-NULL > conn parameter which means that virConnGetLastError() is used instea

Re: [libvirt] [PATCH 3/8] Add vcpu functions to libxl driver

2011-03-23 Thread Jim Fehlig
Markus Groß wrote: > --- > src/libxl/libxl_driver.c | 295 > +- > 1 files changed, 290 insertions(+), 5 deletions(-) > > diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c > index 7ee3930..49fc90f 100644 > --- a/src/libxl/libxl_driver.c >

[libvirt] [PATCHv3 2/2] rpm: add missing dependencies

2011-03-23 Thread Eric Blake
Among others, the missing radvd dependency showed up as: error: Failed to start network ipv6net error: Cannot find radvd - Possibly the package isn't installed: No such file or directory even when radvd was installed, because the RADVD preprocessor symbol was missing at configure time. * libvirt

[libvirt] [PATCHv3 1/2] rpm: separate runtime and build requirements

2011-03-23 Thread Eric Blake
* libvirt.spec.in (Requires): Reorganize requirements a bit; no functional change. --- v3: new patch, to cleanly separate Requires: from BuildRequires:. Should I also do a patch to sort requirements, to make it easier to know where to insert new requirements (in sorted order)? libvirt.spec.in |

[libvirt] [PATCH] Make error reporting in libvirtd thread safe

2011-03-23 Thread Jiri Denemark
Bug https://bugzilla.redhat.com/show_bug.cgi?id=689374 reported libvirtd crash during error dispatch. The reason is that libvirtd uses remoteDispatchConnError() with non-NULL conn parameter which means that virConnGetLastError() is used instead of its thread safe replacement virGetLastError(). So

Re: [libvirt] [PATCH] Update event loop example programs to demonstrate best practice

2011-03-23 Thread Eric Blake
On 03/23/2011 09:24 AM, Daniel P. Berrange wrote: > The example C event loop code is a nasty hack and not compliant > with the require API semantics. Delete this, so that developers > don't mistakenly copy it. Instead call the new public event loop > APIs. > > Update the python event loop example,

[libvirt] [PATCH] Update event loop example programs to demonstrate best practice

2011-03-23 Thread Daniel P. Berrange
The example C event loop code is a nasty hack and not compliant with the require API semantics. Delete this, so that developers don't mistakenly copy it. Instead call the new public event loop APIs. Update the python event loop example, so that it can optionally use the public event APIs, as an al

Re: [libvirt] [PATCH] domain_conf: drop unused ref-count in snapshot object

2011-03-23 Thread Daniel P. Berrange
On Fri, Mar 18, 2011 at 09:28:08AM -0600, Eric Blake wrote: > The ref count was assigned to 1 at creation, then never modified again > until it was decremented just before freeing the object. > > * src/conf/domain_conf.h (_virDomainSnapshotObj): Delete unused > field. > (virDomainSnapshotObjUnref)

Re: [libvirt] [PATCH] rpm: require radvd when building network support

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 08:58:17AM -0600, Eric Blake wrote: > Otherwise, attempts to use ipv6 will fail with: > > error: Failed to start network ipv6net > error: Cannot find radvd - Possibly the package isn't installed: No such file > or directory > > * libvirt.spec.in (with_network): Require rad

Re: [libvirt] [PATCH] util: Fix return value for virJSONValueFromString if it fails

2011-03-23 Thread Osier Yang
于 2011年03月23日 21:19, Daniel P. Berrange 写道: On Wed, Mar 23, 2011 at 08:07:25PM +0800, Osier Yang wrote: Problem: "parser.head" is not NULL even if it's free'ed by "virJSONValueFree", returning "parser.head" when "virJSONValueFromString" fails will cause unexpected errors (libvirtd will crash

Re: [libvirt] [PATCH] rpm: require radvd when building network support

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 08:49:19AM -0600, Eric Blake wrote: > Otherwise, if the build machine doesn't have radvd, then the > configure test won't wire in anything for the radvd executable, > and attempts to use that rpm for ipv6 will fail even on machines > where radvd is present. > > error: Faile

[libvirt] [PATCH] rpm: require radvd when building network support

2011-03-23 Thread Eric Blake
Otherwise, attempts to use ipv6 will fail with: error: Failed to start network ipv6net error: Cannot find radvd - Possibly the package isn't installed: No such file or directory * libvirt.spec.in (with_network): Require radvd. --- v2: also add runtime requirement, and drop junk .gnulib and with_

[libvirt] [PATCH] rpm: require radvd when building network support

2011-03-23 Thread Eric Blake
Otherwise, if the build machine doesn't have radvd, then the configure test won't wire in anything for the radvd executable, and attempts to use that rpm for ipv6 will fail even on machines where radvd is present. error: Failed to start network ipv6net error: Cannot find radvd - Possibly the packa

Re: [libvirt] [PATCH] Initialization error of qemuCgroupData in Qemu host usb hotplug

2011-03-23 Thread Wen Congyang
At 2011-3-23 20:25, Eric Blake Write: On 03/22/2011 08:02 PM, Wen Congyang wrote: Steps to reproduce this bug: # cat usb.xml # virsh attach-device vm1 usb.xml error: Failed to attach device from usb.xml error: server closed connection: The reason of this bug is that we set data.

Re: [libvirt] [libvirt-snmp][PATCH v3 3/3] Add SNMP trap/notification support.

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 11:06:08AM +0100, Michal Privoznik wrote: > diff --git a/src/libvirtSnmp.c b/src/libvirtSnmp.c > index > dd1bd33dc3fbc08656d09075a3c1a1741ebc002f..1bc947d85384e2ced111cde301951b4e5c3666f6 > 100644 > --- a/src/libvirtSnmp.c > +++ b/src/libvirtSnmp.c > @@ -22,12 +22,168 @@ >

Re: [libvirt] [libvirt-snmp][PATCH v3 1/3] Add notification-type object to libvirt MIB

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 11:06:06AM +0100, Michal Privoznik wrote: > --- > src/LIBVIRT-MIB.txt |9 + > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/src/LIBVIRT-MIB.txt b/src/LIBVIRT-MIB.txt > index > 607d441051b04bb6ca0cd09ad8a6ff07eafc2f8e..932dec9587c1e7ed97fe50

Re: [libvirt] [libvirt-snmp][PATCH v3 2/3] Create functions to fill in and send notification packets.

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 11:06:07AM +0100, Michal Privoznik wrote: > Before sending snmp notification we need to fill in useful data, > like domain status, UUID, etc. > --- > src/Makefile.am|2 + > src/README.txt |7 ++- > src/libvirtNotifications.c | 109 > +++

Re: [libvirt] [PATCH] util: Fix return value for virJSONValueFromString if it fails

2011-03-23 Thread Daniel P. Berrange
On Wed, Mar 23, 2011 at 08:07:25PM +0800, Osier Yang wrote: > Problem: > "parser.head" is not NULL even if it's free'ed by "virJSONValueFree", > returning "parser.head" when "virJSONValueFromString" fails will cause > unexpected errors (libvirtd will crash sometimes), e.g. > In function "qemuMo

Re: [libvirt] [PATCH 2/8] Get cpu time and current memory balloon from libxl

2011-03-23 Thread Jim Fehlig
Markus Groß wrote: > --- > src/libxl/libxl_driver.c | 16 ++-- > 1 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c > index ad95e2b..7ee3930 100644 > --- a/src/libxl/libxl_driver.c > +++ b/src/libxl/libxl_driver.c >

Re: [libvirt] [PATCH 2/2] build: let autobuild check module build

2011-03-23 Thread Daniel P. Berrange
On Tue, Mar 22, 2011 at 03:45:20PM -0600, Eric Blake wrote: > Many times, we don't notice a bug in src/libvirt_private.syms > until someone attempts a build with modules enabled. Having > autobuild.sh stress that can only help. > > * autobuild.sh: Add test of --with-driver-modules. Update mingw

Re: [libvirt] [PATCH 3/1] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Eric Blake
On 03/23/2011 06:19 AM, Daniel P. Berrange wrote: > On Tue, Mar 22, 2011 at 04:45:09PM -0600, Eric Blake wrote: >> Sometimes, an asynchronous helper is started (such as a compressor >> or iohelper program), but a later error means that we want to >> abort that child. Make this easier. >> >> /* >>

Re: [libvirt] [PATCH] Initialization error of qemuCgroupData in Qemu host usb hotplug

2011-03-23 Thread Eric Blake
On 03/22/2011 08:02 PM, Wen Congyang wrote: > Steps to reproduce this bug: > # cat usb.xml > > > > > > # virsh attach-device vm1 usb.xml > error: Failed to attach device from usb.xml > error: server closed connection: > > The reason of this bug is that we set data.cgroup to NULL, an

Re: [libvirt] [PATCH 2/1] command: reject pidfile on non-daemon

2011-03-23 Thread Daniel P. Berrange
On Tue, Mar 22, 2011 at 04:45:08PM -0600, Eric Blake wrote: > * src/util/command.c (virCommandRunAsync): Since virExec only > creates pidfiles for daemon, enforce this in virCommand. > --- > src/util/command.c |6 +- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/src/

Re: [libvirt] [PATCH] command: properly diagnose process exit via signal

2011-03-23 Thread Daniel P. Berrange
On Tue, Mar 22, 2011 at 12:00:02PM -0600, Eric Blake wrote: > Child processes don't always reach _exit(); if they die from a > signal, then any messages should still be accurate. Most users > either expect a 0 status (thankfully, if status==0, then > WIFEXITED(status) is true and WEXITSTATUS(statu

Re: [libvirt] [PATCH 3/1] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Daniel P. Berrange
On Tue, Mar 22, 2011 at 04:45:09PM -0600, Eric Blake wrote: > Sometimes, an asynchronous helper is started (such as a compressor > or iohelper program), but a later error means that we want to > abort that child. Make this easier. > > /* > @@ -1207,6 +1208,8 @@ virCommandRunAsync(virCommandPtr c

[libvirt] [PATCH] util: Fix return value for virJSONValueFromString if it fails

2011-03-23 Thread Osier Yang
Problem: "parser.head" is not NULL even if it's free'ed by "virJSONValueFree", returning "parser.head" when "virJSONValueFromString" fails will cause unexpected errors (libvirtd will crash sometimes), e.g. In function "qemuMonitorJSONArbitraryCommand": if (!(cmd = virJSONValueFromStrin

[libvirt] [libvirt-snmp][PATCH v3 3/3] Add SNMP trap/notification support.

2011-03-23 Thread Michal Privoznik
This patch adds support for domain lifecycle notification support over SNMP traps. SNMP subagent monitors any domain events and when something interesting happens, it sends a trap. Monitoring is done in a joinable thread using polling (used domain-events example from libvirt) so we won't block the

[libvirt] [libvirt-snmp][PATCH v3 0/3] Add SNMP trap/notification support

2011-03-23 Thread Michal Privoznik
The third version with micro-version number change. Finally, we have a proof-of-concept implementation of SNMP trap. Two new files were first generated using mib2c then edited, so be careful when re-generating them. Destination of traps is defined in snmpd.conf (trap2sink), and to receive them sn

[libvirt] [libvirt-snmp][PATCH v3 1/3] Add notification-type object to libvirt MIB

2011-03-23 Thread Michal Privoznik
--- src/LIBVIRT-MIB.txt |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/LIBVIRT-MIB.txt b/src/LIBVIRT-MIB.txt index 607d441051b04bb6ca0cd09ad8a6ff07eafc2f8e..932dec9587c1e7ed97fe50ef1979979e73876195 100644 --- a/src/LIBVIRT-MIB.txt +++ b/src/LIBVIRT-MIB.txt @

[libvirt] [libvirt-snmp][PATCH v3 2/3] Create functions to fill in and send notification packets.

2011-03-23 Thread Michal Privoznik
Before sending snmp notification we need to fill in useful data, like domain status, UUID, etc. --- src/Makefile.am|2 + src/README.txt |7 ++- src/libvirtNotifications.c | 109 src/libvirtNotifications.h | 21

Re: [libvirt] [PATCH RFC] Remove the Open Nebula driver

2011-03-23 Thread Daniel Veillard
On Tue, Mar 22, 2011 at 02:08:00PM -0400, Laine Stump wrote: > On 03/22/2011 12:23 PM, Daniel P. Berrange wrote: > >The Open Nebula driver has been unmaintained since it was first > >introduced. The only commits have been for tree-wide cleanups. > >It also has a major design flaw, in that it only k