Re: [libvirt] [PATCH RESEND RFC v4 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-21 Thread Wen Congyang
At 07/21/2011 12:34 PM, Daniel Veillard Write: On Thu, Jul 21, 2011 at 10:11:32AM +0800, Wen Congyang wrote: --- src/qemu/qemu_driver.c | 312 1 files changed, 287 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-07-21 Thread Michal Privoznik
On 21.07.2011 05:15, Taku Izumi wrote: On Thu, 21 Jul 2011 10:52:32 +0800 Osier Yangjy...@redhat.com wrote: 于 2011年07月21日 09:35, Taku Izumi 写道: On Wed, 20 Jul 2011 10:17:14 +0200 Michal Privoznikmpriv...@redhat.com wrote: That's strange. Works for me. Can you please run: cd tests;

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-07-21 Thread Laine Stump
On 07/20/2011 09:35 PM, Taku Izumi wrote: On Wed, 20 Jul 2011 10:17:14 +0200 Michal Privoznikmpriv...@redhat.com wrote: That's strange. Works for me. Can you please run: cd tests; VIR_TEST_DEBUG=1 ./domainschematest or ./networkschematest It should help me to trace error. Btw: I suppose

Re: [libvirt] [PATCH 4/7] bandwidth: Create format functions

2011-07-21 Thread Laine Stump
On 07/18/2011 04:05 PM, Michal Privoznik wrote: --- src/conf/domain_conf.c |3 ++ src/conf/network_conf.c |3 ++ src/libvirt_private.syms |1 + src/util/network.c | 72 ++ src/util/network.h |4 ++ 5 files

Re: [libvirt] [PATCHv2 5/9] conf: support abstracted interface info in network XML

2011-07-21 Thread Daniel Veillard
On Wed, Jul 20, 2011 at 02:21:55AM -0400, Laine Stump wrote: The network XML is updated in the following ways: [...] diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng index 6d9f06b..1adb553 100644 --- a/docs/schemas/network.rng +++ b/docs/schemas/network.rng @@ -7,6 +7,7 @@

Re: [libvirt] [PATCH 5/7] bandwitdh: Implement functions to enable and disable QoS

2011-07-21 Thread Laine Stump
On 07/18/2011 04:05 PM, Michal Privoznik wrote: These function executes 'tc' with appropriate arguments to set desired QoS setting on interface or bridge during its creation. --- configure.ac|4 + src/libvirt_private.syms|2 + src/network/bridge_driver.c | 12

Re: [libvirt] [PATCH 6/7] bandwidth: Add test cases for network

2011-07-21 Thread Laine Stump
On 07/18/2011 04:05 PM, Michal Privoznik wrote: --- tests/networkxml2xmlin/bandwidth-network.xml | 16 tests/networkxml2xmlout/bandwidth-network.xml | 16 tests/networkxml2xmltest.c|1 + 3 files changed, 33 insertions(+), 0

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-07-21 Thread Laine Stump
On 07/21/2011 02:18 AM, Michal Privoznik wrote: This is the patch that will solve your problem: diff --git a/docs/schemas/Makefile.am b/docs/schemas/Makefile.am index 5ef7737..a08fb43 100644 --- a/docs/schemas/Makefile.am +++ b/docs/schemas/Makefile.am @@ -2,6 +2,7 @@ schemadir =

Re: [libvirt] [PATCHv2 5/9] conf: support abstracted interface info in network XML

2011-07-21 Thread Laine Stump
On 07/21/2011 02:44 AM, Daniel Veillard wrote: On Wed, Jul 20, 2011 at 02:21:55AM -0400, Laine Stump wrote: The network XML is updated in the following ways: [...] diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng index 6d9f06b..1adb553 100644 --- a/docs/schemas/network.rng +++

Re: [libvirt] [PATCH 7/7] bandwidth: Add domain schema test suite

2011-07-21 Thread Laine Stump
On 07/18/2011 04:05 PM, Michal Privoznik wrote: --- tests/domainschemadata/domain-bandwidth.xml | 72 +++ 1 files changed, 72 insertions(+), 0 deletions(-) create mode 100644 tests/domainschemadata/domain-bandwidth.xml Same comment applies as for 6/7 - this can

Re: [libvirt] [PATCH 0/4 V5] Add support for send keys to guest

2011-07-21 Thread Daniel Veillard
On Thu, Jul 21, 2011 at 11:26:57AM +0800, Lai Jiangshan wrote: Add virtkey lib for usage-improvment and keycode translating. Expose send-key in virsh Implement send-key function for the qemu driver Daniel P. Berrange (1): util: Add keymaps.csv Lai Jiangshan (3): util: add virtkey

Re: [libvirt] [PATCHv2 5/9] conf: support abstracted interface info in network XML

2011-07-21 Thread Daniel Veillard
On Thu, Jul 21, 2011 at 03:14:30AM -0400, Laine Stump wrote: On 07/21/2011 02:44 AM, Daniel Veillard wrote: On Wed, Jul 20, 2011 at 02:21:55AM -0400, Laine Stump wrote: The network XML is updated in the following ways: [...] diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng

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

2011-07-21 Thread Jes Sorensen
On 07/20/11 15:46, Eric Blake wrote: On 07/20/2011 07:25 AM, Jes Sorensen wrote: I think if libvirt wants qemu to use an fd instead of a file name, it shouldn't pass a file name but an fd in the first place. Which means that the two that we need are support for an fd: protocol (patches on the

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

2011-07-21 Thread Jes Sorensen
On 07/20/11 19:47, Eric Blake wrote: On 07/20/2011 11:27 AM, Blue Swirl wrote: I'd avoid any name based access in this case. If QEMU has write access to main file, it could forge the backing file name in main file to point to for example /etc/shadow and then request libvirt to perform the

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

2011-07-21 Thread Jes Sorensen
On 07/20/11 21:51, Blue Swirl wrote: And the snapshot_blkdev monitor command is a case where qemu needs to create a new qcow2 image on the fly, while referencing the name of an existing file. What backing name do you put in the new qcow2 file unless you already have a name association

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

2011-07-21 Thread Jes Sorensen
On 07/20/11 11:38, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 10:26:49AM +0200, Jes Sorensen wrote: On 07/19/11 18:47, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 04:30:19PM +0200, Jes Sorensen wrote: On 07/19/11 16:24, Eric Blake wrote: Besides, I feel that having a

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

2011-07-21 Thread Kevin Wolf
Am 20.07.2011 19:47, schrieb Eric Blake: We really _do_ need a way to give qemu both an fd and the name of the file that the fd is tied to. On Linux, qemu could use /proc/self/fd to reconstruct the name from fd, but that's not portable to other OS. Is there any reason for qemu to know the

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

2011-07-21 Thread Kevin Wolf
Am 20.07.2011 19:20, schrieb Blue Swirl: On Wed, Jul 20, 2011 at 4:51 PM, Kevin Wolf kw...@redhat.com wrote: Am 20.07.2011 15:25, schrieb Jes Sorensen: On 07/20/11 12:01, Kevin Wolf wrote: Right, we're stuck with the two horros of NFS and selinux, so we need something that gets around the

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

2011-07-21 Thread Kevin Wolf
Am 21.07.2011 10:07, schrieb Jes Sorensen: On 07/20/11 21:51, Blue Swirl wrote: And the snapshot_blkdev monitor command is a case where qemu needs to create a new qcow2 image on the fly, while referencing the name of an existing file. What backing name do you put in the new qcow2 file unless

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

2011-07-21 Thread Jes Sorensen
On 07/20/11 11:36, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 10:23:12AM +0200, Jes Sorensen wrote: Pardon, but I fail to see the issue here. If QEMU passes a filename back to libvirt, libvirt still gets to make the decision whether or not it is legitimate for QEMU to get that file

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

2011-07-21 Thread Jes Sorensen
On 07/20/11 12:28, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 12:15:02PM +0200, Nicolas Sebrecht wrote: Actually, libvirt should not have to worry if the filename provided by QEMU is valid. I think it should trust QEMU. If QEMU doesn't provide information others can trust; it should be

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

2011-07-21 Thread Jes Sorensen
On 07/21/11 10:36, Kevin Wolf wrote: Am 21.07.2011 10:07, schrieb Jes Sorensen: Rather than trying to do this by mangling files on the disk, I would suggest we allow registering a call-back open function, which calls back into libvirt and requests it to open a given file. It can then do all

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

2011-07-21 Thread Jes Sorensen
On 07/21/11 10:18, Kevin Wolf wrote: Am 20.07.2011 19:47, schrieb Eric Blake: We really _do_ need a way to give qemu both an fd and the name of the file that the fd is tied to. On Linux, qemu could use /proc/self/fd to reconstruct the name from fd, but that's not portable to other OS.

Re: [libvirt] [PATCH v2 2/7] bandwidth: Declare internal structures

2011-07-21 Thread Matthias Bolte
2011/7/18 Jiri Denemark jdene...@redhat.com: On Tue, Jul 12, 2011 at 13:57:08 +0200, Michal Privoznik wrote: ---  src/util/network.h |   16  1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/util/network.h b/src/util/network.h index ed0b78c..568bca1 100644

[libvirt] [PATCH ] send-key: Implement Python API

2011-07-21 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/python/libvirt-override.c b/python/libvirt-override.c index b713b6a..1ef5bfa 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -3789,6 +3789,53 @@ libvirt_virStreamSend(PyObject *self ATTRIBUTE_UNUSED,

Re: [libvirt] [PATCH RESEND RFC v4 6/6] doc: Add documentation for new cputune elements period and quota

2011-07-21 Thread Wen Congyang
At 07/21/2011 12:39 PM, Daniel Veillard Write: On Thu, Jul 21, 2011 at 10:12:14AM +0800, Wen Congyang wrote: --- docs/formatdomain.html.in | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index

[libvirt] [PATCH 06/13] destroy: Implement internal API for lxc driver

2011-07-21 Thread Michal Privoznik
--- src/lxc/lxc_driver.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index afac879..7fc9921 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1934,20 +1934,25 @@ static void

[libvirt] [PATCH 00/13] New API: virDominDestroyWithFlags

2011-07-21 Thread Michal Privoznik
This series creates new API which adds flags to virDomainDestroy. As mentioned here many times, it is a bad luck all APIs don't have flags parameter. Parameter for this might be needed to select different ways of destroying a domain. For example, qemu has 'quit' command, which force it to flush

[libvirt] [PATCH 05/13] destroy: Implement internal API for libxl driver

2011-07-21 Thread Michal Privoznik
--- src/libxl/libxl_driver.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index d52a8b6..33d8305 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -1526,13 +1526,16 @@ cleanup: }

[libvirt] [PATCH 04/13] destroy: Implement internal API for ESX driver

2011-07-21 Thread Michal Privoznik
--- src/esx/esx_driver.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 5ed6a38..f98c579 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -1937,7 +1937,8 @@ esxDomainReboot(virDomainPtr domain,

[libvirt] [PATCH 01/13] destroy: Define new public API virDomainDestroyWithFlags

2011-07-21 Thread Michal Privoznik
This introduces new API virDomainDestroyWithFlags to allow domain destroying with flags, as the existing API virDomainDestroy misses flags. The set of flags is defined in virDomainDestroyFlags enum, which is currently commented, because it is empty. Calling this API with no flags set (@flags ==

[libvirt] [PATCH 13/13] destroy: Implement internal API for xenapi driver

2011-07-21 Thread Michal Privoznik
--- src/xenapi/xenapi_driver.c | 22 -- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 97da1d1..75a11e3 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -839,13 +839,19

[libvirt] [PATCH 03/13] destroy: Implement internal API for qemu driver

2011-07-21 Thread Michal Privoznik
--- src/qemu/qemu_driver.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e13b63b..ddadb08 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1556,13 +1556,18 @@ cleanup: } -static

[libvirt] [PATCH 02/13] destroy: Wire up the remote protocol

2011-07-21 Thread Michal Privoznik
--- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x |8 +++- src/remote_protocol-structs |5 + 3 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 82b938c..770d1ee 100644 ---

[libvirt] [PATCH 09/13] destroy: Implement internal API for uml driver

2011-07-21 Thread Michal Privoznik
--- src/uml/uml_driver.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 0d6f71a..7f2ab13 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -1417,12 +1417,17 @@ cleanup: } -static int

[libvirt] [PATCH 07/13] destroy: Implement internal API for openvz driver

2011-07-21 Thread Michal Privoznik
--- src/openvz/openvz_driver.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index d24a5e3..92470d8 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -577,12 +577,16 @@

[libvirt] [PATCH 12/13] destroy: Implement internal API for xen driver

2011-07-21 Thread Michal Privoznik
--- src/xen/xen_driver.c | 28 src/xen/xen_driver.h |1 + src/xen/xen_hypervisor.c | 24 ++-- src/xen/xen_hypervisor.h |3 +++ src/xen/xen_inotify.c|1 + src/xen/xend_internal.c | 24 ++--

[libvirt] [PATCH 08/13] destroy: Implement internal API for phyp driver

2011-07-21 Thread Michal Privoznik
--- src/phyp/phyp_driver.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 2489063..eea229a 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -3497,7 +3497,8 @@

[libvirt] [PATCH 10/13] destroy: Implement internal API for vbox driver

2011-07-21 Thread Michal Privoznik
--- src/vbox/vbox_tmpl.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 53bac79..19fdaef 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -1689,7 +1689,10 @@ cleanup: return ret; }

[libvirt] [PATCH 11/13] destroy: Implement internal API for vmware driver

2011-07-21 Thread Michal Privoznik
--- src/vmware/vmware_driver.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 7cec310..64de663 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -312,12 +312,15 @@

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

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 10:40:48AM +0200, Jes Sorensen wrote: On 07/20/11 12:28, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 12:15:02PM +0200, Nicolas Sebrecht wrote: Actually, libvirt should not have to worry if the filename provided by QEMU is valid. I think it should trust QEMU. If

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

2011-07-21 Thread Jes Sorensen
On 07/21/11 11:34, Daniel P. Berrange wrote: QEMU is *not* yet running at the time libvirt reads the file metadata. Of course it is: hotplug In the case of hotplug, the hotplug monitor commands have not yet been invoked when libvirt access the file metadata, or the drive has already

Re: [libvirt] [PATCH RESEND RFC v4 6/6] doc: Add documentation for new cputune elements period and quota

2011-07-21 Thread Wen Congyang
At 07/21/2011 05:22 PM, Wen Congyang Write: At 07/21/2011 12:39 PM, Daniel Veillard Write: On Thu, Jul 21, 2011 at 10:12:14AM +0800, Wen Congyang wrote: --- docs/formatdomain.html.in | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 10:08:03AM +0800, Wen Congyang wrote: Introduce the function virCgroupForVcpu() to create sub directory for each vcpu. I'm far from convinced that this is a good idea. Setting policies on individual VCPUs is giving the host admin a misleading illusion of control over

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 11:09:26AM +0100, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 10:08:03AM +0800, Wen Congyang wrote: Introduce the function virCgroupForVcpu() to create sub directory for each vcpu. I'm far from convinced that this is a good idea. Setting policies on

Re: [libvirt] [PATCH RESEND RFC v4 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 10:11:32AM +0800, Wen Congyang wrote: @@ -5851,7 +5953,6 @@ static int qemuSetSchedulerParametersFlags(virDomainPtr dom, virTypedParameterPtr param = params[i]; if (STREQ(param-field, cpu_shares)) { -int rc; if

Re: [libvirt] [PATCH RESEND RFC v4 2/6] cgroup: Implement cpu.cfs_period_us and cpu.cfs_quota_us tuning API

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 10:08:47AM +0800, Wen Congyang wrote: --- src/libvirt_private.syms |4 ++ src/util/cgroup.c| 81 -- src/util/cgroup.h|6 +++ 3 files changed, 88 insertions(+), 3 deletions(-) +int

Re: [libvirt] [PATCH 01/13] destroy: Define new public API virDomainDestroyWithFlags

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 11:28:28AM +0200, Michal Privoznik wrote: This introduces new API virDomainDestroyWithFlags to allow domain destroying with flags, as the existing API virDomainDestroy misses flags. The set of flags is defined in virDomainDestroyFlags enum, which is currently

Re: [libvirt] [PATCH 00/13] New API: virDominDestroyWithFlags

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 11:28:27AM +0200, Michal Privoznik wrote: This series creates new API which adds flags to virDomainDestroy. As mentioned here many times, it is a bad luck all APIs don't have flags parameter. Parameter for this might be needed to select different ways of destroying a

Re: [libvirt] [PATCH 00/13] New API: virDominDestroyWithFlags

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 01:16:42PM +0200, Michal Privoznik wrote: On 21.07.2011 13:15, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 11:28:27AM +0200, Michal Privoznik wrote: This series creates new API which adds flags to virDomainDestroy. As mentioned here many times, it is a bad luck

Re: [libvirt] [PATCHv2 01/16] command: move all docs into .c file

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:24PM -0600, Eric Blake wrote: We already have a precedent of function documentation in C files, where it is closer to the implementation (witness libvirt.h vs. libvirt.c); maintaining docs in both files risks docs going stale. While I was at it, I used

Re: [libvirt] [PATCHv2 03/16] build: rename files.h to virfile.h

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:26PM -0600, Eric Blake wrote: In preparation for patch 12 later in this series adding new virFile APIs. * src/util/files.h, src/util/files.c: Move... * src/util/virfile.h, src/util/virfile.c: ...here, and rename functions to virFile prefix. Macro names are

Re: [libvirt] [PATCHv2 02/16] command: avoid leaking fds across fork

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:25PM -0600, Eric Blake wrote: Since libvirt is multi-threaded, we should use FD_CLOEXEC as much as possible in the parent, and only relax fds to inherited after forking, to avoid leaking an fd created in one thread to a fork run in another thread. This gets us

Re: [libvirt] [PATCHv2 04/16] qemu: fix error message with migrate2 xml

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:27PM -0600, Eric Blake wrote: Otherwise, an ABI mismatch gives error messages attributing the target xml string as current, and the current domain state as the new xml. * src/qemu/qemu_migration.c (qemuMigrationBegin): Use correct argument order. --- v2: new

Re: [libvirt] [PATCHv2 05/16] save: document new public API

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:28PM -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. Likewise for virDomainRestore when

Re: [libvirt] [PATCHv2 06/16] save: wire up remote protocol

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:29PM -0600, Eric Blake wrote: * src/remote/remote_driver.c (remote_driver): Add new callbacks. * src/remote/remote_protocol.x (remote_procedure): New RPCs. (remote_domain_save_flags_args, remote_domain_restore_flags_args): New structs. *

Re: [libvirt] [PATCHv2 07/16] save: wire up trivial save/restore flags implementations

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:30PM -0600, Eric Blake wrote: For all hypervisors that support save and restore, the new API now performs the same functions as the old. VBox is excluded from this list, because its existing domainsave is broken (there is no corresponding domainrestore, and

Re: [libvirt] [PATCHv2 09/16] save: support --xml to virsh save/restore

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:32PM -0600, Eric Blake wrote: Also, migrate was missing documentation for the --xml option added in commit ec5301cb. * tools/virsh.c (cmdSave, cmdRestore): Add xml argument. * tools/virsh.pod (save, restore, migrate): Document it. ACK Daniel -- |:

Re: [libvirt] [PATCHv2 08/16] save: add --bypass-cache flag to virsh save/restore operations

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:31PM -0600, Eric Blake wrote: Wire up the new flag to several virsh commands. Also, the 'dump' command had undocumented flags. * tools/virsh.c (cmdSave, cmdManagedSave, cmdDump, cmdStart) (cmdRestore): Add new flag. * tools/virsh.pod (save, managedsave, dump,

Re: [libvirt] [PATCHv2 10/16] save: let iohelper handle inherited fd

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:33PM -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] [PATCHv2 11/16] save: let iohelper work on O_DIRECT fds

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:34PM -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 512, but using page-aligned works better, and some file systems prefer 64k).

Re: [libvirt] [PATCHv2 12/16] save: add virFileDirectFd wrapper type

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:35PM -0600, Eric Blake wrote: O_DIRECT has stringent requirements. Rather than make lots of changes at each site that wants to use O_DIRECT, it is easier to offload the work through a helper process that mirrors the I/O between a pipe and the actual direct fd, so

Re: [libvirt] [PATCHv2 14/16] save: support bypass-cache flag in qemu.conf

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:37PM -0600, Eric Blake wrote: When auto-dumping a domain on crash events, or autostarting a domain with managed save state, let the user configure whether to imply the bypass cache flag. * src/qemu/qemu.conf (auto_dump_bypass_cache, auto_start_bypass_cache):

Re: [libvirt] [PATCHv2 13/16] save: support BYPASS_CACHE during qemu save/restore

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:36PM -0600, Eric Blake wrote: Wire together the previous patches to support file system cache bypass during API save/restore requests in qemu. * src/qemu/qemu_driver.c (qemuDomainSaveInternal, doCoreDump) (qemudDomainObjStart, qemuDomainSaveImageOpen,

Re: [libvirt] [PATCHv2 15/16] save: support bypass-cache flag in libvirt-guests init script

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:38PM -0600, Eric Blake wrote: libvirt-guests is a perfect use case for bypassing the file system cache - lots of filesystem traffic done at system shutdown, where caching is pointless, and startup, where reading large files only once just gets in the way. Make

Re: [libvirt] [PATCHv2 16/16] save: support qemu modifying xml on domain save/restore

2011-07-21 Thread Daniel P. Berrange
On Tue, Jul 19, 2011 at 10:20:39PM -0600, Eric Blake wrote: With this, it is possible to update the path to a disk backing image on either the save or restore action, without having to binary edit the XML embedded in the state file. * src/qemu/qemu_driver.c (qemuDomainSaveInternal)

[libvirt] [PATCH] python: Fix makefile rule for code generation

2011-07-21 Thread Matthias Bolte
Commit 8665f85523f0451c changed generated.stamp to $(GENERATE).stamp, but missed one instance in the CLEANFILES list. This can break the build in case the generated code is deleted but the .stamp file stays around and therefore the code isn't regenerated. --- python/Makefile.am |2 +- 1 files

Re: [libvirt] [PATCH 20/16] save: let qemu driver manipulate save files

2011-07-21 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 02:54:26PM -0600, Eric Blake wrote: * src/qemu/qemu_driver.c (qemuDomainSaveImageGetXMLDesc) (qemuDomainSaveImageDefineXML): New functions. (qemuDomainSaveImageOpen): Add parameter. (qemuDomainRestoreFlags, qemuDomainObjRestore): Adjust clients.

Re: [libvirt] [PATCH 18/16] save: wire up remote protocol

2011-07-21 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 02:54:24PM -0600, Eric Blake wrote: * src/remote/remote_driver.c (remote_driver): Add new callbacks. * src/remote/remote_protocol.x (remote_procedure): New RPCs. (remote_domain_save_image_get_xml_desc_args) (remote_domain_save_image_get_xml_desc_ret)

Re: [libvirt] [PATCH 19/16] save: add virsh commands for manipulating save files

2011-07-21 Thread Daniel P. Berrange
On Wed, Jul 20, 2011 at 02:54:25PM -0600, Eric Blake wrote: Now you can edit a saved state file even if you forgot to grab a dumpxml file prior to saving a domain. Plus, in-place editing feels so much nicer. * tools/virsh.c (cmdSaveImageDumpxml, cmdSaveImageDefine) (cmdSaveImageEdit): New

Re: [libvirt] [PATCH] python: Fix makefile rule for code generation

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 01:47:14PM +0200, Matthias Bolte wrote: Commit 8665f85523f0451c changed generated.stamp to $(GENERATE).stamp, but missed one instance in the CLEANFILES list. This can break the build in case the generated code is deleted but the .stamp file stays around and therefore

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

2011-07-21 Thread Matthias Bolte
The only 'void name(void)' style procedure in the protocol is 'close' that is handled special, but also 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

[libvirt] [PATCH 0/3] More work on TLS certificate code

2011-07-21 Thread Daniel P. Berrange
This series started off with an attempt to refactor the TLS certificate validation code to remove duplication. I then realized I ought to be testing such sensitive code too. So the big interesting part of this patch is a test case todo validation using very certificates. Rather than add a bunch of

[libvirt] [PATCH 2/3] Allow certificate sanity checking to be disabled

2011-07-21 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When libvirtd starts it it will sanity check its own certs, and before libvirt clients connect to a remote server they will sanity check their own certs. This patch allows such sanity checking to be skipped. There is no strong reason to need todo this,

[libvirt] [PATCH 1/3] Refactor the certification validation code

2011-07-21 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com There is some commonality between the code for sanity checking certs when initializing libvirt and the code for validating certs during a live TLS session handshake. This patchset splits up the sanity checking function into several smaller functions

Re: [libvirt] [PATCH] python: Fix makefile rule for code generation

2011-07-21 Thread Matthias Bolte
2011/7/21 Daniel P. Berrange berra...@redhat.com: On Thu, Jul 21, 2011 at 01:47:14PM +0200, Matthias Bolte wrote: Commit 8665f85523f0451c changed generated.stamp to $(GENERATE).stamp, but missed one instance in the CLEANFILES list. This can break the build in case the generated code is deleted

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Adam Litke
Added Anthony to give him the opportunity to address the finer points of this one especially with respect to the qemu IO thread(s). This feature is really about capping the compute performance of a VM such that we get consistent top end performance. Yes, qemu has non-VCPU threads that this patch

Re: [libvirt] [PATCH RESEND RFC v4 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-21 Thread Adam Litke
On 07/20/2011 09:11 PM, Wen Congyang wrote: +static int +qemuGetVcpusBWLive(virDomainObjPtr vm, virCgroupPtr cgroup, + unsigned long long *period, long long *quota) +{ +virCgroupPtr cgroup_vcpu = NULL; +qemuDomainObjPrivatePtr priv = NULL; +int rc; +int

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

2011-07-21 Thread Markus Armbruster
Jes Sorensen jes.soren...@redhat.com writes: On 07/19/11 18:14, Anthony Liguori wrote: As nice as that sentiment is, it will never fly, because it would be a regression in current behavior. The whole reason that the virt_use_nfs SELinux bool exists is that some people are willing to make the

Re: [libvirt] [PATCH RESEND RFC v4 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 08:00:21AM -0500, Adam Litke wrote: On 07/20/2011 09:11 PM, Wen Congyang wrote: +static int +qemuGetVcpusBWLive(virDomainObjPtr vm, virCgroupPtr cgroup, + unsigned long long *period, long long *quota) +{ +virCgroupPtr cgroup_vcpu = NULL;

[libvirt] [PATCH] xenapi: Improve error reporting in xenapiOpen once again

2011-07-21 Thread Matthias Bolte
privP-session-error_description is a list and in order to get the complete error message all parts of the list should be concatenated. xenapiSessionErrorHandler does this when its third parameter is NULL. The current code discards all but the first part of the error message resulting in a

Re: [libvirt] [PATCH RESEND RFC v4 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-21 Thread Adam Litke
On 07/21/2011 06:01 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 10:11:32AM +0800, Wen Congyang wrote: @@ -5851,7 +5953,6 @@ static int qemuSetSchedulerParametersFlags(virDomainPtr dom, virTypedParameterPtr param = params[i]; if (STREQ(param-field,

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 07:54:05AM -0500, Adam Litke wrote: Added Anthony to give him the opportunity to address the finer points of this one especially with respect to the qemu IO thread(s). This feature is really about capping the compute performance of a VM such that we get consistent top

Re: [libvirt] [PATCH RESEND RFC v4 5/6] qemu: Implement cfs_period and cfs_quota's modification

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 08:20:25AM -0500, Adam Litke wrote: On 07/21/2011 06:01 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 10:11:32AM +0800, Wen Congyang wrote: @@ -5851,7 +5953,6 @@ static int qemuSetSchedulerParametersFlags(virDomainPtr dom, virTypedParameterPtr

Re: [libvirt] [PATCH] error: preserve errno when saving last error

2011-07-21 Thread Eric Blake
On 07/20/2011 07:30 PM, Laine Stump wrote: On 07/20/2011 07:15 PM, Eric Blake wrote: It is common to see the sequence: virErrorPtr save_err = virSaveLastError(); // do cleanup virSetError(save_err); virFreeError(save_err); on cleanup paths. But for functions where it is desirable to return

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

2011-07-21 Thread Eric Blake
On 07/21/2011 05:58 AM, Matthias Bolte wrote: The only 'void name(void)' style procedure in the protocol is 'close' that is handled special, but also 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

Re: [libvirt] [PATCH] xenapi: Improve error reporting in xenapiOpen once again

2011-07-21 Thread Eric Blake
On 07/21/2011 07:17 AM, Matthias Bolte wrote: privP-session-error_description is a list and in order to get the complete error message all parts of the list should be concatenated. xenapiSessionErrorHandler does this when its third parameter is NULL. The current code discards all but the first

Re: [libvirt] [PATCH 01/13] destroy: Define new public API virDomainDestroyWithFlags

2011-07-21 Thread Osier Yang
于 2011年07月21日 19:13, Daniel P. Berrange 写道: On Thu, Jul 21, 2011 at 11:28:28AM +0200, Michal Privoznik wrote: This introduces new API virDomainDestroyWithFlags to allow domain destroying with flags, as the existing API virDomainDestroy misses flags. The set of flags is defined in

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Anthony Liguori
On 07/21/2011 08:34 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 07:54:05AM -0500, Adam Litke wrote: Added Anthony to give him the opportunity to address the finer points of this one especially with respect to the qemu IO thread(s). This feature is really about capping the compute

Re: [libvirt] [PATCH 03/13] destroy: Implement internal API for qemu driver

2011-07-21 Thread Osier Yang
于 2011年07月21日 17:28, Michal Privoznik 写道: --- src/qemu/qemu_driver.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e13b63b..ddadb08 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

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

2011-07-21 Thread Eric Blake
On 07/21/2011 02:40 AM, Jes Sorensen wrote: The security goal of libvirt is to protect the host from a compromised QEMU, therefore QEMU is, by definition, untrusted. Well that part goes both ways. By applying this model you are going to make it a hard requirement for libvirt to be upgraded

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Adam Litke
On 07/21/2011 08:34 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 07:54:05AM -0500, Adam Litke wrote: Added Anthony to give him the opportunity to address the finer points of this one especially with respect to the qemu IO thread(s). This feature is really about capping the compute

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

2011-07-21 Thread Eric Blake
On 07/21/2011 03:34 AM, Jes Sorensen wrote: On 07/21/11 11:34, Daniel P. Berrange wrote: QEMU is *not* yet running at the time libvirt reads the file metadata. Of course it is: hotplug In the case of hotplug, the hotplug monitor commands have not yet been invoked when libvirt access the file

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

2011-07-21 Thread Eric Blake
On 07/21/2011 02:38 AM, Jes Sorensen wrote: On 07/20/11 11:36, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 10:23:12AM +0200, Jes Sorensen wrote: Pardon, but I fail to see the issue here. If QEMU passes a filename back to libvirt, libvirt still gets to make the decision whether or not it

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

2011-07-21 Thread Jes Sorensen
On 07/21/11 15:07, Markus Armbruster wrote: Jes Sorensen jes.soren...@redhat.com writes: Right, we're stuck with the two horros of NFS and selinux, so we need something that gets around the problem. In a sane world we would simply say 'no NFS, no selinux', but as you say that will never

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

2011-07-21 Thread Jes Sorensen
On 07/21/11 15:47, Eric Blake wrote: On 07/21/2011 02:40 AM, Jes Sorensen wrote: The security goal of libvirt is to protect the host from a compromised QEMU, therefore QEMU is, by definition, untrusted. Well that part goes both ways. By applying this model you are going to make it a hard

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

2011-07-21 Thread Jes Sorensen
On 07/21/11 16:02, Eric Blake wrote: On 07/21/2011 02:38 AM, Jes Sorensen wrote: On 07/20/11 11:36, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 10:23:12AM +0200, Jes Sorensen wrote: Pardon, but I fail to see the issue here. If QEMU passes a filename back to libvirt, libvirt still gets

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 08:44:35AM -0500, Anthony Liguori wrote: On 07/21/2011 08:34 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 07:54:05AM -0500, Adam Litke wrote: Added Anthony to give him the opportunity to address the finer points of this one especially with respect to the qemu

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Anthony Liguori
On 07/21/2011 09:21 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 08:44:35AM -0500, Anthony Liguori wrote: On 07/21/2011 08:34 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 07:54:05AM -0500, Adam Litke wrote: Added Anthony to give him the opportunity to address the finer

Re: [libvirt] [PATCH RESEND RFC v4 1/6] Introduce the function virCgroupForVcpu

2011-07-21 Thread Daniel P. Berrange
On Thu, Jul 21, 2011 at 08:49:28AM -0500, Adam Litke wrote: On 07/21/2011 08:34 AM, Daniel P. Berrange wrote: On Thu, Jul 21, 2011 at 07:54:05AM -0500, Adam Litke wrote: Added Anthony to give him the opportunity to address the finer points of this one especially with respect to the qemu IO

  1   2   3   >