Re: [libvirt] [PATCH 0/6 v3] New APIs to get/set node memory tunables

2012-09-17 Thread Osier Yang
On 2012年09月15日 14:57, Daniel Veillard wrote: On Fri, Sep 14, 2012 at 10:42:13PM +0800, Osier Yang wrote: v1: https://www.redhat.com/archives/libvir-list/2012-September/msg00517.html v1 - v2: * Rename virNode{Get,Set}SharedMemoryParameters to virNode{Get,Set}MemoryParameters, in case

Re: [libvirt] [PATCH v8] support offline migration

2012-09-17 Thread liguang
Hi, Daniel Eric can you help to review this patch again? Thanks! 在 2012-09-17一的 08:45 +0800,liguang写道: original migration did not aware of offline case so, add code to support offline migration quietly (did not disturb original migration) by pass VIR_MIGRATE_OFFLINE flag to migration APIs

Re: [libvirt] [PATCHv2 3/4] qemu: add -sandbox to command line if requested

2012-09-17 Thread Ján Tomko
On 09/14/12 17:14, Corey Bryant wrote: On 09/12/2012 04:03 AM, Ján Tomko wrote: +if (qemuCapsGet(qemuCaps, QEMU_CAPS_SECCOMP_SANDBOX)) { +if (driver-seccompSandbox == 0) +virCommandAddArgList(cmd, -sandbox, off, NULL); +else if (driver-seccompSandbox 0) +

[libvirt] [PATCHv3 3/4] qemu: add -sandbox to command line if requested

2012-09-17 Thread Ján Tomko
--- src/qemu/qemu_command.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a512e6a..7f9a51a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6524,6 +6524,17 @@

[libvirt] [PATCHv3 0/4] qemu: Add seccomp sandbox support

2012-09-17 Thread Ján Tomko
This series adds support to run QEMU with seccomp sandbox enabled. It can be configured in qemu.conf to on, off, or the QEMU default, which is off in 1.2. Default value is the QEMU default. V1 of the patches supports tri-state configuration and includes a test for detecting the capability. V2

[libvirt] [PATCHv3 2/4] qemu: conf: add seccomp_sandbox option

2012-09-17 Thread Ján Tomko
--- src/qemu/libvirtd_qemu.aug |1 + src/qemu/qemu.conf |8 src/qemu/qemu_conf.c |5 + src/qemu/qemu_conf.h |1 + 4 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug index

[libvirt] [PATCHv3 4/4] tests: add qemu-1.2.0 help data

2012-09-17 Thread Ján Tomko
Generated with: qemu-system-x86_64 -help tests/qemuhelpdata/qemu-1.2.0 qemu-system-x86_64 \ -device ? \ -device pci-assign,? \ -device virtio-blk-pci,? \ -device virtio-net-pci,? \ -device scsi-disk,? 2tests/qemuhelpdata/qemu-1.2.0-device --- tests/qemuhelpdata/qemu-1.2.0

[libvirt] [PATCHv3 1/4] qemu: add capability flag for seccomp sandbox

2012-09-17 Thread Ján Tomko
--- src/qemu/qemu_capabilities.c |3 +++ src/qemu/qemu_capabilities.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 43645bf..b87c53c 100644 --- a/src/qemu/qemu_capabilities.c +++

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-17 Thread Wido den Hollander
On 14-09-12 18:09, Daniel Veillard wrote: On Fri, Sep 14, 2012 at 05:36:10PM +0200, Wido den Hollander wrote: On 09/14/2012 04:59 PM, Daniel Veillard wrote: [...] http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.pom doesn't seems to have any

[libvirt] [PATCH] virsh: Clarify behavior of domain list filtering.

2012-09-17 Thread Peter Krempa
Some combinations of filtering flags produce no result. This patch tries to clarify this. Also fix unintentional double space. --- tools/virsh.pod | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index c6f205a..2efb277 100644 ---

Re: [libvirt] [libvirt-designer][PATCH v2 1/4] virtxml: Init variables

2012-09-17 Thread Michal Privoznik
On 14.09.2012 17:35, Christophe Fergeau wrote: On Thu, Sep 13, 2012 at 04:04:28PM +0200, Michal Privoznik wrote: to avoid their uninitialized usage. ACK, I've sent a similar patch but forgot --subject-prefix for some reason...

[libvirt] [PATCH 00/10] new virNetworkUpdate API

2012-09-17 Thread Laine Stump
This patchset implements a new API function called virNetworkUpdate which enables updating certain parts of a libvirt network's definition without the need to destroy/re-start the network. This is especially useful, for example, to add/remove hosts from the dhcp static hosts table, or change

[libvirt] [PATCH 10/10] network: restart radvd/dnsmasq if needed when libvirtd is restarted

2012-09-17 Thread Laine Stump
A user on IRC had accidentally killed all of his libvirt-started dnsmasq instances (due to a buggy dnsmasq service script in Fedora 16), and had hoped that libvirtd would notice this on restart and reload all the dnsmasq daemons (as it does with iptables rules). Unfortunately this was not the case

[libvirt] [PATCH 01/10] conf: separate functions to parse DHCPHostDef and DHCPRangeDef

2012-09-17 Thread Laine Stump
These two objects were previously always parsed as a part of an IpDef, but we will now need to be able to parse them on their own for virNetworkUpdate(). Split the parsing functions out, with no functional changes. --- src/conf/network_conf.c | 255 +---

[libvirt] [PATCH 07/10] network: reorganize dnsmasq and radvd config file / startup

2012-09-17 Thread Laine Stump
This patch splits the starting of dnsmasq and radvd into multiple files, and adds new networkRefreshXX() and networkRestartXX() functions for each. These new functions are currently commented out because they won't be used until the next commit, and the compile options require all static functions

[libvirt] [PATCH 03/10] network: define new API virNetworkUpdate

2012-09-17 Thread Laine Stump
This patch adds a new public API virNetworkUpdate that will permit updating an existing network configuration without requiring that the network be destroyed/restarted for the changes to take effect. --- include/libvirt/libvirt.h.in | 50 + src/driver.h

[libvirt] [PATCH 05/10] network: utility functions for updating network config

2012-09-17 Thread Laine Stump
These new functions are highly inspired by those in domain_conf.c (but not identical), and are intended to make it simpler to update the various combinations of live/persistent network configs. The network driver wasn't previously as careful about the separation between the live status in

[libvirt] [PATCH 02/10] conf: avoid freeing network object with undestroyed mutex

2012-09-17 Thread Laine Stump
virNetworkAssignDef was allocating a new network object, initing and grabbing its lock, then potentially freeing it without unlocking or destroying the lock. In practice 1) this will probably never happen, and 2) even if it did, the lock implementation used on most (all?) platforms doesn't

[libvirt] [PATCH 08/10] network: implement virNetworkUpdate for bridge_driver

2012-09-17 Thread Laine Stump
Call the network_conf function that modifies the live/persistent/both config, then refresh/restart dnsmasq/radvd if necessary, and finally save the config in the proper place(s). This patch also needed to uncomment a few utility functions that were added inside #if 0 in the previous commit (to

[libvirt] [PATCH 06/10] conf: implement NetworkObj backend of virNetworkUpdate API

2012-09-17 Thread Laine Stump
virNetworkObjUpdate takes care of all virNetworkUpdate-related changes to the data stored in the in-memory virNetworkObj list. It should be called by network drivers that use this in-memory list. virNetworkObjUpdate *does not* take care of updating any disk-based copies of the config, nor does it

[libvirt] [PATCH 04/10] network: implement RPC calls for virNetworkUpdate

2012-09-17 Thread Laine Stump
This is very short, because almost everything is autogenerated. All that's needed are: * src/remote/remote_driver.c: add pointer to autogenerated remoteNetworkUpdate to the function table for the remote network driver. * src/remote/remote_protocol.x: add the args struct and add one more

[libvirt] [PATCH 09/10] network: implement virNetworkUpdate for test_driver

2012-09-17 Thread Laine Stump
The test driver does nothing outside of keeping track of each network's config/state in the in-memory database maintained by network_conf functions, so all we have to do is call the function that updates the network's entry in the in-memory database. --- src/test/test_driver.c | 56

Re: [libvirt] [PATCHv2] svirt: Label serial sockets (RHBZ#853393).

2012-09-17 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:07:12PM +0100, Richard W.M. Jones wrote: From: Richard W.M. Jones rjo...@redhat.com libvirt skips labelling these, for unknown reasons. This breaks libguestfs. Adding this and some SELinux rules (RHBZ#857453) fixes everything for me. So I've finally remembered

Re: [libvirt] [PATCH] build: fix missing include

2012-09-17 Thread Daniel P. Berrange
On Sun, Oct 14, 2012 at 11:01:33AM -0400, Dwight Engen wrote: NB the clock on your machine is wrong by almost a month, we're still in September in (most?) of the world :-) Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org

[libvirt] [PATCH] qemu: Avoid deadlock on HandleAgentEOF

2012-09-17 Thread Michal Privoznik
On agent EOF the qemuProcessHandleAgentEOF() callback is called which locks virDomainObjPtr. Then qemuAgentClose() is called (with domain object locked) which eventually calls qemuAgentFree() and qemuProcessHandleAgentDestroy(). This tries to lock the domain object again. Hence the deadlock. ---

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-17 Thread Daniel Veillard
On Mon, Sep 17, 2012 at 10:35:02AM +0200, Wido den Hollander wrote: On 14-09-12 18:09, Daniel Veillard wrote: On Fri, Sep 14, 2012 at 05:36:10PM +0200, Wido den Hollander wrote: On 09/14/2012 04:59 PM, Daniel Veillard wrote: [...]

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-17 Thread Wido den Hollander
On 17-09-12 14:20, Daniel Veillard wrote: On Mon, Sep 17, 2012 at 10:35:02AM +0200, Wido den Hollander wrote: On 14-09-12 18:09, Daniel Veillard wrote: On Fri, Sep 14, 2012 at 05:36:10PM +0200, Wido den Hollander wrote: On 09/14/2012 04:59 PM, Daniel Veillard wrote: [...]

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-17 Thread Daniel Veillard
On Mon, Sep 17, 2012 at 02:32:03PM +0200, Wido den Hollander wrote: On 17-09-12 14:20, Daniel Veillard wrote: On Mon, Sep 17, 2012 at 10:35:02AM +0200, Wido den Hollander wrote: [...] However, maven central didn't fetch 0.4.9 yet. No clue why it ain't fetching.. I wonder where we could

[libvirt] Memory statistics patch for collectd plugin

2012-09-17 Thread Chris Furlough
Hello list, I see several mentions online for a patch that adds memory statistics to the libvirt plugin for collectd. Can anyone point me to the patch? Thanks! Frank-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 07/10] network: reorganize dnsmasq and radvd config file / startup

2012-09-17 Thread Laine Stump
On 09/17/2012 05:48 AM, Laine Stump wrote: This patch splits the starting of dnsmasq and radvd into multiple files, and adds new networkRefreshXX() and networkRestartXX() Heh. s/files/functions/ (As a side note - I have run make check make syntax-check on each step of applying these patches,

[libvirt] [PATCH] build: Fix build failure on mingw32 platform

2012-09-17 Thread Osier Yang
--- I'm not sure if we prefer indentions inside the block between #ifdef __linux__ ... #else clause. nodeinfo.c uses both (indentions/no indentions). --- src/nodeinfo.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-17 Thread Wido den Hollander
On 09/17/2012 02:50 PM, Daniel Veillard wrote: On Mon, Sep 17, 2012 at 02:32:03PM +0200, Wido den Hollander wrote: On 17-09-12 14:20, Daniel Veillard wrote: On Mon, Sep 17, 2012 at 10:35:02AM +0200, Wido den Hollander wrote: [...] However, maven central didn't fetch 0.4.9 yet. No clue why it

Re: [libvirt] [PATCH] virsh: Clarify behavior of domain list filtering.

2012-09-17 Thread Eric Blake
On 09/17/2012 03:02 AM, Peter Krempa wrote: Some combinations of filtering flags produce no result. This patch tries to clarify this. Also fix unintentional double space. Actually, the double space is intentional - for years, it was typographical convention to separate all sentences by two

Re: [libvirt] [PATCH] virsh: Clarify behavior of domain list filtering.

2012-09-17 Thread Laine Stump
On 09/17/2012 05:02 AM, Peter Krempa wrote: Some combinations of filtering flags produce no result. This patch tries to clarify this. Also fix unintentional double space. --- tools/virsh.pod | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/virsh.pod

Re: [libvirt] [PATCH] virsh: Clarify behavior of domain list filtering.

2012-09-17 Thread Peter Krempa
On 09/17/12 16:28, Laine Stump wrote: On 09/17/2012 05:02 AM, Peter Krempa wrote: Some combinations of filtering flags produce no result. This patch tries to clarify this. Also fix unintentional double space. --- tools/virsh.pod | 11 ++- 1 file changed, 6 insertions(+), 5

Re: [libvirt] [PATCH] build: Fix build failure on mingw32 platform

2012-09-17 Thread Osier Yang
For the title, s/mingw32/non-linux/. On 2012年09月17日 22:11, Osier Yang wrote: --- I'm not sure if we prefer indentions inside the block between #ifdef __linux__ ... #else clause. nodeinfo.c uses both (indentions/no indentions). --- src/nodeinfo.c | 12 1 files changed, 8

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-17 Thread Daniel Veillard
On Mon, Sep 17, 2012 at 04:19:46PM +0200, Wido den Hollander wrote: You could always leave it and not use the central repo. Under the Java bindings you could make a section pointing to the Maven repo and a pom.xml:

Re: [libvirt] [PATCH] virsh: Clarify behavior of domain list filtering.

2012-09-17 Thread Laine Stump
On 09/17/2012 10:40 AM, Peter Krempa wrote: On 09/17/12 16:28, Laine Stump wrote: On 09/17/2012 05:02 AM, Peter Krempa wrote: Some combinations of filtering flags produce no result. This patch tries to clarify this. Also fix unintentional double space. --- tools/virsh.pod | 11

Re: [libvirt] [PATCH v4 1/9] bitmap: new member variable and function renaming

2012-09-17 Thread Laine Stump
On 09/14/2012 03:46 AM, Hu Tao wrote: Add a new member variable map_len to store map len of bitmap. and rename size to max_bit accordingly. rename virBitmapAlloc to virBitmapNew. --- src/conf/domain_conf.c |2 +- src/conf/snapshot_conf.c |2 +- src/libvirt_private.syms

Re: [libvirt] [PATCH v4 2/9] New functions for virBitmap

2012-09-17 Thread Laine Stump
On 09/14/2012 03:46 AM, Hu Tao wrote: In many places we store bitmap info in a chunk of data (pointed to by a char *), and have redundant codes to set/unset bits. This patch extends virBitmap, and convert those codes to use virBitmap in subsequent patches. --- .gitignore |

Re: [libvirt] [PATCH v4 6/9] use virBitmap to store cpumask info.

2012-09-17 Thread Laine Stump
On 09/14/2012 07:22 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:47:01PM +0800, Hu Tao wrote: --- src/conf/domain_conf.c | 24 +--- src/conf/domain_conf.h |3 +-- src/lxc/lxc_controller.c | 14 ++

[libvirt] [PATCH v4 6.5/9] squash into 'use virBitmap to store cpumask info'

2012-09-17 Thread Laine Stump
--- I had to squash this patch into 6/9 in order to build successfully with xen enabled, and it's a bit more than I can comfortably do without an ACK. Can somebody give this a quick look? src/xen/xm_internal.c | 11 +++ src/xenxs/xen_sxpr.c | 12 +++- src/xenxs/xen_xm.c| 14

Re: [libvirt] [PATCH v4 6.5/9] squash into 'use virBitmap to store cpumask info'

2012-09-17 Thread Daniel P. Berrange
On Mon, Sep 17, 2012 at 01:24:56PM -0400, Laine Stump wrote: --- I had to squash this patch into 6/9 in order to build successfully with xen enabled, and it's a bit more than I can comfortably do without an ACK. Can somebody give this a quick look? src/xen/xm_internal.c | 11 +++

Re: [libvirt] [PATCH 00/10] new virNetworkUpdate API

2012-09-17 Thread Daniel P. Berrange
On Mon, Sep 17, 2012 at 05:48:45AM -0400, Laine Stump wrote: This patchset implements a new API function called virNetworkUpdate which enables updating certain parts of a libvirt network's definition without the need to destroy/re-start the network. This is especially useful, for example, to

[libvirt] [PATCH] xen: eliminate remaining uses of virDomainCpuSetParse

2012-09-17 Thread Laine Stump
The final patch in Hu Tao's series to enhance virBitmap actually removes virDomainCpuSetParse and virDomainCpuSetFormat as no longer used, and the rest of the series hadn't taken care of two uses of virDomainCpuSetParse in the xen code. This patch replaces those with appropriate virBitmap

Re: [libvirt] [PATCH] xen: eliminate remaining uses of virDomainCpuSetParse

2012-09-17 Thread Eric Blake
On 09/17/2012 12:51 PM, Laine Stump wrote: The final patch in Hu Tao's series to enhance virBitmap actually removes virDomainCpuSetParse and virDomainCpuSetFormat as no longer used, and the rest of the series hadn't taken care of two uses of virDomainCpuSetParse in the xen code. This patch

Re: [libvirt] [PATCH v4 3/9] use virBitmap to store cpupin info

2012-09-17 Thread Laine Stump
On 09/14/2012 07:16 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:46:58PM +0800, Hu Tao wrote: --- src/conf/domain_conf.c | 148 +++--- src/conf/domain_conf.h |6 +- src/libvirt_private.syms |1 + src/qemu/qemu_cgroup.c |

Re: [libvirt] [PATCH v4 5/9] use virBitmap to store numa nodemask info.

2012-09-17 Thread Laine Stump
On 09/14/2012 07:21 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:47:00PM +0800, Hu Tao wrote: --- src/conf/domain_conf.c | 24 +--- src/conf/domain_conf.h |2 +- src/lxc/lxc_controller.c | 25

Re: [libvirt] [PATCH v4 8/9] use virBitmap to store nodeinfo.

2012-09-17 Thread Laine Stump
On 09/14/2012 07:23 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:47:03PM +0800, Hu Tao wrote: --- src/nodeinfo.c | 26 +++--- src/nodeinfo.h |6 +++--- src/qemu/qemu_driver.c | 19 --- 3 files changed, 26 insertions(+),

Re: [libvirt] [PATCH v4 4/9] use virBitmap to store cpu affinity info

2012-09-17 Thread Laine Stump
On 09/14/2012 07:20 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:46:59PM +0800, Hu Tao wrote: --- src/lxc/lxc_controller.c | 23 + src/qemu/qemu_driver.c | 62 - src/qemu/qemu_process.c | 85

Re: [libvirt] [PATCH v4 7/9] use virBitmap to store cells' cpumask info.

2012-09-17 Thread Laine Stump
On 09/14/2012 07:22 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:47:02PM +0800, Hu Tao wrote: --- src/conf/cpu_conf.c | 17 ++--- src/conf/cpu_conf.h |3 ++- src/qemu/qemu_command.c | 43 +++ 3 files changed, 15

Re: [libvirt] [PATCH] xen: eliminate remaining uses of virDomainCpuSetParse

2012-09-17 Thread Laine Stump
On 09/17/2012 02:58 PM, Eric Blake wrote: On 09/17/2012 12:51 PM, Laine Stump wrote: The final patch in Hu Tao's series to enhance virBitmap actually removes virDomainCpuSetParse and virDomainCpuSetFormat as no longer used, and the rest of the series hadn't taken care of two uses of

Re: [libvirt] [PATCH v4 9/9] remove virDomainCpuSetFormat and virDomainCpuSetParse

2012-09-17 Thread Laine Stump
On 09/14/2012 07:24 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:47:04PM +0800, Hu Tao wrote: virBitmap is recommanded to store cpuset info, and virBitmapFormat/virBitmapParse can do the format/parse jobs. --- src/conf/domain_conf.c | 196

[libvirt] [PATCH] qemu: drop unused arguments for dump-guest-memory

2012-09-17 Thread Eric Blake
Upstream qemu has raised a concern about whether dumping guest memory by reading guest paging tables is a security hole: https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02607.html While auditing libvirt to see if we would be impacted, I noticed that we had some dead code. It is simpler

Re: [libvirt] [PATCH] build: Fix build failure on mingw32 platform

2012-09-17 Thread Eric Blake
On 09/17/2012 08:11 AM, Osier Yang wrote: --- I'm not sure if we prefer indentions inside the block between #ifdef __linux__ ... #else clause. nodeinfo.c uses both (indentions/no indentions). Adding {} is pointless, unless you are trying to shut up a compiler warning about 'goto' crossing a

Re: [libvirt] [PATCH 01/10] conf: separate functions to parse DHCPHostDef and DHCPRangeDef

2012-09-17 Thread Eric Blake
On 09/17/2012 03:48 AM, Laine Stump wrote: These two objects were previously always parsed as a part of an IpDef, but we will now need to be able to parse them on their own for virNetworkUpdate(). Split the parsing functions out, with no functional changes. --- src/conf/network_conf.c | 255

[libvirt] [PATCHv2 06/10] conf: implement NetworkObj backend of virNetworkUpdate API

2012-09-17 Thread Laine Stump
virNetworkObjUpdate takes care of all virNetworkUpdate-related changes to the data stored in the in-memory virNetworkObj list. It should be called by network drivers that use this in-memory list. virNetworkObjUpdate *does not* take care of updating any disk-based copies of the config, nor does it

Re: [libvirt] [PATCH 02/10] conf: avoid freeing network object with undestroyed mutex

2012-09-17 Thread Eric Blake
On 09/17/2012 03:48 AM, Laine Stump wrote: virNetworkAssignDef was allocating a new network object, initing and grabbing its lock, then potentially freeing it without unlocking or destroying the lock. In practice 1) this will probably never happen, and 2) even if it did, the lock

[libvirt] [PATCH 3/3] blockjob: add blockcommit support to rpc

2012-09-17 Thread Eric Blake
Relatively straightforward. Our decision to make block job speed a long keeps haunting us on new API. * src/remote/remote_protocol.x (remote_domain_block_commit_args): New struct. * src/remote/remote_driver.c (remote_driver): Enable it. * src/remote_protocol-structs: Regenerate. *

[libvirt] [PATCH 1/3] blockjob: add virDomainBlockCommit

2012-09-17 Thread Eric Blake
This API matches a proposed qemu command 'block-commit': https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02226.html Jeff's command is still in the works for qemu 1.3, and may gain further enhancements, such as the ability to control on-error handling (it will be comparable to the error

[libvirt] [PATCH 0/3] block commit support

2012-09-17 Thread Eric Blake
I'm still working on the qemu implementation of this API, but want to get the API reviewed and included in 0.10.2 before adding piecewise support for more and more of the API. My biggest issues for current implementations are: online qemu: Jeff's block-commit API is still not part of qemu.git,

[libvirt] [PATCH 2/3] blockjob: add virsh blockcommit

2012-09-17 Thread Eric Blake
The wait loop logic borrows heavily from blockcommit. * tools/virsh-domain.c (cmdBlockCommit): New function. * tools/virsh.pod (blockcommit): Document it. --- tools/virsh-domain.c | 153 ++- tools/virsh.pod | 30 ++ 2 files changed,

Re: [libvirt] [PATCH 03/10] network: define new API virNetworkUpdate

2012-09-17 Thread Eric Blake
On 09/17/2012 03:48 AM, Laine Stump wrote: This patch adds a new public API virNetworkUpdate that will permit updating an existing network configuration without requiring that the network be destroyed/restarted for the changes to take effect. --- include/libvirt/libvirt.h.in | 50

Re: [libvirt] [PATCH 1/3] blockjob: add virDomainBlockCommit

2012-09-17 Thread Peter Krempa
On 09/18/12 00:08, Eric Blake wrote: This API matches a proposed qemu command 'block-commit': https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02226.html Jeff's command is still in the works for qemu 1.3, and may gain further enhancements, such as the ability to control on-error

Re: [libvirt] [PATCH 2/3] blockjob: add virsh blockcommit

2012-09-17 Thread Peter Krempa
On 09/18/12 00:08, Eric Blake wrote: The wait loop logic borrows heavily from blockcommit. Maybe a little too sparse on the commit message, but the man page addition makes it up. * tools/virsh-domain.c (cmdBlockCommit): New function. * tools/virsh.pod (blockcommit): Document it. ---

Re: [libvirt] [PATCH 3/3] blockjob: add blockcommit support to rpc

2012-09-17 Thread Peter Krempa
On 09/18/12 00:08, Eric Blake wrote: Relatively straightforward. Our decision to make block job speed a long keeps haunting us on new API. * src/remote/remote_protocol.x (remote_domain_block_commit_args): New struct. * src/remote/remote_driver.c (remote_driver): Enable it. *

Re: [libvirt] [PATCH 01/10] conf: separate functions to parse DHCPHostDef and DHCPRangeDef

2012-09-17 Thread Laine Stump
On 09/17/2012 05:17 PM, Eric Blake wrote: On 09/17/2012 03:48 AM, Laine Stump wrote: These two objects were previously always parsed as a part of an IpDef, but we will now need to be able to parse them on their own for virNetworkUpdate(). Split the parsing functions out, with no functional

Re: [libvirt] [PATCH 02/10] conf: avoid freeing network object with undestroyed mutex

2012-09-17 Thread Laine Stump
On 09/17/2012 05:50 PM, Eric Blake wrote: On 09/17/2012 03:48 AM, Laine Stump wrote: virNetworkAssignDef was allocating a new network object, initing and grabbing its lock, then potentially freeing it without unlocking or destroying the lock. In practice 1) this will probably never happen,

Re: [libvirt] [PATCH 03/10] network: define new API virNetworkUpdate

2012-09-17 Thread Laine Stump
On 09/17/2012 06:42 PM, Eric Blake wrote: On 09/17/2012 03:48 AM, Laine Stump wrote: This patch adds a new public API virNetworkUpdate that will permit updating an existing network configuration without requiring that the network be destroyed/restarted for the changes to take effect. ---

Re: [libvirt] [PATCH v4 9/9] remove virDomainCpuSetFormat and virDomainCpuSetParse

2012-09-17 Thread Hu Tao
On Mon, Sep 17, 2012 at 03:04:40PM -0400, Laine Stump wrote: On 09/14/2012 07:24 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:47:04PM +0800, Hu Tao wrote: virBitmap is recommanded to store cpuset info, and virBitmapFormat/virBitmapParse can do the format/parse jobs. ---

Re: [libvirt] [PATCH 1/2] virsh: Move daemon to misc since its not a network

2012-09-17 Thread Doug Goldstein
On Sun, Sep 9, 2012 at 5:07 PM, Doug Goldstein car...@cardoe.com wrote: Move the 'Daemon' entry to the Miscellaneous section since its not a networking driver or component. --- tools/virsh.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCH 2/2] virsh: Rename QEmu to QEMU to match upstream

2012-09-17 Thread Doug Goldstein
On Sun, Sep 9, 2012 at 5:07 PM, Doug Goldstein car...@cardoe.com wrote: Match upstream's naming of QEMU. There was a notice on the ML that said the preferred spelling was QEMU a while back. --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCHv3 2/2] interface: add udev based backend for virInterface

2012-09-17 Thread Doug Goldstein
Add a read-only udev based backend for virInterface. Useful for distros that do not have netcf support yet. Multiple libvirt based utilities use a HAL based fallback when virInterface is not available which is less than ideal. This implements: * virConnectNumOfInterfaces() *

[libvirt] [PATCHv3 1/2] build: define WITH_INTERFACE for the driver

2012-09-17 Thread Doug Goldstein
Based exclusively on work by Eric Blake in a patch posted with the same subject. However some modifications related to comments and my plans to add another backend. Added WITH_INTERFACE as the only automake variable deciding whether to build the driver and using WITH_NETCF to identify that we're

Re: [libvirt] [PATCH] build: Fix build failure on mingw32 platform

2012-09-17 Thread Osier Yang
On 2012年09月18日 05:11, Eric Blake wrote: On 09/17/2012 08:11 AM, Osier Yang wrote: --- I'm not sure if we prefer indentions inside the block between #ifdef __linux__ ... #else clause. nodeinfo.c uses both (indentions/no indentions). Adding {} is pointless, unless you are trying to shut up a

Re: [libvirt] [PATCH] qemu: Avoid deadlock on HandleAgentEOF

2012-09-17 Thread Osier Yang
On 2012年09月17日 20:04, Michal Privoznik wrote: On agent EOF the qemuProcessHandleAgentEOF() callback is called which locks virDomainObjPtr. Then qemuAgentClose() is called (with domain object locked) which eventually calls qemuAgentFree() Guess you mean qemuAgentDispose here. and

Re: [libvirt] [PATCH 3/3] doc: fix some typoes on virsh manpage

2012-09-17 Thread Osier Yang
On 2012年09月07日 21:54, Guannan Ren wrote: --- tools/virsh.pod | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index fc7ce67..e7df72c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -686,7 +686,7 @@ address of virtual interface

Re: [libvirt] [PATCH 2/3] blockjob: add virsh blockcommit

2012-09-17 Thread Eric Blake
On 09/17/2012 05:29 PM, Peter Krempa wrote: On 09/18/12 00:08, Eric Blake wrote: The wait loop logic borrows heavily from blockcommit. I _meant_ to say 'blockpull'. And because of my cryptic reference, instead of a proper attribution, Maybe a little too sparse on the commit message, but

[libvirt] [PATCH 1/4] schema: Add schema for disk wwn

2012-09-17 Thread Osier Yang
* docs/formatdomain.html.in: Add document. * docs/schemas/nodedev.rng: Move definition of wwn to ... * docs/schemas/basictypes.rng: ...Here * docs/schemas/domaincommon.rng: Add schema for disk wwn --- docs/formatdomain.html.in |6 ++ docs/schemas/basictypes.rng |6 ++

[libvirt] [PATCH 0/4 v3] Support to set disk wwn

2012-09-17 Thread Osier Yang
v2 - v3: * Just rebase on the top. v1 - v2: * Validate wwn while parsing * Error out earlier if (disk-device == lun disk-wwn), no logic change. This introduces new element wwn for disk, to allow to set wwn (just like setting serial number) for the virtual disk (Only QEMU devices like

[libvirt] [PATCH 2/4] conf: Parse and format disk wwn

2012-09-17 Thread Osier Yang
Validates the wwn while parsing, error out if it's malformed. * src/util/util.h: Declare virValidateWWN * src/util/util.c: Implement virValidateWWN * src/libvirt_private.syms: Export virValidateWWN. * src/conf/domain_conf.h: New member 'wwn' for disk def. * src/conf/domain_conf.c: Parse and

[libvirt] [PATCH 3/4] qemu: Add caps to indentify if setting wwn is supported by qemu

2012-09-17 Thread Osier Yang
This assumes ide-drive.wwn, ide-hd.wwn, ide-cd.wwn were supported at the same time, similar for scsi-disk.wwn, scsi-hd.wwn, and scsi-cd.wwn. So only two new caps (QEMU_CAPS_IDE_DRIVE_WWN, and QEMU_CAPS_SCSI_DISK_WWN) are introduced. --- src/qemu/qemu_capabilities.c |8

[libvirt] [PATCH 4/4] qemu: Use disk wwn in qemu command line

2012-09-17 Thread Osier Yang
All of ide-drive, ide-hd, ide-cd, scsi-disk, scsi-hd, and scsi-cd supports wwn property. (NB, scsi-block doesn't support to set wwn). * src/qemu/qemu_command.c: Error out if underlying QEMU doesn't support wwn property for the device; Set wwn for the device otherwise. *

Re: [libvirt] [PATCH 3/3] doc: fix some typoes on virsh manpage

2012-09-17 Thread Guannan Ren
On 09/18/2012 10:25 AM, Osier Yang wrote: On 2012年09月07日 21:54, Guannan Ren wrote: --- tools/virsh.pod | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index fc7ce67..e7df72c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@

Re: [libvirt] [PATCH] qemu: drop unused arguments for dump-guest-memory

2012-09-17 Thread Eric Blake
On 09/17/2012 07:36 PM, Osier Yang wrote: On 2012年09月18日 03:08, Eric Blake wrote: Upstream qemu has raised a concern about whether dumping guest memory by reading guest paging tables is a security hole: https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02607.html While auditing

Re: [libvirt] [PATCH 3/3] blockjob: add blockcommit support to rpc

2012-09-17 Thread Eric Blake
On 09/17/2012 05:33 PM, Peter Krempa wrote: On 09/18/12 00:08, Eric Blake wrote: Relatively straightforward. Our decision to make block job speed a long keeps haunting us on new API. * src/remote/remote_protocol.x (remote_domain_block_commit_args): New struct. * src/remote/remote_driver.c

Re: [libvirt] [PATCH 1/3] blockjob: add virDomainBlockCommit

2012-09-17 Thread Eric Blake
On 09/17/2012 05:08 PM, Peter Krempa wrote: + +int virDomainBlockCommit(virDomainPtr dom, const char *disk, const char *base, + const char *top, unsigned long bandwidth, + unsigned int flags); Hm, I'm always wondering how things would be if

Re: [libvirt] [PATCH 2/4] conf: Parse and format disk wwn

2012-09-17 Thread Daniel Veillard
On Tue, Sep 18, 2012 at 10:47:10AM +0800, Osier Yang wrote: Validates the wwn while parsing, error out if it's malformed. * src/util/util.h: Declare virValidateWWN * src/util/util.c: Implement virValidateWWN * src/libvirt_private.syms: Export virValidateWWN. * src/conf/domain_conf.h: New

Re: [libvirt] [PATCH 1/4] schema: Add schema for disk wwn

2012-09-17 Thread Daniel Veillard
On Tue, Sep 18, 2012 at 10:47:09AM +0800, Osier Yang wrote: * docs/formatdomain.html.in: Add document. * docs/schemas/nodedev.rng: Move definition of wwn to ... * docs/schemas/basictypes.rng: ...Here * docs/schemas/domaincommon.rng: Add schema for disk wwn --- docs/formatdomain.html.in

Re: [libvirt] [PATCH 3/4] qemu: Add caps to indentify if setting wwn is supported by qemu

2012-09-17 Thread Daniel Veillard
On Tue, Sep 18, 2012 at 10:47:11AM +0800, Osier Yang wrote: This assumes ide-drive.wwn, ide-hd.wwn, ide-cd.wwn were supported at the same time, similar for scsi-disk.wwn, scsi-hd.wwn, and scsi-cd.wwn. So only two new caps (QEMU_CAPS_IDE_DRIVE_WWN, and QEMU_CAPS_SCSI_DISK_WWN) are introduced.

Re: [libvirt] [PATCH 4/4] qemu: Use disk wwn in qemu command line

2012-09-17 Thread Daniel Veillard
On Tue, Sep 18, 2012 at 10:47:12AM +0800, Osier Yang wrote: All of ide-drive, ide-hd, ide-cd, scsi-disk, scsi-hd, and scsi-cd supports wwn property. (NB, scsi-block doesn't support to set wwn). * src/qemu/qemu_command.c: Error out if underlying QEMU doesn't support wwn property for the