Re: [libvirt] [PATCH v2 8/8] virsh: Extend virsh dominfo to display if managed state exists

2011-07-19 Thread Osier Yang
于 2011年07月19日 01:37, Eric Blake 写道: On 07/18/2011 11:34 AM, Eric Blake wrote: Here, we print managed state, but the command that creates that state is called managedsave, and the API we call is virDomainHasManagedSaveImage. Not to mention that it surpasses 15 columns, which makes the output not

[libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread ajia
* src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor 5: ==1254==at 0x30736D9D47: pipe2 (syscall-template.S:82) ==1254==by 0x4DD6267: rpl_pipe2 (pipe2.c:61)

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Osier Yang
于 2011年07月19日 16:25, Alex Jia 写道: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor 5: ==1254==at 0x30736D9D47: pipe2 (syscall-template.S:82) ==1254==by

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Matthias Bolte
2011/7/19 a...@redhat.com: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor 5: ==1254==    at 0x30736D9D47: pipe2 (syscall-template.S:82) ==1254==    by

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Alex Jia
On 07/19/2011 05:00 PM, Osier Yang wrote: 于 2011年07月19日 16:25, Alex Jia 写道: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor 5: ==1254==at 0x30736D9D47: pipe2

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Alex Jia
On 07/19/2011 05:00 PM, Matthias Bolte wrote: 2011/7/19a...@redhat.com: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor 5: ==1254==at 0x30736D9D47: pipe2

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Alex Jia
On 07/19/2011 05:12 PM, Alex Jia wrote: On 07/19/2011 05:00 PM, Matthias Bolte wrote: 2011/7/19a...@redhat.com: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor

Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag

2011-07-19 Thread Daniel P. Berrange
On Mon, Jul 18, 2011 at 01:11:42PM -0600, Eric Blake wrote: On 07/18/2011 04:11 AM, Osier Yang wrote: 于 2011年07月18日 10:07, zhang xintao 写道: Dear All I try to migration a kvm guest os to another host failed server: ubuntu 11.04 server virsh:migrate --live --tunnelled vm1

[libvirt] [PATCH v2] util: avoid fds leak when virEventPollAddHandle fail

2011-07-19 Thread ajia
* src/util/event_poll.c: only fix file descriptors leak on when virEventPollAddHandle fail on virEventPollInit function. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor 5: ==1254==at 0x30736D9D47: pipe2 (syscall-template.S:82)

Re: [libvirt] [PATCH v2] util: avoid fds leak when virEventPollAddHandle fail

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 05:34:28PM +0800, a...@redhat.com wrote: * src/util/event_poll.c: only fix file descriptors leak on when virEventPollAddHandle fail on virEventPollInit function. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Daniel Veillard
On Tue, Jul 19, 2011 at 11:00:21AM +0200, Matthias Bolte wrote: 2011/7/19 a...@redhat.com: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at exit. ==1254== Open file descriptor 5: ==1254==

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Matthias Bolte
2011/7/19 Daniel Veillard veill...@redhat.com: On Tue, Jul 19, 2011 at 11:00:21AM +0200, Matthias Bolte wrote: 2011/7/19  a...@redhat.com: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected in valgrind run: ==1254== ==1254== FILE DESCRIPTORS: 6 open at

[libvirt] [PATCH v3] util: avoid fds leak when virEventPollAddHandle fail

2011-07-19 Thread ajia
* src/util/event_poll.c: avoid file descriptors leak when virEventPollAddHandle fail on virEventPollInit function. --- src/util/event_poll.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/util/event_poll.c b/src/util/event_poll.c index 285ba50..e2ae3a6 100644

Re: [libvirt] [PATCH] util: avoid fds leak on virEventPollInit

2011-07-19 Thread Daniel Veillard
On Tue, Jul 19, 2011 at 12:19:34PM +0200, Matthias Bolte wrote: 2011/7/19 Daniel Veillard veill...@redhat.com: On Tue, Jul 19, 2011 at 11:00:21AM +0200, Matthias Bolte wrote: 2011/7/19  a...@redhat.com: * src/util/event_poll.c: fix file descriptors leak on virEventPollInit. Detected

Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag

2011-07-19 Thread Eric Blake
On 07/19/2011 03:23 AM, Daniel P. Berrange wrote: On Mon, Jul 18, 2011 at 01:11:42PM -0600, Eric Blake wrote: On 07/18/2011 04:11 AM, Osier Yang wrote: 于 2011年07月18日 10:07, zhang xintao 写道: Dear All I try to migration a kvm guest os to another host failed server: ubuntu 11.04 server

[libvirt] [PATCH] Quieten build ensure API build scripts exit with non-zero status

2011-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The current API build scripts will continue and exit with a zero status even if they find problems. This has been the cause of many build problems, or hidden build errors, in the past. Change the scripts so they always exit with a non-zero status for

[libvirt] [PATCH] rpc: Make the dispatch generator handle 'void name(void)' style procedures

2011-07-19 Thread Matthias Bolte
Currently there are no such procedures in the protocol, but programming errors like a missing _args or _ret suffix on the structs in the .x files can create such a situation by accident. Making the generator aware of this avoids bogus errors from the generator such as: Use of uninitialized

Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 06:19:13AM -0600, Eric Blake wrote: On 07/19/2011 03:23 AM, Daniel P. Berrange wrote: On Mon, Jul 18, 2011 at 01:11:42PM -0600, Eric Blake wrote: On 07/18/2011 04:11 AM, Osier Yang wrote: 于 2011年07月18日 10:07, zhang xintao 写道: Dear All I try to migration a kvm guest os

Re: [libvirt] [PATCH] Quieten build ensure API build scripts exit with non-zero status

2011-07-19 Thread Matthias Bolte
2011/7/19 Daniel P. Berrange berra...@redhat.com: From: Daniel P. Berrange berra...@redhat.com The current API build scripts will continue and exit with a zero status even if they find problems. This has been the cause of many build problems, or hidden build errors, in the past. Change the

Re: [libvirt] [PATCH] rpc: Make the dispatch generator handle 'void name(void)' style procedures

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 02:22:10PM +0200, Matthias Bolte wrote: Currently there are no such procedures in the protocol, but programming errors like a missing _args or _ret suffix on the structs in the .x files can create such a situation by accident. Making the generator aware of this avoids

[libvirt] [PATCH] tests: Fix virshtest failure after dominfo changed

2011-07-19 Thread Osier Yang
Caused by the new changed dominfo command. Pushed under trival rule. --- tests/virshtest.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/virshtest.c b/tests/virshtest.c index 0932efd..e22e582 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -22,6 +22,7 @@

Re: [libvirt] [PATCH] Quieten build ensure API build scripts exit with non-zero status

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 02:29:04PM +0200, Matthias Bolte wrote: 2011/7/19 Daniel P. Berrange berra...@redhat.com: From: Daniel P. Berrange berra...@redhat.com The current API build scripts will continue and exit with a zero status even if they find problems. This has been the cause of

Re: [libvirt] [PATCH v3 4/6] qemu: Implement period and quota tunable XML configuration and parsing

2011-07-19 Thread Adam Litke
On 07/18/2011 07:46 PM, Wen Congyang wrote: At 07/19/2011 04:35 AM, Adam Litke Write: This is looking good to me. I am pleased to see that the global case is handled as expected when per-vcpu threads are not active. On 07/18/2011 04:42 AM, Wen Congyang wrote: snip +int

Re: [libvirt] [PATCH] Quieten build ensure API build scripts exit with non-zero status

2011-07-19 Thread Eric Blake
On 07/19/2011 06:20 AM, Daniel P. Berrange wrote: * docs/Makefile.am: Use $(AM_V_GEN) for API/HTML scripts * docs/apibuild.py, python/generator.py: Exit with non-zero status if problems are found. Also be silent, not outputting any debug messages. * src/Makefile.am: Use $(AM_V_GEN) for ESX

Re: [libvirt] [libvirt-users] cannot perform tunnelled migration without using peer2peer flag

2011-07-19 Thread Eric Blake
On 07/19/2011 06:23 AM, Daniel P. Berrange wrote: Basically, virsh shouldn't make any assumptions based on the current way things are implemented in libvirtd, since it cannot expect to be running against a matching version. Old virsh should work against new libvirtd, and vica-verca. This is the

[libvirt] [PATCH 0/4] Some RPC event handler ref counting fixes

2011-07-19 Thread Daniel P. Berrange
Wen previously posted a report of a crash with migration. I could not reproduce it at the time, but since then someone else did and pointed out that it only occurs when TLS is in use https://www.redhat.com/archives/libvir-list/2011-July/msg00547.html This series of patches make the event handler

[libvirt] [PATCH 3/4] Use a virFreeCallback on virNetSocket to ensure safe release

2011-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When unregistering an I/O callback from a virNetSocket object, there is still a chance that an event may come in on the callback. In this case it is possible that the virNetSocket might have been freed already. Make use of a virFreeCallback when

[libvirt] [PATCH 1/4] Add mutex locking and reference counting to virNetSocket

2011-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Remove the need for a virNetSocket object to be protected by locks from the object using it, by introducing its own native locking and reference counting * src/rpc/virnetsocket.c: Add locking reference counting --- src/rpc/virnetsocket.c | 147

[libvirt] [PATCH 2/4] Add some debugging for virNetClient reference counting

2011-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com * src/rpc/virnetclient.c: Add debugging of ref counts --- src/rpc/virnetclient.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 9eaecfc..4a9eabc 100644 ---

[libvirt] [PATCH 4/4] Add an explicit virNetClientClose method

2011-07-19 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Since the I/O callback registered against virNetSocket will hold a reference on the virNetClient, we can't rely on the virNetClientFree to be able to close the network connection. The last reference will only go away when the event callback fires

Re: [libvirt] [PATCH] Quieten build ensure API build scripts exit with non-zero status

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 07:13:46AM -0600, Eric Blake wrote: On 07/19/2011 06:20 AM, Daniel P. Berrange wrote: * docs/Makefile.am: Use $(AM_V_GEN) for API/HTML scripts * docs/apibuild.py, python/generator.py: Exit with non-zero status if problems are found. Also be silent, not outputting any

Re: [libvirt] [PATCH v2] util: avoid fds leak when virEventPollAddHandle fail

2011-07-19 Thread Eric Blake
On 07/19/2011 03:54 AM, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 05:34:28PM +0800, a...@redhat.com wrote: * src/util/event_poll.c: only fix file descriptors leak on when virEventPollAddHandle fail on virEventPollInit function. @@ -657,6 +658,8 @@ int virEventPollInit(void)

Re: [libvirt] [PATCH v3 4/6] qemu: Implement period and quota tunable XML configuration and parsing

2011-07-19 Thread Adam Litke
On 07/18/2011 07:51 PM, Wen Congyang wrote: At 07/19/2011 04:59 AM, Adam Litke Write: On 07/18/2011 04:42 AM, Wen Congyang wrote: +int qemuSetupCgroupForVcpu(struct qemud_driver *driver, virDomainObjPtr vm) +{ +virCgroupPtr cgroup = NULL; +virCgroupPtr cgroup_vcpu = NULL; +

Re: [libvirt] [PATCH] Quieten build ensure API build scripts exit with non-zero status

2011-07-19 Thread Eric Blake
On 07/19/2011 07:23 AM, Daniel P. Berrange wrote: - $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml ; fi - -@if test -x $(XMLLINT) test -x $(XMLCATALOG) ; then \ + $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml ; fi ; \ + if test -x $(XMLLINT) test -x $(XMLCATALOG)

Re: [libvirt] [PATCH 1/4] Add mutex locking and reference counting to virNetSocket

2011-07-19 Thread Eric Blake
On 07/19/2011 07:22 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Remove the need for a virNetSocket object to be protected by locks from the object using it, by introducing its own native locking and reference counting * src/rpc/virnetsocket.c: Add locking

[libvirt] [PATCH 1/2] Add some basic sanity checking of certificates before use

2011-07-19 Thread Daniel P. Berrange
If the libvirt daemon or libvirt client is configured with bogus certificates, it is very unhelpful to only find out about this when a TLS connection is actually attempted. Not least because the error messages you get back for failures are incredibly obscure. This adds some basic sanity checking

[libvirt] [PATCH 2/2] Add sanity checking of basic constraints, key purpose key usage

2011-07-19 Thread Daniel P. Berrange
Gnutls requires that certificates have basic constraints present to be used as a CA certificate. OpenSSL doesn't add this data by default, so add a sanity check to catch this situation. Also validate that the key usage and key purpose constraints contain correct data * src/rpc/virnettlscontext.c:

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-19 Thread Eric Blake
[adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen wrote: On 07/19/11 15:58, Eric Blake wrote: On 07/19/2011 07:27 AM, Jes Sorensen wrote: Eric, what happens if libvirt in an selinux environment tells QEMU to launch using an image file that is backed by backing file(s)? Before

Re: [libvirt] [PATCH 2/4] Add some debugging for virNetClient reference counting

2011-07-19 Thread Eric Blake
On 07/19/2011 07:22 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com * src/rpc/virnetclient.c: Add debugging of ref counts --- src/rpc/virnetclient.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) ACK. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH 3/4] Use a virFreeCallback on virNetSocket to ensure safe release

2011-07-19 Thread Eric Blake
On 07/19/2011 07:22 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com When unregistering an I/O callback from a virNetSocket object, there is still a chance that an event may come in on the callback. In this case it is possible that the virNetSocket might have been freed

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-19 Thread Jes Sorensen
On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen wrote: Urgh, libvirt parsing image files is really unfortunate, it really doesn't give me warm fuzzy feelings :( libvirt really should not know about internals of image formats. But even if

Re: [libvirt] [PATCH 4/4] Add an explicit virNetClientClose method

2011-07-19 Thread Eric Blake
On 07/19/2011 07:22 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Since the I/O callback registered against virNetSocket will hold a reference on the virNetClient, we can't rely on the virNetClientFree to be able to close the network connection. The last reference

Re: [libvirt] RFC (V2) New virDomainBlockPull API family to libvirt

2011-07-19 Thread Daniel Veillard
On Fri, Jul 15, 2011 at 10:18:39AM -0500, Adam Litke wrote: In light of discussion on V1 of this API, here is V2 of the next generation BlockPull API. In this series we make the abort and info operations more generic so that they may apply to future block jobs (such as compression, live

Re: [libvirt] [virt-tools-list] [PATCH virt-manager v4] Add inspection to virt-manager

2011-07-19 Thread Richard W.M. Jones
On Tue, Jul 19, 2011 at 10:46:49AM -0400, Cole Robinson wrote: Maybe we can cache the png data per detected OS value rather than per VM? Not sure if that collides with licensing issues, but would likely mean storing less data on disk. You can't do that without getting into trademark issues.

[libvirt] [PATCH] Fix reporting of errors for p2p migration

2011-07-19 Thread Daniel P. Berrange
Starting/ending jobs when closing the connection may reset any error which was reported earlier in p2p migration. We must save the original error before doing so. This means we can also just call virConnectClose as normal, instead of virUnrefConnect * src/qemu/qemu_migration.c: Preserve errors in

[libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-19 Thread Michal Privoznik
DMI is Intel Intel-compatible specific. Don't try to dump information on non-compatible architectures, which results only in error message in logs. --- NB: libsmbios is exclusively for x86_64 ia64 %{ix86} src/node_device/node_device_udev.c |5 + 1 files changed, 5 insertions(+), 0

Re: [libvirt] [virt-tools-list] [PATCH virt-manager v4] Add inspection to virt-manager

2011-07-19 Thread Eric Blake
On 07/19/2011 08:47 AM, Richard W.M. Jones wrote: On Tue, Jul 19, 2011 at 10:46:49AM -0400, Cole Robinson wrote: Maybe we can cache the png data per detected OS value rather than per VM? Not sure if that collides with licensing issues, but would likely mean storing less data on disk. You

Re: [libvirt] [PATCH] Fix reporting of errors for p2p migration

2011-07-19 Thread Eric Blake
On 07/19/2011 08:52 AM, Daniel P. Berrange wrote: Starting/ending jobs when closing the connection may reset any error which was reported earlier in p2p migration. We must save the original error before doing so. This means we can also just call virConnectClose as normal, instead of

Re: [libvirt] [PATCH 1/4 V4] util: Add keymaps.csv

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 11:32:15AM +0800, Lai Jiangshan wrote: From: Daniel P. Berrange berra...@redhat.com Should keep it as the same as: http://git.gnome.org/browse/gtk-vnc/commit/src/keymaps.csv All master keymaps are defined in a CSV file. THis covers Linux keycodes, OSX keycodes, AT

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-19 Thread Eric Blake
On 07/19/2011 08:52 AM, Michal Privoznik wrote: DMI is Intel Intel-compatible specific. Don't try to dump information on non-compatible architectures, which results only in error message in logs. --- NB: libsmbios is exclusively for x86_64 ia64 %{ix86} src/node_device/node_device_udev.c |

Re: [libvirt] [PATCH 3/4 V4] send-key: Expose the new API in virsh

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 11:32:17AM +0800, Lai Jiangshan wrote: Also support string names for the linux keycode(auto detect). Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Acked-by: Daniel P. Berrange berra...@redhat.com --- tools/virsh.c | 94

Re: [libvirt] [PATCH 2/4 V4] util: add virtkey

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 11:32:16AM +0800, Lai Jiangshan wrote: Add virtkey lib for usage-improvment and keycode translating. Add 4 internal API for the aim const char *virKeycodeSetTypeToString(int codeset); int virKeycodeSetTypeFromString(const char *name); int

Re: [libvirt] [PATCH 4/4 V4] qemu:send-key: Implement the driver methods

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 11:32:18AM +0800, Lai Jiangshan wrote: qemu driver just accept xt_kbd codeset's keycode, so the lib virtkey is used for translating keycodes from other codesets. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 71

Re: [libvirt] [virt-tools-list] [PATCH virt-manager v4] Add inspection to virt-manager

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 08:54:59AM -0600, Eric Blake wrote: On 07/19/2011 08:47 AM, Richard W.M. Jones wrote: On Tue, Jul 19, 2011 at 10:46:49AM -0400, Cole Robinson wrote: Maybe we can cache the png data per detected OS value rather than per VM? Not sure if that collides with licensing

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-19 Thread Michal Privoznik
On 19.07.2011 17:01, Eric Blake wrote: On 07/19/2011 08:52 AM, Michal Privoznik wrote: DMI is Intel Intel-compatible specific. Don't try to dump information on non-compatible architectures, which results only in error message in logs. --- NB: libsmbios is exclusively for x86_64 ia64 %{ix86}

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-19 Thread Stefan Hajnoczi
On Tue, Jul 19, 2011 at 3:30 PM, Jes Sorensen jes.soren...@redhat.com wrote: On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen wrote: Urgh, libvirt parsing image files is really unfortunate, it really doesn't give me warm fuzzy feelings :(

Re: [libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

2011-07-19 Thread Eric Blake
On 07/19/2011 09:12 AM, Michal Privoznik wrote: On 19.07.2011 17:01, Eric Blake wrote: On 07/19/2011 08:52 AM, Michal Privoznik wrote: DMI is Intel Intel-compatible specific. Don't try to dump information on non-compatible architectures, which results only in error message in logs. --- NB:

[libvirt] [PATCH v4 2/6] undefine: Wire up the remote protocol

2011-07-19 Thread Osier Yang
--- src/remote/remote_driver.c |3 ++- src/remote/remote_protocol.x |9 - src/remote_protocol-structs |5 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index c2f8bbd..db60089 100644 ---

[libvirt] [PATCH v4 4/6] undefine: Implement internal API for libxl driver

2011-07-19 Thread Osier Yang
* src/libxl/libxl_driver.c: New callback for libxl_driver, new function libxlDomainUndefineFlags, and changes libxlDomainUndefine as a wrapper of libxlDomainUndefineFlags. --- src/libxl/libxl_driver.c | 33 - 1 files changed, 32 insertions(+), 1 deletions(-)

[libvirt] [PATCH v4 1/6] undefine: Define the new API

2011-07-19 Thread Osier Yang
This introduces a new API virDomainUndefineFlags to control the domain undefine process, as the existing API virDomainUndefine doesn't support flags. Currently only flag VIR_DOMAIN_UNDEFINE_MANAGED_SAVE is supported. If the domain has a managed save image, including

[libvirt] [PATCH v4 5/6] undefine: Implement undefineFlags for all other drivers

2011-07-19 Thread Osier Yang
--- src/esx/esx_driver.c | 11 ++- src/lxc/lxc_driver.c | 11 ++- src/openvz/openvz_driver.c | 11 ++- src/test/test_driver.c | 12 +++- src/uml/uml_driver.c | 12 +++- src/vmware/vmware_driver.c | 12 +++-

[libvirt] [PATCH v4 3/6] undefine: Implement internal API for qemu driver

2011-07-19 Thread Osier Yang
* src/qemu/qemu_driver.c: New call back for qemu_driver, New function qemudDomainUndefineFlags, and changes on qemudDomainUndefine. --- src/qemu/qemu_driver.c | 36 +++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v4 6/6] undefine: Extend virsh undefine to support the new flag

2011-07-19 Thread Osier Yang
If the domain has managed save image, and --managed-save is not specified, then it fails with an error telling the user that a managed save image still exists. If the domain has managed save image, and --managed-save is specified, it invokes virDomainUndefineFlags. If virDomainUndefineFlags

Re: [libvirt] [PATCH v4 1/6] undefine: Define the new API

2011-07-19 Thread Eric Blake
On 07/19/2011 09:57 AM, Osier Yang wrote: This introduces a new API virDomainUndefineFlags to control the domain undefine process, as the existing API virDomainUndefine doesn't support flags. Currently only flag VIR_DOMAIN_UNDEFINE_MANAGED_SAVE is supported. If the domain has a managed save

Re: [libvirt] [PATCH v4 2/6] undefine: Wire up the remote protocol

2011-07-19 Thread Eric Blake
On 07/19/2011 09:57 AM, Osier Yang wrote: --- src/remote/remote_driver.c |3 ++- src/remote/remote_protocol.x |9 - src/remote_protocol-structs |5 + 3 files changed, 15 insertions(+), 2 deletions(-) ACK. -- Eric Blake ebl...@redhat.com+1-801-349-2682

Re: [libvirt] [PATCH v4 3/6] undefine: Implement internal API for qemu driver

2011-07-19 Thread Eric Blake
On 07/19/2011 09:57 AM, Osier Yang wrote: * src/qemu/qemu_driver.c: New call back for qemu_driver, New function qemudDomainUndefineFlags, and changes on qemudDomainUndefine. --- src/qemu/qemu_driver.c | 36 +++- 1 files changed, 35 insertions(+), 1

Re: [libvirt] mingw: test-poll pipe part fails

2011-07-19 Thread Daniel P. Berrange
On Thu, Jun 30, 2011 at 11:56:15AM -0600, Eric Blake wrote: [adding libvirt] On 06/04/2011 12:24 AM, Paolo Bonzini wrote: On Sat, Jun 4, 2011 at 00:37, Matthias Bolte matthias.bo...@googlemail.com wrote: After testing a while and reading MSDN docs the problem seems to be that

Re: [libvirt] mingw: test-poll pipe part fails

2011-07-19 Thread Eric Blake
On 07/19/2011 09:30 AM, Daniel P. Berrange wrote: I'm wondering if the problem here is that libvirt is trying to use the pipe-to-self mechanism as a fundamental event loop idiom. That is, the reason libvirt is calling poll is in order to minimize CPU until something interesting happens, where

Re: [libvirt] [PATCH 4/4] Add an explicit virNetClientClose method

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 08:36:33AM -0600, Eric Blake wrote: On 07/19/2011 07:22 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Since the I/O callback registered against virNetSocket will hold a reference on the virNetClient, we can't rely on the virNetClientFree

Re: [libvirt] [PATCH 1/2] Add some basic sanity checking of certificates before use

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 08:40:50AM -0600, Eric Blake wrote: On 07/19/2011 07:55 AM, Daniel P. Berrange wrote: If the libvirt daemon or libvirt client is configured with bogus certificates, it is very unhelpful to only find out about this when a TLS connection is actually attempted. Not least

Re: [libvirt] [PATCH v4 4/6] undefine: Implement internal API for libxl driver

2011-07-19 Thread Eric Blake
On 07/19/2011 09:57 AM, Osier Yang wrote: * src/libxl/libxl_driver.c: New callback for libxl_driver, new function libxlDomainUndefineFlags, and changes libxlDomainUndefine as a wrapper of libxlDomainUndefineFlags. --- src/libxl/libxl_driver.c | 33 - 1 files

Re: [libvirt] [PATCH v4 5/6] undefine: Implement undefineFlags for all other drivers

2011-07-19 Thread Eric Blake
On 07/19/2011 09:57 AM, Osier Yang wrote: --- src/esx/esx_driver.c | 11 ++- src/lxc/lxc_driver.c | 11 ++- src/openvz/openvz_driver.c | 11 ++- src/test/test_driver.c | 12 +++- src/uml/uml_driver.c | 12 +++-

Re: [libvirt] mingw: test-poll pipe part fails

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 09:31:59AM -0600, Eric Blake wrote: On 07/19/2011 09:30 AM, Daniel P. Berrange wrote: I'm wondering if the problem here is that libvirt is trying to use the pipe-to-self mechanism as a fundamental event loop idiom. That is, the reason libvirt is calling poll is in

Re: [libvirt] [PATCH v4 6/6] undefine: Extend virsh undefine to support the new flag

2011-07-19 Thread Eric Blake
On 07/19/2011 09:57 AM, Osier Yang wrote: If the domain has managed save image, and --managed-save is not specified, then it fails with an error telling the user that a managed save image still exists. If the domain has managed save image, and --managed-save is specified, it invokes

Re: [libvirt] [PATCH 7/8] save: add virDirectFd wrapper type

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:34:46AM -0600, Eric Blake wrote: On 07/14/2011 08:24 AM, Eric Blake wrote: O_DIRECT has stringent requirements - I/O must occur with buffers that have both alignment and size as multiples of the file system block size (used to be 512 bytes, but these days, 4k is

Re: [libvirt] [PATCH 7/8] save: add virDirectFd wrapper type

2011-07-19 Thread Eric Blake
On 07/19/2011 10:06 AM, Daniel P. Berrange wrote: The motivation for using O_DIRECT is that allowing pollution of the host cache causes stability problems for the host as a whole. As such IMHO, apps would likely want an error back if O_DIRECT cannot be supported, NB, even some Linux

Re: [libvirt] [PATCH 1/8] save: document new public API

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:24:28AM -0600, Eric Blake wrote: In order to choose whether to use O_DIRECT when saving a domain image to a file, we need a new flag. But virDomainSave was implemented before our policy of all new APIs having a flag argument. * include/libvirt/libvirt.h.in

Re: [libvirt] [PATCH 2/8] save: wire up remote protocol

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:24:29AM -0600, Eric Blake wrote: * src/remote/remote_driver.c (remote_driver): Add new callback. * src/remote/remote_protocol.x (remote_procedure): New RPC. (remote_domain_save_flags_args): New struct. * src/remote_protocol-structs: Update. ---

Re: [libvirt] [PATCH 3/8] save: wire up trivial saveFlags implementations

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:24:30AM -0600, Eric Blake wrote: For all hypervisors that support save, the new API now performs the same functions as the old. * src/libxl/libxl_driver.c (libxlDomainSave): Move guts... (libxlDomainSaveFlags): ...to new function. * src/test/test_driver.c

[libvirt] enumerating disk devices

2011-07-19 Thread Serge E. Hallyn
Hi, Some people appear to have autostart VMs residing on slow storage. If libvirtd starts too early, it'll simply fail trying to start those VMs. It'd be nice to know when all the storage on which autostart containers depend becomes available, so as to safely start libvirt. The python script

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-19 Thread Anthony Liguori
On 07/19/2011 09:30 AM, Jes Sorensen wrote: On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen wrote: Urgh, libvirt parsing image files is really unfortunate, it really doesn't give me warm fuzzy feelings :( libvirt really should not know about

Re: [libvirt] [PATCH 4/8] save: add --direct flag to virsh save operations

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:24:31AM -0600, Eric Blake wrote: Wire up the new flag to virsh. Also, the 'dump' command had undocumented flags. * tools/virsh.c (cmdSave, cmdManagedSave, cmdDump): Add new flag. * tools/virsh.pod (save, managedsave, dump): Document flags. --- tools/virsh.c |

Re: [libvirt] [PATCH 1/8] save: document new public API

2011-07-19 Thread Eric Blake
On 07/19/2011 10:10 AM, Daniel P. Berrange wrote: On Thu, Jul 14, 2011 at 08:24:28AM -0600, Eric Blake wrote: In order to choose whether to use O_DIRECT when saving a domain image to a file, we need a new flag. But virDomainSave was implemented before our policy of all new APIs having a flag

Re: [libvirt] [PATCH 5/8] save: let iohelper handle inherited fd

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:24:32AM -0600, Eric Blake wrote: Rather than making the iohelper subject to a race in reopening the file, it is nicer to pass an already-open fd by inheritance. The old synopsis form must continue to work - if someone updates their libvirt package and installs a

Re: [libvirt] [PATCH 6/8] save: let iohelper work on O_DIRECT fds

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:24:33AM -0600, Eric Blake wrote: Required for a coming patch where iohelper will operate on O_DIRECT fds. There, the user-space memory must be aligned to file system boundaries (at least page-aligned works best, and some file systems prefer 64k). Made tougher by

Re: [libvirt] [PATCH 7/8] save: add virDirectFd wrapper type

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:08:21AM -0600, Eric Blake wrote: On 07/19/2011 10:06 AM, Daniel P. Berrange wrote: The motivation for using O_DIRECT is that allowing pollution of the host cache causes stability problems for the host as a whole. As such IMHO, apps would likely want an error back

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 04:14:27PM +0100, Stefan Hajnoczi wrote: On Tue, Jul 19, 2011 at 3:30 PM, Jes Sorensen jes.soren...@redhat.com wrote: On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen wrote: Urgh, libvirt parsing image files is

Re: [libvirt] [Qemu-devel] live snapshot wiki updated

2011-07-19 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 04:30:19PM +0200, Jes Sorensen wrote: On 07/19/11 16:24, Eric Blake wrote: [adding the libvir-list] On 07/19/2011 08:09 AM, Jes Sorensen wrote: Urgh, libvirt parsing image files is really unfortunate, it really doesn't give me warm fuzzy feelings :( libvirt really

Re: [libvirt] mingw: test-poll pipe part fails

2011-07-19 Thread Bastien ROUCARIES
I have some code if you want that work. If you could test, I wil lsend you. I have no time to create m4 and proper gnulib integration. It is up to you Bastien On Tue, Jul 19, 2011 at 5:44 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Jul 19, 2011 at 09:31:59AM -0600, Eric Blake

Re: [libvirt] mingw: test-poll pipe part fails

2011-07-19 Thread Bastien ROUCARIES
n Tue, Jul 19, 2011 at 6:54 PM, Bastien ROUCARIES roucaries.bast...@gmail.com wrote: I have some code if you want that work. If you could test, I wil lsend you. I have no time to create m4 and proper gnulib integration. It is up to you Please test, I do not even have compiled it. Bastien

Re: [libvirt] [PATCH 7/8] save: add virDirectFd wrapper type

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:24:34AM -0600, Eric Blake wrote: O_DIRECT has stringent requirements - I/O must occur with buffers that have both alignment and size as multiples of the file system block size (used to be 512 bytes, but these days, 4k is safer, and 64k allows for better throughput).

Re: [libvirt] [PATCH 7/8] save: add virDirectFd wrapper type

2011-07-19 Thread Eric Blake
On 07/19/2011 11:45 AM, Daniel P. Berrange wrote: On Thu, Jul 14, 2011 at 08:24:34AM -0600, Eric Blake wrote: O_DIRECT has stringent requirements - I/O must occur with buffers that have both alignment and size as multiples of the file system block size (used to be 512 bytes, but these days, 4k

Re: [libvirt] [PATCH 13/8] save: wire up trivial restoreFlags implementations

2011-07-19 Thread Daniel P. Berrange
On Fri, Jul 15, 2011 at 08:05:02PM -0600, Eric Blake wrote: For all hypervisors that support restore, the new API now performs the same functions as the old. * src/libxl/libxl_driver.c (libxlDomainRestore): Move guts... (libxlDomainRestoreFlags): ...to new function. * src/qemu/qemu_driver.c

Re: [libvirt] [PATCH 11/8] save: document new public API

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 07:02:23PM -0600, Eric Blake wrote: * include/libvirt/libvirt.h.in (virDomainCreateFlags): Add a flag. (virDomainRestoreFlags): New prototype. * src/libvirt.c (virDomainRestoreFlags): New function. * src/libvirt_public.syms: Export it. * src/driver.h

Re: [libvirt] [PATCH 14/8] save: add --direct flag to virsh restore operations

2011-07-19 Thread Daniel P. Berrange
On Fri, Jul 15, 2011 at 08:42:44PM -0600, Eric Blake wrote: * tools/virsh.c (cmdStart, cmdRestore): Add new flag. * tools/virsh.pod (start, restore): Document flags. --- Counterpart to 4/8 tools/virsh.c |9 - tools/virsh.pod | 10 -- 2 files changed, 16

Re: [libvirt] [PATCH 12/8] save: wire up remote protocol

2011-07-19 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 07:03:46PM -0600, Eric Blake wrote: * src/remote/remote_driver.c (remote_driver): Add new callback. * src/remote/remote_protocol.x (remote_procdure): New RPC. (remote_domain_restore_flags_args): New struct. * src/remote_protocol-structs: Update. --- Again, I'm

Re: [libvirt] [PATCH 15/8] save: add more iohelper support for O_DIRECT

2011-07-19 Thread Daniel P. Berrange
On Fri, Jul 15, 2011 at 08:48:18PM -0600, Eric Blake wrote: Constraining the problem makes the solution easier to think about. * src/util/iohelper.c (runIO): Make read support easy. --- Could be squashed into 6/8. src/util/iohelper.c |9 - 1 files changed, 8 insertions(+),

Re: [libvirt] [PATCH 16/8] save: support O_DIRECT during qemu restore

2011-07-19 Thread Daniel P. Berrange
On Sat, Jul 16, 2011 at 05:09:06PM -0600, Eric Blake wrote: Wire up the restore direction to use iohelper for O_DIRECT. * src/qemu/qemu_driver.c (qemuddDomainObjStart) (qemuDomainSaveImageOpen, qemuDomainObjRestore) (qemuDomainObjStart): Add parameter. (qemudDomainStartWithFlags,

Re: [libvirt] [PATCH 17/8] save: support direct autostart in qemu.conf

2011-07-19 Thread Daniel P. Berrange
On Mon, Jul 18, 2011 at 09:45:34AM -0600, Eric Blake wrote: When auto-starting a domain on libvirtd startup, let the user configure whether to have the VIR_DOMAIN_START_DIRECT flag effect. * src/qemu/qemu.conf (auto_start_direct): Document new variable. * src/qemu/libvirtd_qemu.aug

[libvirt] [PATCH] remote/ssh: optional keyfile parameter.

2011-07-19 Thread Oskari Saarenmaa
New optional parameter keyfile for ssh transport allows the user to select the private key to be used to authenticate to the remote host. --- docs/remote.html.in| 16 src/remote/remote_driver.c |9 - src/rpc/virnetclient.c |4 +++-

  1   2   >