[libvirt] [PATCH] libvirt: fix a simple bug in virDomainSetMemoryFlags()

2011-03-15 Thread Taku Izumi
This patch fix a simple bug in virDomainSetMemoryFlags function. The patch sent before lacks the consideration of the case where the driver doesn't support virDomainSetMemoryFlags API. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- src/libvirt.c |2 ++ 1 file changed, 2

[libvirt] mingw: virsh event loop failure in current git

2011-03-15 Thread Matthias Bolte
Commit 2ed6cc7bec41dd344d41ea1531f6760c93099128 Expose event loop implementation as a public API turned a failure to initialize the default event loop into a fatal error in virsh on Windows. Before that commit such a failure was ignored. virEventRegisterDefaultImpl calls virEventPollInit that

[libvirt] [PATCH] docs: update windows page for initial libvirt 0.8.8 installer

2011-03-15 Thread Justin Clift
--- docs/windows.html.in |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/docs/windows.html.in b/docs/windows.html.in index 4850a54..4011cc3 100644 --- a/docs/windows.html.in +++ b/docs/windows.html.in @@ -18,7 +18,7 @@ version is available here: /p -

[libvirt] [PATCH] qemu: Fallback to HMP when cpu_set QMP command is not found

2011-03-15 Thread Wen Congyang
--- src/qemu/qemu_monitor_json.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index a839ffe..13d12c8 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -1450,7 +1450,14

Re: [libvirt] [PATCH v2] qemu: Check the unsigned integer overflow

2011-03-15 Thread Daniel P. Berrange
On Mon, Mar 14, 2011 at 09:27:40PM -0600, Eric Blake wrote: On 03/09/2011 01:34 AM, Osier Yang wrote: As perhaps other hypervisor drivers use different capacity units, do the checking in qemu driver instead of in conf/domain_conf.c. --- src/qemu/qemu_command.c | 14 ++ 1

Re: [libvirt] mingw: virsh event loop failure in current git

2011-03-15 Thread Daniel P. Berrange
On Tue, Mar 15, 2011 at 09:29:14AM +0100, Matthias Bolte wrote: Commit 2ed6cc7bec41dd344d41ea1531f6760c93099128 Expose event loop implementation as a public API turned a failure to initialize the default event loop into a fatal error in virsh on Windows. Before that commit such a failure was

Re: [libvirt] [PATCH] libvirt: fix a simple bug in virDomainSetMemoryFlags()

2011-03-15 Thread Laine Stump
On 03/15/2011 03:49 AM, Taku Izumi wrote: This patch fix a simple bug in virDomainSetMemoryFlags function. The patch sent before lacks the consideration of the case where the driver doesn't support virDomainSetMemoryFlags API. Signed-off-by: Taku Izumiizumi.t...@jp.fujitsu.com ---

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

2011-03-15 Thread Daniel P. Berrange
* src/storage/storage_driver.c: Wire up upload/download APIs --- src/storage/storage_driver.c | 133 +- 1 files changed, 131 insertions(+), 2 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ce528cf..706db74

[libvirt] [PATCH 0/5] REPOST: Allow data upload/download to/from storage volumes

2011-03-15 Thread Daniel P. Berrange
This is a repost of http://www.redhat.com/archives/libvir-list/2011-February/msg00967.html No changes since the last posting, except for re-basing to latest GIT -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 3/5] Add vol-create-upload, vol-upload and vol-download commands to virsh

2011-03-15 Thread Daniel P. Berrange
* tools/virsh.c: Add vol-create-upload, vol-upload and vol-download commands --- .x-sc_avoid_write |1 + tools/virsh.c | 225 + 2 files changed, 226 insertions(+), 0 deletions(-) diff --git a/.x-sc_avoid_write b/.x-sc_avoid_write

[libvirt] [PATCH] Add virSetBlocking() to allow O_NONBLOCK to be toggle on or off

2011-03-15 Thread Daniel P. Berrange
The virSetNonBlock() API only allows enabling non-blocking operations. It doesn't allow turning blocking back on. Add a new API to allow arbitrary toggling. * src/libvirt_private.syms, src/util/util.h src/util/util.c: Add virSetBlocking --- src/libvirt_private.syms |1 + src/util/util.c

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

2011-03-15 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,

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

2011-03-15 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 *

[libvirt] [PATCH] Add compat function for geteuid()

2011-03-15 Thread Daniel P. Berrange
* configure.ac: Check for geteuid() * src/util/util.h: Compat for geteuid() --- configure.ac|2 +- src/util/util.h |4 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index a58ee4e..e2b2b24 100644 --- a/configure.ac +++ b/configure.ac @@

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

2011-03-15 Thread Daniel P. Berrange
New APIs are added allowing streaming of content to/from storage volumes. A new API for creating volumes is also added allowing the content to be provided immediately at time of creation * include/libvirt/libvirt.h.in: Add virStorageVolUpload and virStorageVolDownload, virStorageVolCreateUpload

Re: [libvirt] [PATCH] docs: update windows page for initial libvirt 0.8.8 installer

2011-03-15 Thread Justin Clift
On 15/03/2011, at 9:33 PM, Justin Clift wrote: --- docs/windows.html.in |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/docs/windows.html.in b/docs/windows.html.in index 4850a54..4011cc3 100644 --- a/docs/windows.html.in +++ b/docs/windows.html.in @@ -18,7

[libvirt] [PATCH] Change message for VIR_FROM_RPC error domain

2011-03-15 Thread Daniel P. Berrange
The VIR_FROM_RPC error domain is used generically for any RPC problem, not simply XML-RPC problems. * src/util/virterror.c: s/XML-RPC/RPC/ --- src/util/virterror.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/virterror.c b/src/util/virterror.c index

[libvirt] [PATCH] Fix misc bugs in virCommandPtr

2011-03-15 Thread Daniel P. Berrange
The virCommandNewArgs() method would free the virCommandPtr if it failed to add the args. This meant errors reported in virCommandAddArgSet() were lost. Simply removing the check for errors from the constructor means they can be reported correctly later The virCommandAddEnvPassCommon() method

Re: [libvirt] [PATCH 2/4] libvirt-guest.init: quoting variables

2011-03-15 Thread Eric Blake
On 03/14/2011 01:34 AM, Philipp Hahn wrote: Meanwhile, I'm not a fan of blindly quoting everything; there are documented cases where you can trigger shell bugs by doing too much quoting. For example: foo=`some_command with quotes` is portable, but foo=`some_command with quotes` is not.

Re: [libvirt] [PATCH] Add virSetBlocking() to allow O_NONBLOCK to be toggle on or off

2011-03-15 Thread Laine Stump
On 03/15/2011 08:32 AM, Daniel P. Berrange wrote: The virSetNonBlock() API only allows enabling non-blocking operations. It doesn't allow turning blocking back on. Add a new API to allow arbitrary toggling. * src/libvirt_private.syms, src/util/util.h src/util/util.c: Add virSetBlocking ---

Re: [libvirt] [PATCH] Change message for VIR_FROM_RPC error domain

2011-03-15 Thread Laine Stump
On 03/15/2011 08:33 AM, Daniel P. Berrange wrote: The VIR_FROM_RPC error domain is used generically for any RPC problem, not simply XML-RPC problems. * src/util/virterror.c: s/XML-RPC/RPC/ --- src/util/virterror.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] Fix misc bugs in virCommandPtr

2011-03-15 Thread Laine Stump
On 03/15/2011 08:32 AM, Daniel P. Berrange wrote: The virCommandNewArgs() method would free the virCommandPtr if it failed to add the args. This meant errors reported in virCommandAddArgSet() were lost. Simply removing the check for errors from the constructor means they can be reported

Re: [libvirt] [PATCH] Fix misc bugs in virCommandPtr

2011-03-15 Thread Eric Blake
On 03/15/2011 06:32 AM, Daniel P. Berrange wrote: The virCommandNewArgs() method would free the virCommandPtr if it failed to add the args. This meant errors reported in virCommandAddArgSet() were lost. Simply removing the check for errors from the constructor means they can be reported

Re: [libvirt] [PATCH] Add compat function for geteuid()

2011-03-15 Thread Eric Blake
On 03/15/2011 06:32 AM, Daniel P. Berrange wrote: * configure.ac: Check for geteuid() * src/util/util.h: Compat for geteuid() --- configure.ac|2 +- src/util/util.h |4 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index

Re: [libvirt] [PATCH] Add compat function for geteuid()

2011-03-15 Thread Laine Stump
On 03/15/2011 08:32 AM, Daniel P. Berrange wrote: * configure.ac: Check for geteuid() * src/util/util.h: Compat for geteuid() --- configure.ac|2 +- src/util/util.h |4 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index

Re: [libvirt] [PATCH] Fix misc bugs in virCommandPtr

2011-03-15 Thread Daniel P. Berrange
On Tue, Mar 15, 2011 at 08:03:09AM -0600, Eric Blake wrote: On 03/15/2011 06:32 AM, Daniel P. Berrange wrote: The virCommandNewArgs() method would free the virCommandPtr if it failed to add the args. This meant errors reported in virCommandAddArgSet() were lost. Simply removing the check

Re: [libvirt] [PATCH] setmem: provide dummy impls for remaining drivers

2011-03-15 Thread Eric Blake
On 03/14/2011 11:11 PM, Taku Izumi wrote: What we need is three flags instead of two: VIR_DOMAIN_MEM_LIVE VIR_DOMAIN_MEM_CONFIG VIR_DOMAIN_MEM_CURRENT - use LIVE or CONFIG according to domain state Daniel's suggestion of letting virDomainSetMemoryFlags(,0) operate as _CURRENT mode sounds

Re: [libvirt] [PATCH] Add compat function for geteuid()

2011-03-15 Thread Daniel P. Berrange
On Tue, Mar 15, 2011 at 10:06:23AM -0400, Laine Stump wrote: On 03/15/2011 08:32 AM, Daniel P. Berrange wrote: * configure.ac: Check for geteuid() * src/util/util.h: Compat for geteuid() --- configure.ac|2 +- src/util/util.h |4 2 files changed, 5 insertions(+), 1

Re: [libvirt] [PATCH] virsh: fix memtune's help message for swap_hard_limit

2011-03-15 Thread Daniel P. Berrange
On Wed, Mar 09, 2011 at 05:13:47PM +0900, KAMEZAWA Hiroyuki wrote: diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 8b215f3..2ac50a4 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -341,7 +341,7 @@ /optional !-- Maximum swap

Re: [libvirt] [PATCH] virsh: fix memtune's help message for swap_hard_limit

2011-03-15 Thread Daniel P. Berrange
On Mon, Mar 14, 2011 at 09:24:58PM -0600, Eric Blake wrote: On 03/09/2011 01:13 AM, KAMEZAWA Hiroyuki wrote: +++ b/docs/schemas/domain.rng @@ -341,7 +341,7 @@ /optional !-- Maximum swap area the VM can use -- optional -element

Re: [libvirt] [PATCH v2] qemu: Check the unsigned integer overflow

2011-03-15 Thread Eric Blake
On 03/15/2011 04:51 AM, Daniel P. Berrange wrote: @@ -1933,6 +1933,13 @@ qemuBuildVideoDevStr(virDomainVideoDefPtr video, virBufferVSprintf(buf, ,id=%s, video-info.alias); if (video-type == VIR_DOMAIN_VIDEO_TYPE_QXL) { +if (video-vram (UINT_MAX / 1024)) { +

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

2011-03-15 Thread Eric Blake
On 03/15/2011 06:30 AM, Daniel P. Berrange wrote: 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

Re: [libvirt] [PATCH] qemu: Fallback to HMP when cpu_set QMP command is not found

2011-03-15 Thread Eric Blake
On 03/15/2011 02:53 AM, Wen Congyang wrote: --- src/qemu/qemu_monitor_json.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index a839ffe..13d12c8 100644 --- a/src/qemu/qemu_monitor_json.c +++

Re: [libvirt] [PATCH 2/5] Add public APIs for storage volume upload/download

2011-03-15 Thread Eric Blake
On 03/15/2011 06:30 AM, Daniel P. Berrange wrote: New APIs are added allowing streaming of content to/from storage volumes. A new API for creating volumes is also added allowing the content to be provided immediately at time of creation * include/libvirt/libvirt.h.in: Add

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

2011-03-15 Thread Eric Blake
On 03/15/2011 06:30 AM, Daniel P. Berrange wrote: +if (offset +lseek(fd, offset, SEEK_SET) != offset) { +virReportSystemError(errno, + _(Unable to seek %s to %llu), + path, offset); +

Re: [libvirt] [PATCH 3/5] Add vol-create-upload, vol-upload and vol-download commands to virsh

2011-03-15 Thread Eric Blake
On 03/15/2011 06:30 AM, Daniel P. Berrange wrote: * tools/virsh.c: Add vol-create-upload, vol-upload and vol-download commands --- .x-sc_avoid_write |1 + tools/virsh.c | 225 + 2 files changed, 226 insertions(+), 0

[libvirt] [PATCH] Ensure binary is resolved wrt $PATH in virExec

2011-03-15 Thread Daniel P. Berrange
virExec would only resolved the binary to $PATH if no env variables were being set. Since there is no execvep() API in POSIX, we use virFindFileInPath to manually resolve the binary and then use execv() instead of execvp(). --- src/util/util.c | 16 ++-- 1 files changed, 14

Re: [libvirt] [PATCH] Ensure binary is resolved wrt $PATH in virExec

2011-03-15 Thread Eric Blake
On 03/15/2011 11:14 AM, Daniel P. Berrange wrote: virExec would only resolved the binary to $PATH if no env variables were being set. Since there is no execvep() API in POSIX, we use virFindFileInPath to manually resolve the binary and then use execv() instead of execvp(). It might be worth a

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

2011-03-15 Thread Daniel P. Berrange
This is an update of the series posted http://www.redhat.com/archives/libvir-list/2010-December/msg00616.html Since that time - Soo many bug fixes and much testing - Addition of mDNS APIs for the server - Integration of streams support in client The actual conversion of the

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

2011-03-15 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 03/10] Generic module for handling TLS encryption and x509 certs

2011-03-15 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 09/10] Add a test case for the socket APIs

2011-03-15 Thread Daniel P. Berrange
Start of a trivial test case for the socket APIs. Only tests simple server setup client connect for UNIX sockets so far * tests/Makefile.am: Add socket test * tests/virnetsockettest.c: New test case * tests/testutils.c: Avoid overriding LIBVIRT_DEBUG settings * tests/ssh.c: Dumb helper program

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

2011-03-15 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 04/10] Generic module for handling SASL authentication encryption

2011-03-15 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 05/10] Integrate TLS/SASL directly into the socket APIs

2011-03-15 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 07/10] Introduce generic RPC module for advertizing via MDNS

2011-03-15 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 10/10] Add a test case for the RPC message APIs

2011-03-15 Thread Daniel P. Berrange
Add a test case which validates the RPC message encoding decoding to/from XDR representation. Covers the core message header, the error class and streams. * testutils.c, testutils.h: Helper for printing binary differences * virnetmessagetest.c: Validate all XDR encoding/decoding ---

Re: [libvirt] [PATCH 4/5] Support volume data upload/download APIs in storage driver

2011-03-15 Thread Eric Blake
On 03/15/2011 06:30 AM, Daniel P. Berrange wrote: * src/storage/storage_driver.c: Wire up upload/download APIs --- src/storage/storage_driver.c | 133 +- 1 files changed, 131 insertions(+), 2 deletions(-) ACK - looks pretty straightforward. --

Re: [libvirt] [PATCH] virsh: allow empty string arguments

2011-03-15 Thread Jiri Denemark
On Mon, Mar 14, 2011 at 10:46:07 -0600, Eric Blake wrote: virsh connect '' should try to connect to the default connection, but the previous patch made it issue a warning about an invalid URI. * tools/virsh.c (VSH_OFLAG_EMPTY_OK): New option flag. (vshCommandOptString): Per the declaration,

[libvirt] [PATCH] macvtap: log an error if on failure to connect to netlink socket

2011-03-15 Thread Laine Stump
A bug in libnl (see https://bugzilla.redhat.com/show_bug.cgi?id=677724 and https://bugzilla.redhat.com/show_bug.cgi?id=677725) makes it very easy to create a failure to connect to the netlink socket when trying to open a macvtap network device (type='direct' in domain interface XML). When that

Re: [libvirt] [PATCH] virsh: allow empty string arguments

2011-03-15 Thread Eric Blake
On 03/15/2011 02:13 PM, Jiri Denemark wrote: On Mon, Mar 14, 2011 at 10:46:07 -0600, Eric Blake wrote: virsh connect '' should try to connect to the default connection, but the previous patch made it issue a warning about an invalid URI. * tools/virsh.c (VSH_OFLAG_EMPTY_OK): New option flag.

Re: [libvirt] [PATCH] macvtap: log an error if on failure to connect to netlink socket

2011-03-15 Thread Stefan Berger
On 03/15/2011 04:32 PM, Laine Stump wrote: A bug in libnl (see https://bugzilla.redhat.com/show_bug.cgi?id=677724 and https://bugzilla.redhat.com/show_bug.cgi?id=677725) makes it very easy to create a failure to connect to the netlink socket when trying to open a macvtap network device

Re: [libvirt] [PATCH] macvtap: log an error if on failure to connect to netlink socket

2011-03-15 Thread Eric Blake
On 03/15/2011 02:32 PM, Laine Stump wrote: In the subject, s/if // A bug in libnl (see https://bugzilla.redhat.com/show_bug.cgi?id=677724 and https://bugzilla.redhat.com/show_bug.cgi?id=677725) makes it very easy to create a failure to connect to the netlink socket when trying to open a

Re: [libvirt] [Qemu-devel] KVM call minutes for Mar 15

2011-03-15 Thread Anthony Liguori
On 03/15/2011 02:06 PM, Chris Wright wrote: * Anthony Liguori (anth...@codemonkey.ws) wrote: On 03/15/2011 09:53 AM, Chris Wright wrote: QAPI snip - c library implementation is critical to have unit tests and test driven development - thread safe? - no shared state, no statics.

Re: [libvirt] [PATCH 02/10] Introduce a generic object for using network sockets

2011-03-15 Thread Eric Blake
On 03/15/2011 11:51 AM, Daniel P. Berrange wrote: 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

Re: [libvirt] [PATCH 1/5] report OOMError in virDomainDiskInsert()

2011-03-15 Thread Eric Blake
On 03/02/2011 06:09 PM, KAMEZAWA Hiroyuki wrote: From b92569080a25bf0029d637327a87372bff071fae Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar 2011 09:20:36 +0900 Subject: [PATCH 1/5] report OOMError in virDomainDiskInsert() Now,

Re: [libvirt] [PATCH] macvtap: log an error if on failure to connect to netlink socket

2011-03-15 Thread Laine Stump
On 03/15/2011 04:45 PM, Eric Blake wrote: On 03/15/2011 02:32 PM, Laine Stump wrote: In the subject, s/if // A bug in libnl (see https://bugzilla.redhat.com/show_bug.cgi?id=677724 and https://bugzilla.redhat.com/show_bug.cgi?id=677725) makes it very easy to create a failure to connect to the

Re: [libvirt] [PATCH 03/10] Generic module for handling TLS encryption and x509 certs

2011-03-15 Thread Eric Blake
On 03/15/2011 11:51 AM, Daniel P. Berrange wrote: 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

Re: [libvirt] [PATCHv4 03/15] qemu: improve efficiency of dd during snapshots

2011-03-15 Thread Eric Blake
On 03/10/2011 04:59 AM, Daniel P. Berrange wrote: On Wed, Mar 09, 2011 at 06:45:43PM -0700, Eric Blake wrote: POSIX states about dd: If the bs=expr operand is specified and no conversions other than sync, noerror, or notrunc are requested, the data returned from each input block shall be

Re: [libvirt] [PATCHv4 04/15] qemu: support migration to fd

2011-03-15 Thread Eric Blake
On 03/10/2011 05:01 AM, Daniel P. Berrange wrote: On Wed, Mar 09, 2011 at 06:45:44PM -0700, Eric Blake wrote: * src/qemu/qemu_monitor.h (qemuMonitorMigrateToFd): New prototype. * src/qemu/qemu_monitor.c (qemuMonitorMigrateToFd): New function. --- src/qemu/qemu_monitor.c | 31

[libvirt] [PATCH] qemu: simplify PCI configfd handling in monitor

2011-03-15 Thread Eric Blake
This is also a bug fix - on the error path, qemu_hotplug would leave the configfd file leaked into qemu. At least the next attempt to hotplug a PCI device would reuse the same fdname, and when the qemu getfd monitor command gets a new fd by the same name as an earlier one, it closes the earlier

[libvirt] Possibly addition to python api binding virDomain class

2011-03-15 Thread Russell Ballestrini
*In the python bindings of libvirt, could we please add the following code to the virDomain class? * def state(self): return the state of the dom object return self.info()[0] *This helper function would make the world of difference when coding against the libvirt api. * --

Re: [libvirt] [PATCH] virsh: fix memtune's help message for swap_hard_limit

2011-03-15 Thread KAMEZAWA Hiroyuki
On Tue, 15 Mar 2011 14:27:19 + Daniel P. Berrange berra...@redhat.com wrote: On Wed, Mar 09, 2011 at 05:13:47PM +0900, KAMEZAWA Hiroyuki wrote: diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 8b215f3..2ac50a4 100644 --- a/docs/schemas/domain.rng +++

Re: [libvirt] [PATCH] qemu: simplify PCI configfd handling in monitor

2011-03-15 Thread Eric Blake
On 03/15/2011 06:19 PM, Chris Wright wrote: * Eric Blake (ebl...@redhat.com) wrote: @@ -829,21 +829,19 @@ int qemuDomainAttachHostPciDevice(struct qemud_driver *driver, if (qemuDomainPCIAddressEnsureAddr(priv-pciaddrs, hostdev-info) 0) goto error; if

Re: [libvirt] [PATCH] virsh: fix memtune's help message for swap_hard_limit

2011-03-15 Thread KAMEZAWA Hiroyuki
On Tue, 15 Mar 2011 14:30:02 + Daniel P. Berrange berra...@redhat.com wrote: On Mon, Mar 14, 2011 at 09:24:58PM -0600, Eric Blake wrote: On 03/09/2011 01:13 AM, KAMEZAWA Hiroyuki wrote: +++ b/docs/schemas/domain.rng @@ -341,7 +341,7 @@ /optional !--

Re: [libvirt] [PATCH 1/5] report OOMError in virDomainDiskInsert()

2011-03-15 Thread KAMEZAWA Hiroyuki
On Tue, 15 Mar 2011 15:38:50 -0600 Eric Blake ebl...@redhat.com wrote: On 03/02/2011 06:09 PM, KAMEZAWA Hiroyuki wrote: From b92569080a25bf0029d637327a87372bff071fae Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar 2011 09:20:36 +0900

Re: [libvirt] [PATCH 3/5] libvirt/qemu - support persistent modification of devices.

2011-03-15 Thread KAMEZAWA Hiroyuki
On Tue, 15 Mar 2011 15:55:51 -0600 Eric Blake ebl...@redhat.com wrote: On 03/02/2011 06:11 PM, KAMEZAWA Hiroyuki wrote: From f7a997e3cd58cfac81e131afdd20c3691267831d Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar 2011 09:43:07 +0900

Re: [libvirt] [PATCH] virsh: fix memtune's help message for swap_hard_limit

2011-03-15 Thread Eric Blake
On 03/09/2011 01:13 AM, KAMEZAWA Hiroyuki wrote: Subject: [PATCH] rename swap_limit as memswap_limit. cgroup's /cgroup/memory/memory.memsw.limit_in_bytes is not for limitinit 'swap' but for 'memory+swap' (then, it's memsw) (So, this number cannot be smaller than memory.limit_in_bytes)

Re: [libvirt] [PATCH 1/5] report OOMError in virDomainDiskInsert()

2011-03-15 Thread Hu Tao
On Tue, Mar 15, 2011 at 03:38:50PM -0600, Eric Blake wrote: On 03/02/2011 06:09 PM, KAMEZAWA Hiroyuki wrote: From b92569080a25bf0029d637327a87372bff071fae Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar 2011 09:20:36 +0900 Subject: [PATCH

Re: [libvirt] [PATCH 3/5] libvirt/qemu - support persistent modification of devices.

2011-03-15 Thread Hu Tao
+ +static int qemuDomainModifyDevicePersistent(virDomainPtr dom, const char *xml, Indentation is not consistent. ok. FYI, if you use vim as your editor, the following configuration can save you a lot of time: set autoindent set

Re: [libvirt] [PATCH 1/5] report OOMError in virDomainDiskInsert()

2011-03-15 Thread Eric Blake
On 03/15/2011 07:13 PM, Hu Tao wrote: On Tue, Mar 15, 2011 at 03:38:50PM -0600, Eric Blake wrote: On 03/02/2011 06:09 PM, KAMEZAWA Hiroyuki wrote: From b92569080a25bf0029d637327a87372bff071fae Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 3 Mar

Re: [libvirt] [PATCH 3/5] libvirt/qemu - support persistent modification of devices.

2011-03-15 Thread Eric Blake
On 03/15/2011 07:28 PM, Hu Tao wrote: + +static int qemuDomainModifyDevicePersistent(virDomainPtr dom, const char *xml, Indentation is not consistent. ok. FYI, if you use vim as your editor, the following configuration can save you a lot of

Re: [libvirt] [PATCH 1/5] report OOMError in virDomainDiskInsert()

2011-03-15 Thread Hu Tao
On Tue, Mar 15, 2011 at 07:29:24PM -0600, Eric Blake wrote: On 03/15/2011 07:13 PM, Hu Tao wrote: On Tue, Mar 15, 2011 at 03:38:50PM -0600, Eric Blake wrote: On 03/02/2011 06:09 PM, KAMEZAWA Hiroyuki wrote: From b92569080a25bf0029d637327a87372bff071fae Mon Sep 17 00:00:00 2001 From:

Re: [libvirt] [PATCH V5] Add libxenlight driver

2011-03-15 Thread Jim Fehlig
Daniel Veillard wrote: On Thu, Mar 10, 2011 at 07:53:58PM -0700, Jim Fehlig wrote: Jim Fehlig wrote: Daniel Veillard wrote: Sure the URI is a very minimal part compared to the actual XML description and code but the fact we are using a different driver internally could

[libvirt] [PATCHv2 3/3] qemu: simplify interface fd handling in monitor

2011-03-15 Thread Eric Blake
With only a single caller to these two monitor commands, I didn't need to wrap a new WithFds version, but just change the command itself. * src/qemu/qemu_monitor.h (qemuMonitorAddNetdev) (qemuMonitorAddHostNetwork): Add parameters. * src/qemu/qemu_monitor.c (qemuMonitorAddNetdev)

[libvirt] [PATCHv2 1/3] qemu: simplify monitor fd error handling

2011-03-15 Thread Eric Blake
qemu_monitor was already returning -1 and setting errno to EINVAL on any attempt to send an fd without a unix socket, but this was a silent failure in the case of qemuDomainAttachHostPciDevice. Meanwhile, qemuDomainAttachNetDevice was doing some sanity checking for a better error message; it's

[libvirt] [PATCHv2 0/3] simplify monitor fd handling

2011-03-15 Thread Eric Blake
Suggested by Daniel P. Berrange: https://www.redhat.com/archives/libvir-list/2011-March/msg00476.html with an improvement by Chris Wright: https://www.redhat.com/archives/libvir-list/2011-March/msg00715.html Supercedes https://www.redhat.com/archives/libvir-list/2011-March/msg00714.html Eric

Re: [libvirt] [PATCH 3/5] libvirt/qemu - support persistent modification of devices.

2011-03-15 Thread KAMEZAWA Hiroyuki
On Wed, 16 Mar 2011 09:28:46 +0800 Hu Tao hu...@cn.fujitsu.com wrote: + +static int qemuDomainModifyDevicePersistent(virDomainPtr dom, const char *xml, Indentation is not consistent. ok. FYI, if you use vim as your editor,

[libvirt] [PATCHv2 2/3] qemu: simplify PCI configfd handling in monitor

2011-03-15 Thread Eric Blake
This is also a bug fix - on the error path, qemu_hotplug would leave the configfd file leaked into qemu. At least the next attempt to hotplug a PCI device would reuse the same fdname, and when the qemu getfd monitor command gets a new fd by the same name as an earlier one, it closes the earlier

Re: [libvirt] [PATCHv4 06/15] qemu: allow simple domain save to use fd: protocol

2011-03-15 Thread Eric Blake
On 03/10/2011 05:05 AM, Daniel P. Berrange wrote: On Wed, Mar 09, 2011 at 06:45:46PM -0700, Eric Blake wrote: This allows direct saves (no compression, no root-squash NFS) to use the more efficient fd: migration, which in turn avoids a race where qemu exec: migration can sometimes fail because

[libvirt] [PATCH] Add vim configuration that makes vim auto-indent code

2011-03-15 Thread Hu Tao
--- .lvimrc | 10 ++ HACKING |5 + 2 files changed, 15 insertions(+), 0 deletions(-) create mode 100644 .lvimrc diff --git a/.lvimrc b/.lvimrc new file mode 100644 index 000..3a732ce --- /dev/null +++ b/.lvimrc @@ -0,0 +1,10 @@ +set nocompatible +filetype on +set

Re: [libvirt] [PATCH] virsh: fix memtune's help message for swap_hard_limit

2011-03-15 Thread Nikunj A. Dadhania
On Wed, 16 Mar 2011 09:37:32 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Tue, 15 Mar 2011 14:27:19 + Daniel P. Berrange berra...@redhat.com wrote: NACK to both these changes. The XML and public API must *never* be changed once included in a release. The