Re: [libvirt] [PATCH] fix xdr detection and use with recent glibc

2011-05-11 Thread Christophe Fergeau
On Tue, May 10, 2011 at 10:22:47AM -0600, Eric Blake wrote: On 05/10/2011 10:13 AM, Daniel P. Berrange wrote: ACK, but someone should file a BZ about the duplicated definitions to get them fixed, because we need to be able to build with -Werror enabled Cygwin is facing the same problem

Re: [libvirt] Crash state and QEMU

2011-05-11 Thread Jiri Denemark
On Tue, May 10, 2011 at 14:28:20 -0500, Anthony Liguori wrote: On 05/10/2011 02:04 PM, Richard W.M. Jones wrote: On Tue, May 10, 2011 at 01:26:39PM -0500, Anthony Liguori wrote: As far as I can tell, if QEMU exits abruptly or with a non-zero status code, libvirt treats this as a domain

Re: [libvirt] [PATCH] fix xdr detection and use with recent glibc

2011-05-11 Thread Christophe Fergeau
On Wed, May 11, 2011 at 09:40:01AM +0200, Christophe Fergeau wrote: Any idea where to report tirpc bugs? Should I just file that against the fedora package and leave the maintainer handle it? Never mind, I found upstream bugtracker and filed

Re: [libvirt] [RFC PATCH] support multifunction PCI device

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 10:30:43AM +0800, Wen Congyang wrote: At 05/10/2011 06:00 PM, Daniel P. Berrange Write: On Tue, May 10, 2011 at 02:00:17PM +0800, Wen Congyang wrote: We want to use more than 200+ device. Libvirt does not use multi function PCI device and PCI-to-PCI bridge. So we can

[libvirt] How to suppress the message DHCP packet received on ethN which has no address

2011-05-11 Thread Mark Wu
Hi Guys, The following message was reported to /var/log/messages on a server when there's no ip address configured on an interface, like a slave of bonding. dnsmasq-dhcp[]: DHCP packet received on eth1 which has no address The dnsmasq command line: nobody 21564 0.0 0.0 12796 604 ?

Re: [libvirt] [RFC PATCH] support multifunction PCI device

2011-05-11 Thread Wen Congyang
At 05/11/2011 03:55 PM, Daniel P. Berrange Write: On Wed, May 11, 2011 at 10:30:43AM +0800, Wen Congyang wrote: At 05/10/2011 06:00 PM, Daniel P. Berrange Write: On Tue, May 10, 2011 at 02:00:17PM +0800, Wen Congyang wrote: We want to use more than 200+ device. Libvirt does not use multi

[libvirt] [PATCH 00/16 v4] Implement migration v3 protocol

2011-05-11 Thread Daniel P. Berrange
This is an update to http://www.redhat.com/archives/libvir-list/2011-April/msg01012.html In this update - Bug fixes from previous review - Rebase ontop of recent changes - Run tunnelled migration I/O loop in background thread to allow use of normal qemuMigrationWaitForCompletion code

[libvirt] [PATCH 07/16] Fix VM teardown if prepare returns invalid URI in v2 migration

2011-05-11 Thread Daniel P. Berrange
The v2 migration protocol was accidentally missing out the finish step, when prepare succeeded, but returned an invalid URI * src/libvirt.c: Teardown VM if prepare returns invalid URI --- src/libvirt.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH 05/16] Wire up SPICE client relocation with QEMU migration

2011-05-11 Thread Daniel P. Berrange
Use the graphics information from the QEMU migration cookie to issue a 'client_migrate_info' monitor command to QEMU. This causes the SPICE client to automatically reconnect to the target host when migration completes * src/qemu/qemu_migration.c: Set data for SPICE client relocation before

[libvirt] [PATCH 11/16] Make tunnelled migration honour resource restriction

2011-05-11 Thread Daniel P. Berrange
The doTunnelMigrate method forgot to set the bandwidth resource restriction * src/qemu/qemu_migration.c: Set resource restriction --- src/qemu/qemu_migration.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c

[libvirt] [PATCH 09/16] Implement migration v3 protocol in QEMU driver

2011-05-11 Thread Daniel P. Berrange
Implement the v3 migration protocol, which has two extra steps, 'begin' on the source host and 'confirm' on the source host. All other methods also gain both input and output cookies to allow bi-directional data passing at all stages. The QEMU peer2peer migration method gains another impl to

[libvirt] [PATCH 01/16] Introduce yet another migration version in API.

2011-05-11 Thread Daniel P. Berrange
Migration just seems togo from bad to worse. We already had to introduce a second migration protocol when adding the QEMU driver, since the one from Xen was insufficiently flexible to cope with passing the data the QEMU driver required. It turns out that this protocol still has some flaws that we

[libvirt] [PATCH 14/16] Don't overwrite error when stream send fails

2011-05-11 Thread Daniel P. Berrange
virStreamSend already sets an error message, so don't overwrite it * src/qemu/qemu_migration.c: Remove bogus error report --- src/qemu/qemu_migration.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH 13/16] Close all sockets before cancelling QEMU migration

2011-05-11 Thread Daniel P. Berrange
Cancelling the QEMU migration may cause QEMU to flush pending data on the migration socket. This may in turn block QEMU if nothing reads from the other end of the socket. Closing the socket before cancelling QEMU migration avoids this possible deadlock. * src/qemu/qemu_migration.c: Close sockets

[libvirt] [PATCH 02/16] Remote driver implementation of new migration API

2011-05-11 Thread Daniel P. Berrange
* src/remote/remote_protocol.x: Define wire protocol for migration protocol v3 * daemon/remote.c: Server side dispatch * src/remote/remote_driver.c: Client side serialization * src/remote/remote_protocol.c, src/remote/remote_protocol.h, daemon/remote_dispatch_args.h,

[libvirt] [PATCH 03/16] Introduce migration cookies to QEMU driver

2011-05-11 Thread Daniel P. Berrange
The migration protocol has support for a 'cookie' parameter which is an opaque array of bytes as far as libvirt is concerned. Drivers may use this for passing around arbitrary extra data they might need during migration. The QEMU driver needs todo a few things: - Pass hostname/uuid to allow

[libvirt] [PATCH 04/16] Pass graphics setup from dst back to src via migration cookies

2011-05-11 Thread Daniel P. Berrange
Extend the QEMU migration cookie structure to allow information about the destination host graphics setup to be passed by to the source host. This will enable seamless migration of any connected graphics clients * src/qemu/qemu_migration.c: Add graphics info to migration cookies *

[libvirt] [PATCH 06/16] Refactor tunnelled migration methods

2011-05-11 Thread Daniel P. Berrange
To facilitate the introduction of the v3 migration protocol, the doTunnelMigrate method is refactored into two pieces. One piece is intended to mirror the flow of virDomainMigrateVersion2, while the other is the helper for setting up sockets and processing the data. Previously socket setup would

[libvirt] [PATCH 08/16] Merge tunnel non-tunnel migration impl into one

2011-05-11 Thread Daniel P. Berrange
Merge the doNonTunnelMigrate2 and doTunnelMigrate2 methods into one doPeer2PeerMigrate2 method, since they are substantially the same. With the introduction of v3 migration, this will be even more important, to avoid massive code duplication. * src/qemu/qemu_migration.c: Merge tunnel non-tunnel

[libvirt] [PATCH 10/16] Refactor migration completion loop to allow code reuse

2011-05-11 Thread Daniel P. Berrange
The qemuMigrationWaitForCompletion method contains a loop which repeatedly queries QEMU to check migration progress, and also processes job signals (pause, setspeed, setbandwidth, cancel). The tunnelled migration loop does not currently support this functionality, but should. Refactor the code to

[libvirt] [PATCH 12/16] Ensure we always read a full buffer in tunnelled migration

2011-05-11 Thread Daniel P. Berrange
The 'nbytes' variable was not re-initialized to the buffer size on each iteration of the tunnelled migration loop. While saferead() will ensure a full read, except on EOF, it is clearer to use the real buffer size * src/qemu/qemu_migration.c: Always read full buffer of data ---

[libvirt] [PATCH 2/8] Support leases in guest XML and lock manager

2011-05-11 Thread Daniel P. Berrange
A lock manager may operate in various modes. The direct mode of operation is to obtain locks based on the resources associated with devices in the XML. The indirect mode is where the app creating the domain provides explicit leases for each resource that needs to be locked. This XML extension

[libvirt] [PATCH 15/16] Run tunnelled migration IO in separate thread

2011-05-11 Thread Daniel P. Berrange
By running the doTunnelSendAll code in a separate thread, the main thread can do qemuMigrationWaitForCompletion as with normal migration. This in turn ensures that job signals work correctly and that progress monitoring can be done * src/qemu/qemu_migration.c: Runn tunnelled migration in

[libvirt] [PATCH 0/8 v3] Integration of lock managers in QEMU

2011-05-11 Thread Daniel P. Berrange
This is an update to http://www.redhat.com/archives/libvir-list/2011-January/msg00952.html Changes in this series - Lock manager plugin API is dramatically simpler - Lock manager only protects disk content, not disk metadata (eg file ownership/selinux label changes) - Migration state

[libvirt] [PATCH 1/8] Allow handshake with child process during startup

2011-05-11 Thread Daniel P. Berrange
Allow the parent process to perform a bi-directional handshake with the child process during fork/exec. The child process will fork and do its initial setup. Immediately prior to the exec(), it will stop wait for a handshake from the parent process. The parent process will spawn the child and

[libvirt] [PATCH 8/8] Add a plugin for the 'sanlock' project

2011-05-11 Thread Daniel P. Berrange
Sanlock is a project that implements a disk-paxos locking algorithm. This is suitable for cluster deployments with shared storage. * src/Makefile.am: Add dlopen plugin for sanlock * src/locking/lock_driver_sanlock.c: Sanlock driver --- libvirt.spec.in | 11 + po/POTFILES.in

[libvirt] [PATCH 3/8] Basic framework for lock manager plugins

2011-05-11 Thread Daniel P. Berrange
Define the basic framework lock manager plugins. The basic plugin API for 3rd parties to implemented is defined in src/locking/lock_driver.h This allows dlopen()able modules for alternative locking schemes, however, we do not install the header. This requires lock plugins to be in-tree

[libvirt] [PATCH 4/8] Add a 'nop' lock driver implementation.

2011-05-11 Thread Daniel P. Berrange
To allow hypervisor drivers to assume that a lock driver impl will be guaranteed to exist, provide a 'nop' impl that is compiled into the library * src/Makefile.am: Add nop driver * src/locking/lock_driver_nop.c, src/locking/lock_driver_nop.h: Nop lock driver implementation *

[libvirt] [PATCH 5/8] Add higher level lock API for domain objects

2011-05-11 Thread Daniel P. Berrange
To facilitate use of the locking plugins from hypervisor drivers, introduce a higher level API for locking virDomainObjPtr instances. In includes APIs targetted to VM startup, and hotplug/unplug * src/Makefile.am: Add domain lock API * src/locking/domain_lock.c, src/locking/domain_lock.h: High

[libvirt] [PATCH 6/8] Add initial docs about the lock managers

2011-05-11 Thread Daniel P. Berrange
--- docs/internals/locking.html.in | 257 docs/sitemap.html.in |4 + 2 files changed, 261 insertions(+), 0 deletions(-) create mode 100644 docs/internals/locking.html.in diff --git a/docs/internals/locking.html.in

[libvirt] [PATCH 7/8] Integrate the QEMU driver with the lock manager infrastructure

2011-05-11 Thread Daniel P. Berrange
The QEMU integrates with the lock manager instructure in a number of key places * During startup, a lock is acquired in between the fork exec * During startup, the libvirtd process acquires a lock before setting file labelling * During shutdown, the libvirtd process acquires a lock

Re: [libvirt] [PATCH 0/8 v3] Integration of lock managers in QEMU

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 10:33:02AM +0100, Daniel P. Berrange wrote: This is an update to http://www.redhat.com/archives/libvir-list/2011-January/msg00952.html Changes in this series - Lock manager plugin API is dramatically simpler - Lock manager only protects disk content, not disk

Re: [libvirt] [PATCH 01/16] Introduce yet another migration version in API.

2011-05-11 Thread Jiri Denemark
On Wed, May 11, 2011 at 10:09:47 +0100, Daniel P. Berrange wrote: The problems with this [migration v2] are: - Since the first step is a generic 'DumpXML' call, we can't add in other migration specific data. eg, we can't include any VM lease data from lock manager plugins - Since

[libvirt] [PATCH 00/10 v4] New internal infrastructure for RPC

2011-05-11 Thread Daniel P. Berrange
An update of: http://www.redhat.com/archives/libvir-list/2011-March/msg00901.html New in this series - Merge the patches for test cases into the corresponding patch for the API being tested - Pull in latest changes from remote driver client - Rebase wrt Matthias' RPC generator changes

[libvirt] [PATCH 02/10] Provide a simple object for encoding/decoding RPC messages

2011-05-11 Thread Daniel P. Berrange
This provides a new struct that contains a buffer for the RPC message header+payload, as well as a decoded copy of the message header. There is an API for applying a XDR encoding decoding of the message headers and payloads. There are also APIs for maintaining a simple FIFO queue of message

[libvirt] [PATCH 06/10] Integrate TLS/SASL directly into the socket APIs

2011-05-11 Thread Daniel P. Berrange
This extends the basic virNetSocket APIs to allow them to have a handle to the TLS/SASL session objects, once established. This ensures that any data reads/writes are automagically passed through the TLS/SASL encryption layers if required. * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Wire up

[libvirt] [PATCH 05/10] Generic module for handling SASL authentication encryption

2011-05-11 Thread Daniel P. Berrange
This provides two modules for handling SASL * virNetSASLContext provides the process-wide state, currently just a whitelist of usernames on the server and a one time library init call * virNetTLSSession provides the per-connection state, ie the SASL session itself. This also include

[libvirt] [PATCH 03/10] Introduce a generic object for using network sockets

2011-05-11 Thread Daniel P. Berrange
Introduces a simple wrapper around the raw POSIX sockets APIs and name resolution APIs. Allows for easy creation of client and server sockets with correct usage of name resolution APIs for protocol agnostic socket setup. It can listen for UNIX and TCP stream sockets. It can connect to UNIX, TCP

[libvirt] [PATCH 08/10] Introduce generic RPC module for advertizing via MDNS

2011-05-11 Thread Daniel P. Berrange
Allow RPC servers to advertize themselves using MDNS, via Avahi * src/rpc/virnetserver.c, src/rpc/virnetserver.h: Allow registration of MDNS services via avahi * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Add API to fetch the listen port number * src/rpc/virnetsocket.c,

[libvirt] [PATCH 04/10] Generic module for handling TLS encryption and x509 certs

2011-05-11 Thread Daniel P. Berrange
This provides two modules for handling TLS * virNetTLSContext provides the process-wide state, in particular all the x509 credentials, DH params and x509 whitelists * virNetTLSSession provides the per-connection state, ie the TLS session itself. The virNetTLSContext provides APIs for

[libvirt] [PATCH 10/10] Move the RPC generator scripts into src/rpc

2011-05-11 Thread Daniel P. Berrange
Move the daemon/remote_generator.pl to src/rpc/gendispatch.pl and move the src/remote/rpcgen_fix.pl to src/rpc/genprotocol.pl * daemon/Makefile.am: Update for new name/location of generator * src/Makefile.am: Update for new name/location of generator --- daemon/Makefile.am

Re: [libvirt] [PATCH 06/16] storage: Convert qemu-img -help parsing to virCommand

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:45PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage/storage_backend.c | 31 ++- 1 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/storage/storage_backend.c

Re: [libvirt] [PATCH 07/16] storage: Covert regex helpers to virCommand

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:46PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage/storage_backend.c | 101 ++--- 1 files changed, 35 insertions(+), 66 deletions(-) diff --git

Re: [libvirt] [PATCH 10/16] openvz: Convert virExec usage to virCommand

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:49PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/openvz/openvz_conf.c | 37 ++- src/openvz/openvz_driver.c | 52 --- 2 files changed, 41

Re: [libvirt] [PATCH 08/16] storage: iscsi: Convert virExec to virCommand

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:47PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage/storage_backend_iscsi.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c

Re: [libvirt] [PATCH 12/16] util: Remove unused virExec wrapper

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:51PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/libvirt_private.syms |1 - src/util/util.c | 35 --- src/util/util.h |8 3 files changed, 0

Re: [libvirt] [PATCH 11/16] remote: Convert SSH tunnel to virCommand

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:50PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/remote/remote_driver.c | 65 --- 1 files changed, 18 insertions(+), 47 deletions(-) diff --git a/src/remote/remote_driver.c

Re: [libvirt] [PATCH 13/16] util: Implement virRun as a wrapper around virCommand

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:52PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/util.c | 68 ++ 1 files changed, 8 insertions(+), 60 deletions(-) diff --git a/src/util/util.c

Re: [libvirt] [PATCH 16/16] command: Report stdout/stderr if command fails

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:55PM -0400, Cole Robinson wrote: Just reporting the exit status isn't all that enlightening most of the time. This makes the message pretty wordy, but it will reduce user confusion for many errors. Signed-off-by: Cole Robinson crobi...@redhat.com ---

Re: [libvirt] [PATCH 14/16] Move virRun, virExec*, virFork to util/command

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:53PM -0400, Cole Robinson wrote: Seems reasonable to have all command wrappers in the same place Signed-off-by: Cole Robinson crobi...@redhat.com --- cfg.mk|2 +- src/libvirt_private.syms |5 +-

Re: [libvirt] [PATCH 15/16] storage_backend: Fix error reporting with regex helper

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:07:54PM -0400, Cole Robinson wrote: Some clients overwrite the error from the regex helper, or do half-baked error reporting with the exitstatus. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage/storage_backend.c | 11 +--

[libvirt] [PATCH] Fix modifying disk devices in qemu driver

2011-05-11 Thread Markus Groß
When modifying the disk devices of a live domain and the domain configuration, the function qemuDomainAttachDeviceConfig first sets dev-data-disk to NULL. Later qemuDomainAttachDeviceLive accesses dev-data.disk and causes a segfault. --- src/qemu/qemu_driver.c | 14 ++ 1 files

Re: [libvirt] [PATCH] Fix modifying disk devices in qemu driver

2011-05-11 Thread Wen Congyang
At 05/11/2011 07:12 PM, Markus Groß Write: When modifying the disk devices of a live domain and the domain configuration, the function qemuDomainAttachDeviceConfig first sets dev-data-disk to NULL. Later qemuDomainAttachDeviceLive accesses dev-data.disk and causes a segfault. ---

[libvirt] [PATCH 0/2] More graceful handing of monitor failures

2011-05-11 Thread Daniel P. Berrange
Currently when libvirt has a serious error doing I/O and/or parsing of the QEMU monitor, it will kill off the guest. Application developers have expressed a desire for more graceful handling of this scenario. In particular to allow the guest OS to continue to run, without any further monitor

[libvirt] [PATCH 1/2] Introduce a new event emitted when a virtualization failure occurs

2011-05-11 Thread Daniel P. Berrange
This introduces a new domain VIR_DOMAIN_EVENT_ID_VMM_ERROR With a callback typedef void (*virConnectDomainEventVMMErrorCallback)(virConnectPtr conn, virDomainPtr dom, int type,

[libvirt] [PATCH 2/2] Don't kill QEMU process when a monitor I/O parsing error occurs

2011-05-11 Thread Daniel P. Berrange
Currently whenever there is any failure with parsing the monitor, this is treated in the same was as end-of-file (ie QEMU quit). The domain is terminated, if not already dead. With this change, failures in parsing the monitor stream do not result in the death of QEMU. The guest continues running

Re: [libvirt] Crash state and QEMU

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 09:48:24AM +0200, Jiri Denemark wrote: On Tue, May 10, 2011 at 14:28:20 -0500, Anthony Liguori wrote: On 05/10/2011 02:04 PM, Richard W.M. Jones wrote: On Tue, May 10, 2011 at 01:26:39PM -0500, Anthony Liguori wrote: As far as I can tell, if QEMU exits abruptly or

Re: [libvirt] [PATCH] Add support for 'passthru' mode for direct network interfaces

2011-05-11 Thread Daniel P. Berrange
On Tue, May 10, 2011 at 04:21:29PM -0600, Eric Blake wrote: On 05/10/2011 05:59 AM, D. Herrendoerfer wrote: Hi all, starting with kernel 2.6.38 macvtap supports a 'passthru' mode for attaching virtual functions of a SRIOV capable network card directly to a VM. This patch adds the

Re: [libvirt] migration of vnlink VMs

2011-05-11 Thread Dan Kenigsberg
Sorry for hijacking the thread for something more general than vnlink: It just occured to me today that the concept of virtual network should be used also in the graphics section. Currently, if you specify graphics listen=some-ip-address you make the domain practically unmigratable. There

Re: [libvirt] migration of vnlink VMs

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 03:28:30PM +0300, Dan Kenigsberg wrote: Sorry for hijacking the thread for something more general than vnlink: It just occured to me today that the concept of virtual network should be used also in the graphics section. Currently, if you specify graphics

Re: [libvirt] migration of vnlink VMs

2011-05-11 Thread Dan Kenigsberg
On Wed, May 11, 2011 at 01:37:25PM +0100, Daniel P. Berrange wrote: On Wed, May 11, 2011 at 03:28:30PM +0300, Dan Kenigsberg wrote: Sorry for hijacking the thread for something more general than vnlink: It just occured to me today that the concept of virtual network should be used

Re: [libvirt] [PATCH 01/16] Introduce yet another migration version in API.

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 11:51:41AM +0200, Jiri Denemark wrote: On Wed, May 11, 2011 at 10:09:47 +0100, Daniel P. Berrange wrote: The problems with this [migration v2] are: - Since the first step is a generic 'DumpXML' call, we can't add in other migration specific data. eg, we can't

Re: [libvirt] [PATCH 1/4] Define a QEMU specific API to attach to a running QEMU process

2011-05-11 Thread Daniel P. Berrange
On Thu, May 05, 2011 at 04:33:06PM -0600, Eric Blake wrote: On 05/05/2011 11:26 AM, Daniel P. Berrange wrote: Introduce a new API in libvirt-qemu.so virDomainPtr virDomainQemuAttach(virConnectPtr domain, int pid,

Re: [libvirt] [PATCH 2/2] Don't kill QEMU process when a monitor I/O parsing error occurs

2011-05-11 Thread Dan Kenigsberg
On Wed, May 11, 2011 at 12:59:07PM +0100, Daniel P. Berrange wrote: +/* + * This is invoked when there is some kind of error + * parsing data to/from the monitor. The VM can continue + * to run, but no further monitor commands will be + * allowed + */ +static void

Re: [libvirt] [PATCH] qemu: allow blkstat/blkinfo calls during migration

2011-05-11 Thread Federico Simoncelli
Hi Eric, thank you for the quick and detailed patch review! I think I fixed all the problems that you described but if you find anything that I missed or anything new I'll be happy to accept the help you offered :) You can update my email address in AUTHORS to the redhat one. commit

[libvirt] [PATCH] qemu: allow blkstat/blkinfo calls during migration

2011-05-11 Thread Federico Simoncelli
Originally most of libvirt domain-specific calls were blocking during a migration. A new mechanism to allow specific calls (blkstat/blkinfo) to be executed in such condition has been implemented. In the long term it'd be desirable to get a more general solution to mark further APIs as migration

[libvirt] why is network i/o always zero?

2011-05-11 Thread 黄亮
hi all I'm using Xen on CentOS.I wanna monitor the network activity of a domain. When I use Domain.InterfaceStats( ... ), which is the C# binding of virDomainInterfaceStats, it returns -1. I wonder if the function is not supported by Xen. So I using domifstat, and I get vif1.0 rx_bytes 0

Re: [libvirt] [PATCH 2/2] Don't kill QEMU process when a monitor I/O parsing error occurs

2011-05-11 Thread Jiri Denemark
On Wed, May 11, 2011 at 16:15:42 +0300, Dan Kenigsberg wrote: On Wed, May 11, 2011 at 12:59:07PM +0100, Daniel P. Berrange wrote: +/* + * This is invoked when there is some kind of error + * parsing data to/from the monitor. The VM can continue + * to run, but no further monitor

[libvirt] [PATCH] docs: avoid double 'the'

2011-05-11 Thread Eric Blake
* docs/testsuites.html.in: Keep 'make syntax-check' happy. --- Pushing under the build-breaker rule. docs/testsuites.html.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/testsuites.html.in b/docs/testsuites.html.in index 86fd5ef..4441d94 100644 ---

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-11 Thread Eric Blake
On 05/09/2011 03:24 AM, Lai Jiangshan wrote: These VIR_0 APIs make us confused, use the non-0-suffix APIs instead. How these coversions works? The magic is using ##. #define high_levle_api(fmt, ...) low_levle_api(fmt, ##__VA_ARGS__) When __VA_ARGS__ is empty, ## will swallow the , in

Re: [libvirt] [PATCH] Add support for 'passthru' mode for direct network interfaces

2011-05-11 Thread Laine Stump
On 05/11/2011 08:21 AM, Daniel P. Berrange wrote: On Tue, May 10, 2011 at 04:21:29PM -0600, Eric Blake wrote: On 05/10/2011 05:59 AM, D. Herrendoerfer wrote: Hi all, starting with kernel 2.6.38 macvtap supports a 'passthru' mode for attaching virtual functions of a SRIOV capable network card

Re: [libvirt] [PATCH] Add support for 'passthru' mode for direct network interfaces

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 10:46:55AM -0400, Laine Stump wrote: On 05/11/2011 08:21 AM, Daniel P. Berrange wrote: On Tue, May 10, 2011 at 04:21:29PM -0600, Eric Blake wrote: On 05/10/2011 05:59 AM, D. Herrendoerfer wrote: Hi all, starting with kernel 2.6.38 macvtap supports a 'passthru' mode

[libvirt] [PATCH] build: fix VPATH build with distributed generated files

2011-05-11 Thread Eric Blake
* daemon/Makefile.am (DAEMON_GENERATED, remote_dispatch_*.h) (qemu_dispatch_*.h): Update to live in srcdir, since they are distributed. Detected by Daniel P. Berrange's autobuilder. --- Pushing under the build-breaker rule. daemon/Makefile.am | 102

Re: [libvirt] [PATCH 2/2] Don't kill QEMU process when a monitor I/O parsing error occurs

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 04:15:42PM +0300, Dan Kenigsberg wrote: On Wed, May 11, 2011 at 12:59:07PM +0100, Daniel P. Berrange wrote: +/* + * This is invoked when there is some kind of error + * parsing data to/from the monitor. The VM can continue + * to run, but no further monitor

[libvirt] CfP 6th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'11) - Deadline Extension

2011-05-11 Thread VHPC 11
Due to several requests, the deadline has been extended to the 20th of June. -- = CALL FOR PAPERS 6th Workshop on Virtualization in High-Performance Cloud Computing VHPC'11 as part of Euro-Par 2011, Bordeaux, France

[libvirt] [PATCH] tests: avoid crash when run under gcov

2011-05-11 Thread Eric Blake
Running ./autobuild.sh failed when gcov is installed, because commandtest ended up crashing during gcov's getenv() call after exit() had already started. I traced this nasty bug back to a scoping issue present since the test introduction. * tests/commandtest.c (mymain): Move newenv... (newenv):

Re: [libvirt] [PATCH] tests: avoid crash when run under gcov

2011-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2011 at 09:57:46AM -0600, Eric Blake wrote: Running ./autobuild.sh failed when gcov is installed, because commandtest ended up crashing during gcov's getenv() call after exit() had already started. I traced this nasty bug back to a scoping issue present since the test

Re: [libvirt] [PATCH 1/2] build: remove some dead assignments

2011-05-11 Thread Laine Stump
On 05/04/2011 07:37 PM, Eric Blake wrote: No syntactic effect; this merely silences some clang warnings. * src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Drop redundant ret=0 statement. * src/qemu/qemu_monitor_text.c (qemuMonitorTextDriveDel): Likewise. --- More clang fallout, found by

Re: [libvirt] [PATCH] tests: avoid crash when run under gcov

2011-05-11 Thread Eric Blake
On 05/11/2011 09:57 AM, Eric Blake wrote: Running ./autobuild.sh failed when gcov is installed, because commandtest ended up crashing during gcov's getenv() call after exit() had already started. I traced this nasty bug back to a scoping issue present since the test introduction. *

Re: [libvirt] [PATCH 1/2] build: remove some dead assignments

2011-05-11 Thread Eric Blake
On 05/11/2011 10:25 AM, Laine Stump wrote: On 05/04/2011 07:37 PM, Eric Blake wrote: No syntactic effect; this merely silences some clang warnings. * src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Drop redundant ret=0 statement. * src/qemu/qemu_monitor_text.c (qemuMonitorTextDriveDel):

Re: [libvirt] [PATCH 2/2] node_device: avoid null dereference on error

2011-05-11 Thread Laine Stump
On 05/04/2011 07:37 PM, Eric Blake wrote: If we plow on after udev_device_get_syspath fails, we will hit a NULL dereference. Clang found one due to strdup later in udevSetParent, but in fact we hit a NULL dereference sooner because of the use of STREQ within virNodeDeviceFindBySysfsPath. *

Re: [libvirt] [PATCH] maint: avoid double-close bug in gnulib

2011-05-11 Thread Eric Blake
On 05/10/2011 03:57 PM, Eric Blake wrote: Regression introduced in commit 9d8e01a1d. * .gnulib: Update to latest, for fclose fix. --- Solves the issue raised here: https://www.redhat.com/archives/libvir-list/2011-May/msg00580.html I'm now pushing this under the build-breaker rule with

Re: [libvirt] [PATCH 2/2] node_device: avoid null dereference on error

2011-05-11 Thread Eric Blake
On 05/11/2011 10:26 AM, Laine Stump wrote: On 05/04/2011 07:37 PM, Eric Blake wrote: If we plow on after udev_device_get_syspath fails, we will hit a NULL dereference. Clang found one due to strdup later in udevSetParent, but in fact we hit a NULL dereference sooner because of the use of

Re: [libvirt] [PATCH 0/9] add DHCP snooping support to nwfilter

2011-05-11 Thread Stefan Berger
David Stevens/Beaverton/IBM@IBMUS wrote on 05/09/2011 04:00:05 PM: The following series of patches replaces IP address learning in network filtering with DHCP snooping. The existing address learning capability does not provide security since it relies on addresses used in initial

Re: [libvirt] [PATCH 3/9] add DHCP snooping support to nwfilter

2011-05-11 Thread Stefan Berger
David Stevens/Beaverton/IBM@IBMUS wrote on 05/09/2011 04:04:47 PM: diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index c5705c1..df1a012 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -82,7 +82,9 @@ VIR_ENUM_IMPL(virNWFilterEbtablesTable,

[libvirt] [PATCH] remote generator: Add skipgen/autogen flags to .x files

2011-05-11 Thread Matthias Bolte
Make procedure parsing more robust, by allowing arbitrary amounts of whitespaces. Also make some error messages more verbose. --- cfg.mk |2 +- daemon/remote_generator.pl | 165 --- src/remote/qemu_protocol.x |5 +- src/remote/remote_protocol.x |

Re: [libvirt] [PATCH 4/9] add DHCP snooping support to nwfilter

2011-05-11 Thread Stefan Berger
David Stevens/Beaverton/IBM@IBMUS wrote on 05/09/2011 04:06:29 PM: This patch simplifies the table rules by setting the protocol chainspolicy to be DROP and removes the explicit -j DROP entries that the protocol rules had previously. It also makes no-other-rarp-traffic.xml obsolete.

Re: [libvirt] [PATCH 8/9] add DHCP snooping support to nwfilter

2011-05-11 Thread Stefan Berger
David Stevens/Beaverton/IBM@IBMUS wrote on 05/09/2011 04:11:19 PM: + */ + +#include config.h + +#ifdef HAVE_LIBPCAP +#include pcap.h +#endif This is the only place you check for HAVE_LIBPCAP. Basically when it's not available the snooping doesn't work and VMs referencing filters that

[libvirt] [PATCH 3/3] maint: omit translation for all VIR_INFO

2011-05-11 Thread Eric Blake
We were 31/73 on whether to translate; since less than 50% translated and since VIR_INFO is less than VIR_WARN which also doesn't translate, this makes sense. * cfg.mk (sc_prohibit_gettext_markup): Add VIR_INFO, since it falls between WARN and DEBUG. * daemon/libvirtd.c (qemudDispatchSignalEvent,

[libvirt] [PATCH 0/3] C99 cleanup for VIR_DEBUG0 removal

2011-05-11 Thread Eric Blake
This series is intended as followup to Lai's patch, to get us back to code that can be compiled by any C99 compiler, and extending Lai's cleanups to also cover VIR_DOMAIN_DEBUG0. Eric Blake (3): build: avoid gcc preprocessor extensions build: drop need for VIR_DOMAIN_DEBUG0() maint: omit

[libvirt] [PATCH 2/3] build: drop need for VIR_DOMAIN_DEBUG0()

2011-05-11 Thread Eric Blake
This one's tricker than the VIR_DEBUG0() removal, but the end result is still C99 compliant, and reasonable with enough comments. * src/libvirt.c (VIR_ARG10, VIR_HAS_COMMA) (VIR_DOMAIN_DEBUG_EXPAND, VIR_DOMAIN_DEBUG_PASTE): New macros. (VIR_DOMAIN_DEBUG): Rewrite to handle one argument, moving

[libvirt] [PATCH] build: fix 'make dist' for ./configure --without-remote

2011-05-11 Thread Eric Blake
Anything generated that must end up in the tarball must either have unconditional rules for generation (remote_protocol.c) or must live in libvirt.git for the case where the person running 'make dist' has disabled the configure options that control the rebuild of the generated file

[libvirt] [PATCH] nwfilter: reorder locks

2011-05-11 Thread Stefan Berger
This patch reorders the locks for the nwfilter updates and the access the nwfilter objects. In the case that the IP address learning thread was instantiating filters while an update happened, the previous order lead to a deadlock. I am also adding a text file describing the locking order of

Re: [libvirt] [PATCH 1/3] build: avoid gcc preprocessor extensions

2011-05-11 Thread Eric Blake
On 05/11/2011 02:31 PM, Jiri Denemark wrote: On Wed, May 11, 2011 at 14:13:28 -0600, Eric Blake wrote: Use of ',##__VA_ARGS__' is a gcc extension not guaranteed by C99; thankfully, we can avoid it by lumping the format argument into the var-args set. * src/util/logging.h (VIR_DEBUG_INT,

Re: [libvirt] [PATCH 1/6] Add new API virDomainStreamDisk[Info] to header and drivers

2011-05-11 Thread Anthony Liguori
On 05/09/2011 11:09 AM, Daniel P. Berrange wrote: int virDomainBlockStreamInfo(virDomainPtr dom, const char *device, virBlockStreamInfoPtr info); Any reason you didn't just use the existing 'virDomainJobInfoPtr'

Re: [libvirt] [PATCH] fix xdr detection and use with recent glibc

2011-05-11 Thread Eric Blake
On 05/10/2011 10:13 AM, Daniel P. Berrange wrote: On Tue, May 10, 2011 at 05:42:06PM +0200, Christophe Fergeau wrote: glibc 2.13.90 has obsoleted its rpc implementation in favour of the one provided by the TI-RPC library: * The RPC implementation in libc is obsoleted. Old programs keep

Re: [libvirt] [PATCH 3/3] maint: omit translation for all VIR_INFO

2011-05-11 Thread Jiri Denemark
On Wed, May 11, 2011 at 14:13:30 -0600, Eric Blake wrote: We were 31/73 on whether to translate; since less than 50% translated and since VIR_INFO is less than VIR_WARN which also doesn't translate, this makes sense. * cfg.mk (sc_prohibit_gettext_markup): Add VIR_INFO, since it falls

[libvirt] [PATCH 2.5/3] build: wrap macro body in one-shot do-while loop

2011-05-11 Thread Eric Blake
* src/libvirt.c (VIR_DOMAIN_DEBUG_1): Convert to single statement. Suggested by Jiri Denemark. --- Personally I would prefer this macro to be ``do { ... } while (0)'' but that a preexisting issue and given that it's only used at the beginning of functions I guess I can live without this

Re: [libvirt] [PATCH 3/3] maint: omit translation for all VIR_INFO

2011-05-11 Thread Eric Blake
On 05/11/2011 03:08 PM, Jiri Denemark wrote: On Wed, May 11, 2011 at 14:13:30 -0600, Eric Blake wrote: We were 31/73 on whether to translate; since less than 50% translated and since VIR_INFO is less than VIR_WARN which also doesn't translate, this makes sense. * cfg.mk

Re: [libvirt] [PATCH 09/16] qemu: Convert virExec usage to virCommand

2011-05-11 Thread Eric Blake
On 05/10/2011 02:07 PM, Cole Robinson wrote: -if (virExec(intermediate_argv, NULL, NULL, -intermediate_pid, intermediatefd, fd, NULL, 0) 0) { + +virCommandSetInputFD(cmd, intermediatefd); +virCommandSetOutputFD(cmd, fd); + +

  1   2   >