[libvirt] [test-API][PATCH] Fix a typo which block windows cdrom install

2011-08-31 Thread Wayne Sun
--- repos/domain/install_windows_cdrom.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/repos/domain/install_windows_cdrom.py b/repos/domain/install_windows_cdrom.py index 9cf9e3b..b8333e2 100644 --- a/repos/domain/install_windows_cdrom.py +++

Re: [libvirt] [test-API][PATCH] Fix a typo which block windows cdrom install

2011-08-31 Thread Guannan Ren
On 08/31/2011 02:52 PM, Wayne Sun wrote: --- repos/domain/install_windows_cdrom.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/repos/domain/install_windows_cdrom.py b/repos/domain/install_windows_cdrom.py index 9cf9e3b..b8333e2 100644 ---

Re: [libvirt] The design choice for how to enable block I/O throttling function in libvirt

2011-08-31 Thread Stefan Hajnoczi
On Tue, Aug 30, 2011 at 2:46 PM, Adam Litke a...@us.ibm.com wrote: On Tue, Aug 30, 2011 at 09:53:33AM +0100, Stefan Hajnoczi wrote: On Tue, Aug 30, 2011 at 3:55 AM, Zhi Yong Wu zwu.ker...@gmail.com wrote: I am trying to enable block I/O throttling function in libvirt. But currently i met

[libvirt] [PATCH 7/8] latency: Expose the new API for Python binding

2011-08-31 Thread Osier Yang
--- python/generator.py |1 + python/libvirt-override-api.xml |7 + python/libvirt-override.c | 55 +++ 3 files changed, 63 insertions(+), 0 deletions(-) diff --git a/python/generator.py b/python/generator.py index

[libvirt] [PATCH 3/8] latency: Implemente the public API

2011-08-31 Thread Osier Yang
--- src/libvirt.c | 69 + 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 65a099b..f83c019 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -6394,6 +6394,75 @@ error: } /** + *

[libvirt] [PATCH 0/8] Report disk latency info

2011-08-31 Thread Osier Yang
This patch series introduces a new API to report the disk latency related information, which is supported by upstream QEMU just a few days ago (commit c488c7f649, Thu Aug 25). Per previous dicussion on the ABI compatiblity, and API design principle, the new API is defined with style: typedef

[libvirt] [PATCH 2/8] latency: Define the internal driver callback

2011-08-31 Thread Osier Yang
--- src/driver.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 80d6628..05693e3 100644 --- a/src/driver.h +++ b/src/driver.h @@ -348,6 +348,13 @@ typedef int const char *path, struct

[libvirt] [PATCH 1/8] latency: Define new public API and structure

2011-08-31 Thread Osier Yang
--- include/libvirt/libvirt.h.in | 111 ++ src/libvirt_public.syms |5 ++ 2 files changed, 116 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 53a2f7d..5474f63 100644 ---

[libvirt] [PATCH 6/8] latency: Implemente internal API for qemu driver

2011-08-31 Thread Osier Yang
--- src/qemu/qemu_driver.c | 187 1 files changed, 187 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 03fadae..2c2bf56 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6842,6

[libvirt] [PATCH 5/8] latency: Update monitor functions for new latency fields

2011-08-31 Thread Osier Yang
The mainly changes are: 1) Update qemuMonitorGetBlockStatsInfo and it's children (Text/JSON) functions to return the value of new latency fields. 2) Add new function qemuMonitorGetBlockStatsParamsNumber, which is to count how many parameters the underlying QEMU supports. 3) Update

[libvirt] [PATCH 4/8] latency: Wire up the remote protocol

2011-08-31 Thread Osier Yang
--- daemon/remote.c | 81 ++ src/remote/remote_driver.c | 69 +++ src/remote/remote_protocol.x | 23 +++- 3 files changed, 172 insertions(+), 1 deletions(-) diff --git a/daemon/remote.c

[libvirt] [PATCH 8/8] latency: Update cmdBlkStats to use new API

2011-08-31 Thread Osier Yang
The modified function fallbacks to use virDomainBlockStats if virDomainBlockStatsFlags is not supported by the hypervisor driver. If the new API is supported, it will be invoked instead of the old API. --- tools/virsh.c | 78 ++-- 1 files

Re: [libvirt] [PATCH 6/8] latency: Implemente internal API for qemu driver

2011-08-31 Thread Osier Yang
于 2011年08月31日 16:26, Osier Yang 写道: --- src/qemu/qemu_driver.c | 187 1 files changed, 187 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 03fadae..2c2bf56 100644 ---

[libvirt] [PATCH] Fix parted sector size assumption

2011-08-31 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Parted does not report disk size in 512 byte units, but rather the disks' logical sector size, which with modern drives might be 4k. * src/storage/parthelper.c: Remove hardcoded 512 byte sector size --- src/storage/parthelper.c | 12 ++--

Re: [libvirt] [PATCH v3] daemon: Create priority workers pool

2011-08-31 Thread Daniel P. Berrange
On Fri, Aug 26, 2011 at 11:34:27AM +0200, Michal Privoznik wrote: diff --git a/src/remote/qemu_protocol.x b/src/remote/qemu_protocol.x index 3279405..39f9adf 100644 --- a/src/remote/qemu_protocol.x +++ b/src/remote/qemu_protocol.x @@ -52,9 +52,14 @@ const QEMU_PROGRAM = 0x20008087; const

Re: [libvirt] [PATCH] Fix parted sector size assumption

2011-08-31 Thread Daniel Veillard
On Wed, Aug 31, 2011 at 11:04:04AM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Parted does not report disk size in 512 byte units, but rather the disks' logical sector size, which with modern drives might be 4k. * src/storage/parthelper.c: Remove

[libvirt] [PATCH 0/6] Support online block resizing

2011-08-31 Thread Osier Yang
Upstream QEMU introduced online block resizing to resize the block device when domain is running since commit 6d4a2b3a4795. It simply reuses existing bdrv_truncate method which is used by qemu-img to resize the images. This means it supports to resize all the format that qemu-img resize supports.

[libvirt] [PATCH 6/6] block_resize: Expose the new API in virsh

2011-08-31 Thread Osier Yang
Add new command block_resize: * Units for option size is KB. * --device is used to specify the device name. E.g. vda, vdb. --- tools/virsh.c | 61 ++- tools/virsh.pod |8 +++ 2 files changed, 68 insertions(+), 1 deletions(-)

[libvirt] [PATCH 5/6] block_resize: Implemente the internal API for qemu driver

2011-08-31 Thread Osier Yang
It requires the domain is running, otherwise fails. Resize to a lower size is supported, but should be used with extreme caution. In order to prohibit the size overflowing after multiplied by 1024. We do checking in the codes. This might be not quite properly, as for QMP mode, the default units

[libvirt] [PATCH 2/6] block_resize: Implemente the public API

2011-08-31 Thread Osier Yang
--- src/libvirt.c | 67 + 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index e4a21b6..a9b4b3c 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -6620,6 +6620,73 @@ error: } /** + *

[libvirt] [PATCH 1/3] storage: Add mkfs and libblkid to build system

2011-08-31 Thread Osier Yang
--- configure.ac| 26 ++ libvirt.spec.in |4 2 files changed, 30 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 3c08a19..5e3539f 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,7 @@ OPENWSMAN_REQUIRED=2.2.3

[libvirt] [PATCH 0/3 v4] Add filesystem pool formatting

2011-08-31 Thread Osier Yang
The following patches add the ability to format filesystem pools when the appropriate flags are passed to pool build. This patch set introduces two new flags: VIR_STORAGE_POOL_BUILD_NO_OVERWRITE causes the build to probe for an existing pool of the requested type. The build operation formats the

[libvirt] [PATCH 2/3] storage: Add fs pool formatting

2011-08-31 Thread Osier Yang
This patch adds the ability to make the filesystem for a filesystem pool during a pool build. The patch adds two new flags, no overwrite and overwrite, to control when mkfs gets executed. By default, the patch preserves the current behavior, i.e., if no flags are specified, pool build on a

[libvirt] [PATCH 3/3] storage: Add virsh support for fs pool formating

2011-08-31 Thread Osier Yang
--- tools/virsh.c | 14 -- tools/virsh.pod | 11 ++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 49034ae..cd87107 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -7134,6 +7134,8 @@ static const vshCmdInfo

Re: [libvirt] [PATCH] stream: remove redundant reference to client while sending stream data

2011-08-31 Thread Daniel P. Berrange
On Sun, Aug 28, 2011 at 09:43:58PM +0800, Guannan Ren wrote: *daemon/stream.c: remove virNetServerClientRef() --- daemon/stream.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/daemon/stream.c b/daemon/stream.c index 7d2b367..0333dfd 100644 ---

[libvirt] [PATCH 4/6] block_resize: Implemente the qemu monitor functions

2011-08-31 Thread Osier Yang
Implements functions for both HMP and QMP mode. (command block_resize is supported by qemu in both HMP and QMP mode). In HMP mode, qemu uses M as the units by default, so the passed sized is divided by 1024. In QMP mode, qemu uses Bytes as the units by default, the passed sized is multiplied by

[libvirt] [PATCH 3/6] block_resize: Wire up the remote protocol

2011-08-31 Thread Osier Yang
--- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 10 +- src/remote_protocol-structs |7 +++ 3 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 603d589..e01a655 100644 ---

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

2011-08-31 Thread Osier Yang
--- include/libvirt/libvirt.h.in |4 src/driver.h |7 +++ src/libvirt_public.syms |5 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index c51a5b9..bec470b 100644 ---

[libvirt] ALERT Virtualization Automatic Builder

2011-08-31 Thread berrange
Overall status: failed Start date: Wed Aug 31 2011 Start time: 15:05:02 UTC / 11:05:02 EDT Build counter: 1314803102 Build timestamp: 1314803102 URL: http://builder.virt-tools.org/index.html Module: libvirt Status: failed URL: http://builder.virt-tools.org/module-libvirt.html -- libvir-list

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

2011-08-31 Thread Eric Blake
On 06/24/2011 07:19 AM, Daniel P. Berrange wrote: +static const vshCmdInfo info_send_key[] = { +{help, N_(Send keycodes to the guest)}, +{desc, N_(Send keycodes to the guest, the keycodes must be integers\n +Examples:\n\n +virsh #

Re: [libvirt] [PATCH 09/10 V2] send-key: Expose the new API in virsh

2011-08-31 Thread Eric Blake
On 06/14/2011 01:33 PM, Eric Blake wrote: +++ b/tools/virsh.pod @@ -296,6 +296,10 @@ scheduling by the hypervisor. Inject NMI to the guest +=item Bsend-key Idomain-id I--codeset Bcodeset I--holdtime Bholdtime Bkeycode... long line, and mark which items are optional: item Bsend-key

Re: [libvirt] ALERT Virtualization Automatic Builder

2011-08-31 Thread Eric Blake
On 08/31/2011 08:26 AM, berra...@redhat.com wrote: Overall status: failed Start date: Wed Aug 31 2011 Start time: 15:05:02 UTC / 11:05:02 EDT Build counter: 1314803102 Build timestamp: 1314803102 URL: http://builder.virt-tools.org/index.html Module: libvirt Status: failed URL:

Re: [libvirt] ALERT Virtualization Automatic Builder

2011-08-31 Thread Daniel P. Berrange
On Wed, Aug 31, 2011 at 08:33:12AM -0600, Eric Blake wrote: On 08/31/2011 08:26 AM, berra...@redhat.com wrote: Overall status: failed Start date: Wed Aug 31 2011 Start time: 15:05:02 UTC / 11:05:02 EDT Build counter: 1314803102 Build timestamp: 1314803102 URL:

[libvirt] [PATCH] virsh: improve send-key documentation

2011-08-31 Thread Eric Blake
The 'virsh man' description of send-key was incomplete and used the old style (literal 'optional name' instead of '[name]' metasyntax). Meanwhile, none of the other virsh help texts include examples, so I moved it out of virsh help and into the man page. * tools/virsh.pod (send-key): Give better

[libvirt] [PATCH] Don't leak memory if a cgroup is mounted multiple times

2011-08-31 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com It is possible (expected/likely in Fedora 15) for a cgroup controller to be mounted in multiple locations at the same time, due to bind mounts. Currently we leak memory if this happens, because we overwrite the previous 'mountPoint' string. Instead

[libvirt] [PATCH] Stop libxl driver polluting logs on non-Xen hosts

2011-08-31 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If the libxl driver is compiled in, then everytime libvirtd starts up on a non-Xen Dom0 host, it logs a error message. Since this is an expected condition, we should not log at 'error' level, only 'info'. * src/libxl/libxl_driver.c: Lower log level

[libvirt] [PATCH] Fix memory leak parsing 'relabel' attribute in domain security XML

2011-08-31 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com * src/conf/domain_conf.c: Free the 'relabel' attribute --- src/conf/domain_conf.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 44212cf..00212db 100644 ---

[libvirt] [PATCH] Fix memory leak dispatching domain events

2011-08-31 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When dispatching domain events we will create an XDR struct containing the event info. Some of this data may be allocated on the heap and so must be freed. The graphics event dispatcher had a broken attempt to free one field, but missed others. All the

Re: [libvirt] [PATCH] Don't leak memory if a cgroup is mounted multiple times

2011-08-31 Thread Eric Blake
On 08/31/2011 09:47 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com It is possible (expected/likely in Fedora 15) for a cgroup controller to be mounted in multiple locations at the same time, due to bind mounts. Currently we leak memory if this happens, because we

Re: [libvirt] [PATCH v3] daemon: Create priority workers pool

2011-08-31 Thread Eric Blake
On 08/31/2011 04:45 AM, Daniel P. Berrange wrote: +REMOTE_PROC_STORAGE_POOL_GET_INFO = 87, /* autogen autogen priority:low */ high Really, even though it might require a call to an external process like iscsiadm? +REMOTE_PROC_STORAGE_POOL_GET_XML_DESC = 88, /* autogen autogen

Re: [libvirt] [PATCH] Stop libxl driver polluting logs on non-Xen hosts

2011-08-31 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If the libxl driver is compiled in, then everytime libvirtd starts up on a non-Xen Dom0 host, it logs a error message. Since this is an expected condition, we should not log at 'error' level, only 'info'. Ah, yes. I

Re: [libvirt] [PATCH] Stop libxl driver polluting logs on non-Xen hosts

2011-08-31 Thread Eric Blake
On 08/31/2011 09:54 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com If the libxl driver is compiled in, then everytime libvirtd starts up on a non-Xen Dom0 host, it logs a error message. Since this is an expected condition, we should not log at 'error' level, only

Re: [libvirt] [PATCH] Fix memory leak parsing 'relabel' attribute in domain security XML

2011-08-31 Thread Eric Blake
On 08/31/2011 09:55 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com * src/conf/domain_conf.c: Free the 'relabel' attribute --- src/conf/domain_conf.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) ACK. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH] Fix memory leak dispatching domain events

2011-08-31 Thread Eric Blake
On 08/31/2011 09:55 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com When dispatching domain events we will create an XDR struct containing the event info. Some of this data may be allocated on the heap and so must be freed. The graphics event dispatcher had a broken

[libvirt] [PATCH] Fix tracking of RPC messages wrt streams

2011-08-31 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Commit 2c85644b0b51fbe5b6244e6773531af29933a727 attempted to fix a problem with tracking RPC messages from streams by doing -if (msg-header.type == VIR_NET_REPLY) { +if (msg-header.type == VIR_NET_REPLY || +

[libvirt] [PATCH] Avoid use-after-free on streams, due to message callbacks

2011-08-31 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When sending outbound stream RPC messages, a callback is used to re-enable stream data transmission. If the stream aborts while one of these messages is outstanding, the stream may have been free'd by the time it is invoked. This results in a

Re: [libvirt] Python stream callback removal

2011-08-31 Thread Daniel P. Berrange
On Wed, Aug 24, 2011 at 11:58:29PM +0800, Guannan Ren wrote: On 08/18/2011 05:55 AM, Dave Allan wrote: So, after your patches which have greatly improved the console behavior, I find that I'm back to this hang, which by its nature I can't reproduce with virsh console, as it only appears when

Re: [libvirt] [PATCH] Avoid use-after-free on streams, due to message callbacks

2011-08-31 Thread Eric Blake
On 08/31/2011 10:48 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com When sending outbound stream RPC messages, a callback is used to re-enable stream data transmission. If the stream aborts while one of these messages is outstanding, the stream may have been free'd by

Re: [libvirt] [PATCH] Fix tracking of RPC messages wrt streams

2011-08-31 Thread Eric Blake
On 08/31/2011 10:48 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Commit 2c85644b0b51fbe5b6244e6773531af29933a727 attempted to fix a problem with tracking RPC messages from streams by doing -if (msg-header.type == VIR_NET_REPLY) { +if

[libvirt] [RFC] Create ptmx as a device

2011-08-31 Thread Serge Hallyn
Hi, I'm seeing an issue with udev and libvirt-lxc. Libvirt-lxc creates /dev/ptmx as a symlink to /dev/pts/ptmx. When udev starts up, it checks the device type, sees ptmx is 'not right', and replaces it with a 'proper' ptmx. In lxc, /dev/ptmx is bind-mounted from /dev/pts/ptmx instead of being

Re: [libvirt] [PATCH] lxc: do not require 'ifconfig' or 'ipconfig' in container

2011-08-31 Thread Serge Hallyn
Quoting Scott Moser (smo...@ubuntu.com): Currently, the lxc implementation invokes 'ip' and 'ifconfig' commands inside a container using 'virRun'. That has the side effect of requiring those commands to be present and to function in a manner consistent with the usage. Some small roots (such

[libvirt] [PATCH 1/2] BlockJob: Bandwidth parameter is in MB when using text monitor

2011-08-31 Thread Adam Litke
Due to an unfortunate precedent in qemu, the units for the bandwidth parameter to block_job_set_speed are different between the text monitor and the qmp monitor. While the qmp monitor uses bytes/s, the text monitor expects MB/s. Correct the units for the text interface. Signed-off-by: Adam

[libvirt] [PATCH 2/2] BlockPull: Set bandwidth limit when using text monitor

2011-08-31 Thread Adam Litke
The libvirt BlockPull API supports the use of an initial bandwidth limit. To implement this in the text monitor we first start the operation with a 'block_stream' command and then issue a 'block_job_set_speed' command to apply the limit. This functionality is already present for json mode.

[libvirt] [PATCH] virsh: prefer unsigned flags

2011-08-31 Thread Eric Blake
* tools/virsh.c (cmdUndefine, cmdSave, cmdSaveImageDumpxml) (cmdSaveImageEdit, cmdManagedSave, cmdRestore, cmdDump) (cmdVcpuPin, cmdSetvcpus, cmdSetmem, cmdSetmaxmem, cmdDumpXML) (cmdDomXMLFromNative, cmdDomXMLToNative, doMigrate) (cmdInterfaceEdit, cmdInterfaceDumpXML, cmdEdit): Match coding

[libvirt] [PATCH 2/2] Add new testcase for cpu topology testing

2011-08-31 Thread Guannan Ren
*repos/domain/cpu_topology.py --- repos/domain/cpu_topology.py | 248 ++ 1 files changed, 248 insertions(+), 0 deletions(-) create mode 100644 repos/domain/cpu_topology.py diff --git a/repos/domain/cpu_topology.py b/repos/domain/cpu_topology.py new

[libvirt] [PATCH 1/2] make remote_exec_pexpect return the output of command

2011-08-31 Thread Guannan Ren
*utils/Python/utils.py return 0,child.before intead *repos/remoteAccess/tcp_setup.py repos/remoteAccess/tls_setup.py switch over to use new remote_exec_pexpect() --- repos/remoteAccess/tcp_setup.py | 18 +- repos/remoteAccess/tls_setup.py | 20 ++--

[libvirt] [RFC] block I/O throttling: how to enable in libvirt

2011-08-31 Thread Zhi Yong Wu
- Forwarded message from Zhi Yong Wu wu...@linux.vnet.ibm.com - Date: Thu, 1 Sep 2011 11:55:17 +0800 From: Zhi Yong Wu wu...@linux.vnet.ibm.com To: Stefan Hajnoczi stefa...@gmail.com Cc: Daniel P. Berrange berra...@redhat.com, Stefan Hajnoczi stefa...@gmail.com, Adam Litke