[libvirt] [PATCH] simplify xenXMDomainPinVcpu function

2012-09-19 Thread liguang
supersede tedious statements getting cpu bitmap from parameter cpumap by virBitmapNewData function Signed-off-by: liguang --- src/xen/xm_internal.c | 38 +++--- 1 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/xen/xm_internal.c b/src/xen/xm_in

[libvirt] [PATCH v8][re-send] support offline migration

2012-09-19 Thread 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 if only the domain is really inactive, and migration process will not puzzled by domain offline and exit unexpec

Re: [libvirt] [PATCH] security: also parse user/group names instead of just IDs for DAC labels

2012-09-19 Thread Eric Blake
On 09/19/2012 03:32 PM, Marcelo Cerri wrote: > The DAC driver is missing parsing of group and user names for DAC labels > and currently just parses uid and gid. This patch extends it to support > names, so the following security label definition is now valid: > > > qemu:qemu > qemu:

Re: [libvirt] [PATCH] virsh: new net-update command

2012-09-19 Thread Eric Blake
On 09/19/2012 06:04 PM, Laine Stump wrote: >>> +{"xml", VSH_OT_BOOL, 0, N_("xml is specified directly on >>> commandline")}, >>> +{"file", VSH_OT_BOOL, 0, N_("file containing xml is specified on >>> commandline")}, >>> +{"xmldata", VSH_OT_DATA, VSH_OFLAG_REQ, >>> + N_("complete x

Re: [libvirt] [PATCH] virsh: new net-update command

2012-09-19 Thread Eric Blake
On 09/19/2012 12:08 PM, Laine Stump wrote: > This new virsh command uses the new virNetworkUpdate() API to modify > an existing network definition, and optionally have those > modifications take effect immediately without restarting the network. > > An example usage: > > virsh net-update add-la

Re: [libvirt] [PATCH] virsh: new net-update command

2012-09-19 Thread Laine Stump
On 09/19/2012 02:32 PM, Eric Blake wrote: > On 09/19/2012 12:08 PM, Laine Stump wrote: >> This new virsh command uses the new virNetworkUpdate() API to modify >> an existing network definition, and optionally have those >> modifications take effect immediately without restarting the network. >> >>

Re: [libvirt] [PATCH] network: fix element size in memmove

2012-09-19 Thread Eric Blake
On 09/19/2012 05:19 PM, Laine Stump wrote: > The memmove to move elements in the dhcp hosts array when inserting > and deleting items was mistakenly basing the length of the copy on the > size of a virNetworkDHCPHostDefPtr rather than virNetworkDHCPHostDef, > with the expected disastrous results. >

[libvirt] [PATCH] network: fix element size in memmove

2012-09-19 Thread Laine Stump
The memmove to move elements in the dhcp hosts array when inserting and deleting items was mistakenly basing the length of the copy on the size of a virNetworkDHCPHostDefPtr rather than virNetworkDHCPHostDef, with the expected disastrous results. --- We really should create a VIR_SOMETHING() macro

Re: [libvirt] [PATCH WIP] build: add a warning when configure is executed with -Werror

2012-09-19 Thread Eric Blake
On 09/19/2012 04:28 PM, Marcelo Cerri wrote: > Some tests performed by configure to check what is supported can be > broken if -Werror is defined in CFLAGS variable when configure is > executed. > > This patch checks if CFLAGS contains -Werror and shows a warning for > user recommending to use --e

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

2012-09-19 Thread Eric Blake
On 09/17/2012 07:27 PM, Doug Goldstein wrote: > 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: >

[libvirt] [PATCH WIP] build: add a warning when configure is executed with -Werror

2012-09-19 Thread Marcelo Cerri
Some tests performed by configure to check what is supported can be broken if -Werror is defined in CFLAGS variable when configure is executed. This patch checks if CFLAGS contains -Werror and shows a warning for user recommending to use --enable-compile-warnings=error instead. --- Please, note t

[libvirt] [PATCH] security: also parse user/group names instead of just IDs for DAC labels

2012-09-19 Thread Marcelo Cerri
The DAC driver is missing parsing of group and user names for DAC labels and currently just parses uid and gid. This patch extends it to support names, so the following security label definition is now valid: qemu:qemu qemu:qemu --- src/security/security_dac.c | 49 +

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

2012-09-19 Thread Eric Blake
On 09/09/2012 04:07 PM, Doug Goldstein wrote: > Move the 'Daemon' entry to the Miscellaneous section since its not a > networking driver or component. I had to run 'virsh --version=long' to see the impact of this patch in context, but once I did that, it makes total sense. > --- > tools/virsh.c

Re: [libvirt] [PATCHv3 1.5/2] fixups to WITH_INTERFACE patch

2012-09-19 Thread Doug Goldstein
On Wed, Sep 19, 2012 at 9:35 AM, Eric Blake wrote: > On 09/19/2012 07:41 AM, Laine Stump wrote: >> On 09/19/2012 08:55 AM, Eric Blake wrote: >>> Here's what I'm planning on squashing into Doug's patch; the >>> biggest changes are to libvirt.spec.in, and I'd appreciate a >>> review on that portion.

Re: [libvirt] [PATCH 1/3] Ensure autogen.sh exists if bootstrap fails

2012-09-19 Thread Eric Blake
On 09/19/2012 12:09 PM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > If any of the bootstrap tasks (autoconf/automake/etc) failed, > autogen.sh carried on running any pre-existing configure anyway. > Use 'set -e' to ensure autogen.sh immediately exists on error. > --- > autogen.sh

Re: [libvirt] [PATCH] virsh: new net-update command

2012-09-19 Thread Eric Blake
On 09/19/2012 12:08 PM, Laine Stump wrote: > This new virsh command uses the new virNetworkUpdate() API to modify > an existing network definition, and optionally have those > modifications take effect immediately without restarting the network. > > + > +static const vshCmdOptDef opts_network_upd

[libvirt] [PATCH 1/3] Ensure autogen.sh exists if bootstrap fails

2012-09-19 Thread Daniel P. Berrange
From: "Daniel P. Berrange" If any of the bootstrap tasks (autoconf/automake/etc) failed, autogen.sh carried on running any pre-existing configure anyway. Use 'set -e' to ensure autogen.sh immediately exists on error. --- autogen.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autogen.sh

[libvirt] [PATCH 3/3] Add a test suite for validating SELinux labelling

2012-09-19 Thread Daniel P. Berrange
From: "Daniel P. Berrange" There are many aspects of the guest XML which result in the SELinux driver applying file labelling. With the increasing configuration options it is desirable to test this behaviour. It is not possible to assume that the test suite has the ability to set SELinux labels.

[libvirt] [PATCH 0/3] Add further testing of SELinux security driver

2012-09-19 Thread Daniel P. Berrange
This patch series expands on previous work to test the SELinux security driver via a LD_PRELOAD hack. This time we are testing the file labelling, by setting/getting private xattrs, instead of the actual SELinux xattrs. In doing this I had need to use libattr, and got fed up with duplicating the u

[libvirt] [PATCH 2/3] Add some autoconf helper macros for checking for libraries

2012-09-19 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Most checks for libraries take the same format * --with-libFOO=yes|no|check|/some/path argument * check for a function NNN in libFOO.so * check for a header file DDD/HHH.h * Define a WITH_FOO config.h symbol * Define a WITH_FOO make conditional * Substitut

[libvirt] [PATCH] virsh: new net-update command

2012-09-19 Thread Laine Stump
This new virsh command uses the new virNetworkUpdate() API to modify an existing network definition, and optionally have those modifications take effect immediately without restarting the network. An example usage: virsh net-update add-last ip-dhcp-host \ --xml "" \ --live --config If yo

Re: [libvirt] [PATCH v2] Fix libvirtd crash possibility

2012-09-19 Thread Eric Blake
On 09/12/2012 04:44 PM, Martin Kletzander wrote: > When generating RPC protocol messages, it's strictly needed to have > continuousline of numbers or RPC messages. However in case anyone > tries backporting some functionality and will skip a number, there is > a possibility to make the daemon segfa

[libvirt] [PATCH v2 0/3] Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
This series introduces simple reboot timeout support. That means what should be done in case all boot options fail, reboot or not. And if yes, then how long the machine should wait. Before adding the support for that into XML parser, builder, and qemu, I felt the need to cleanup the boot parsing a

[libvirt] [PATCH v2 3/3] QEMU Tests for reboot-timeout

2012-09-19 Thread Martin Kletzander
--- tests/qemuargv2xmltest.c| 4 .../qemuxml2argv-reboot-timeout-disabled.args | 3 +++ .../qemuxml2argv-reboot-timeout-disabled.xml| 21 + .../qemuxml2argv-reboot-timeout-enabled.args| 3 +++ .../qemuxml2argv-reboot-tim

[libvirt] [PATCH v2 1/3] Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
Whenever the guest machine fails to boot, new parameter (reboot-timeout) controls whether it should reboot and after how many ms it should do so. Docs included. --- docs/formatdomain.html.in | 11 --- docs/schemas/domaincommon.rng | 24 ++-- src/conf/domain_conf.c

[libvirt] [PATCH v2 2/3] qemu: Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
This patch adds support for "-boot reboot-timeout=rb_time" that is added in QEMU. --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 28 3 files changed, 33 insertions(+) diff --git a/src/qemu/qemu_capabilit

Re: [libvirt] [libvirt-designer][PATCH 5/6] Create manpage for virtxml

2012-09-19 Thread Daniel P. Berrange
On Wed, Sep 19, 2012 at 06:06:44PM +0200, Christophe Fergeau wrote: > On Tue, Sep 18, 2012 at 05:52:28PM +0200, Michal Privoznik wrote: > > --- > > .gitignore |1 + > > examples/Makefile.am | 11 > > examples/virtxml.pod | 121 > >

Re: [libvirt] [libvirt-designer][PATCH 0/6] Another functional extension

2012-09-19 Thread Christophe Fergeau
On Tue, Sep 18, 2012 at 05:52:23PM +0200, Michal Privoznik wrote: > and couple of fixes for clean RPM build. ACK except for 2/6 and 5/6 (see my comments in the corresponding patches) Christophe pgpVgNqGFEI4a.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https

Re: [libvirt] [PATCH v2 1/4] config: Introduce for SPICE graphics

2012-09-19 Thread Michal Privoznik
On 19.09.2012 16:25, Daniel P. Berrange wrote: > On Wed, Sep 19, 2012 at 03:26:49PM +0200, Michal Privoznik wrote: >> On 15.09.2012 17:10, Daniel P. Berrange wrote: >>> On Fri, Sep 14, 2012 at 05:23:16PM -0600, Eric Blake wrote: [adding qemu] On 09/14/2012 11:47 AM, Daniel P. Berrang

Re: [libvirt] [libvirt-designer][PATCH 5/6] Create manpage for virtxml

2012-09-19 Thread Christophe Fergeau
On Tue, Sep 18, 2012 at 05:52:28PM +0200, Michal Privoznik wrote: > --- > .gitignore |1 + > examples/Makefile.am | 11 > examples/virtxml.pod | 121 > ++ It's weird to have it in examples/ while one of the commit adds

Re: [libvirt] NFS over RDMA small block DIRECT_IO bug

2012-09-19 Thread Steve Dickson
On 09/18/2012 10:03 AM, Andrew Holway wrote: > Hi Steve, > > Do you think these patches will make their way into the redhat kernel > sometime soon? The process would start by opening a bz at bugzilla.redhat.com... If you like, you can send me the pointer to the bz and I'll make sure it gets no

Re: [libvirt] [libvirt-designer][PATCH 2/6] Create basic documentation

2012-09-19 Thread Christophe Fergeau
On Tue, Sep 18, 2012 at 05:52:25PM +0200, Michal Privoznik wrote: > In fact, it's only bare skeleton for gtkdoc This seems to be missing a call to GTK_DOC_CHECK in configure.ac, and potentially DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc=yes in Makefile.am Christophe pgpoIIPtjwEJm.pgp Descript

[libvirt] [PATCH] build: fix detection of netcf linked with libnl1

2012-09-19 Thread Christophe Fergeau
Commit 9298bfbcb introduced code to detect if netcf is linked with libnl1, and to prefer libnl1 over libnl3 when this is the case. This behaviour can be disabled by setting LIBNL_CFLAGS to any value, including the empty string. However, configure.ac sets LIBNL_CFLAGS to "" before attempting libnl d

Re: [libvirt] [PATCHv2] build: force libnl1 if netcf also used libnl1

2012-09-19 Thread Christophe Fergeau
Hey, On Thu, Sep 13, 2012 at 06:14:05AM -0600, Eric Blake wrote: > On 09/12/2012 10:46 PM, Osier Yang wrote: > > On 2012年09月11日 06:14, Eric Blake wrote: > >> Recent spec file changes ensure that in distro situations, netcf > >> and libvirt will link against the same libnl in order to avoid > >> du

Re: [libvirt] [PATCH] network: fix incorrect VIR_NETWORK_UPDATE_COMMAND_* values

2012-09-19 Thread Laine Stump
On 09/19/2012 10:24 AM, Daniel P. Berrange wrote: > On Wed, Sep 19, 2012 at 09:57:10AM -0400, Laine Stump wrote: >> These enums originally were put into the flags for virNetworkUpdate, >> and when they were moved into their own enum, the numbers weren't >> appropriately changed, causing the command

Re: [libvirt] [PATCHv3 1.5/2] fixups to WITH_INTERFACE patch

2012-09-19 Thread Eric Blake
On 09/19/2012 07:41 AM, Laine Stump wrote: > On 09/19/2012 08:55 AM, Eric Blake wrote: >> Here's what I'm planning on squashing into Doug's patch; the >> biggest changes are to libvirt.spec.in, and I'd appreciate a >> review on that portion. >> >> --- >> configure.ac| 1 + >> libvirt.spec.in

Re: [libvirt] [PATCH] network: fix incorrect VIR_NETWORK_UPDATE_COMMAND_* values

2012-09-19 Thread Daniel P. Berrange
On Wed, Sep 19, 2012 at 09:57:10AM -0400, Laine Stump wrote: > These enums originally were put into the flags for virNetworkUpdate, > and when they were moved into their own enum, the numbers weren't > appropriately changed, causing the commands to start with value 2 > instead of 1. This causes pro

Re: [libvirt] [PATCH v2 1/4] config: Introduce for SPICE graphics

2012-09-19 Thread Daniel P. Berrange
On Wed, Sep 19, 2012 at 03:26:49PM +0200, Michal Privoznik wrote: > On 15.09.2012 17:10, Daniel P. Berrange wrote: > > On Fri, Sep 14, 2012 at 05:23:16PM -0600, Eric Blake wrote: > >> [adding qemu] > >> > >> On 09/14/2012 11:47 AM, Daniel P. Berrange wrote: > >>> On Fri, Sep 14, 2012 at 07:34:50PM

Re: [libvirt] [PATCHv2 5/9] network: reorganize dnsmasq and radvd config file / startup

2012-09-19 Thread Laine Stump
On 09/18/2012 07:45 PM, Eric Blake wrote: > On 09/18/2012 01:39 AM, Laine Stump wrote: >> 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 >> beca

Re: [libvirt] [PATCH v2 1/4] config: Introduce for SPICE graphics

2012-09-19 Thread Daniel P. Berrange
On Wed, Sep 19, 2012 at 03:26:49PM +0200, Michal Privoznik wrote: > On 15.09.2012 17:10, Daniel P. Berrange wrote: > > On Fri, Sep 14, 2012 at 05:23:16PM -0600, Eric Blake wrote: > >> [adding qemu] > >> > >> On 09/14/2012 11:47 AM, Daniel P. Berrange wrote: > >>> On Fri, Sep 14, 2012 at 07:34:50PM

[libvirt] [PATCH] network: fix incorrect VIR_NETWORK_UPDATE_COMMAND_* values

2012-09-19 Thread Laine Stump
These enums originally were put into the flags for virNetworkUpdate, and when they were moved into their own enum, the numbers weren't appropriately changed, causing the commands to start with value 2 instead of 1. This causes problems for things like ENUM_IMPL, which wants a string for every value

Re: [libvirt] [PATCHv3 1.5/2] fixups to WITH_INTERFACE patch

2012-09-19 Thread Laine Stump
On 09/19/2012 08:55 AM, Eric Blake wrote: > Here's what I'm planning on squashing into Doug's patch; the > biggest changes are to libvirt.spec.in, and I'd appreciate a > review on that portion. > > --- > configure.ac| 1 + > libvirt.spec.in | 19 --- > po/POTFILES.in | 2 +-

Re: [libvirt] [PATCH v2 1/4] config: Introduce for SPICE graphics

2012-09-19 Thread Michal Privoznik
On 15.09.2012 17:10, Daniel P. Berrange wrote: > On Fri, Sep 14, 2012 at 05:23:16PM -0600, Eric Blake wrote: >> [adding qemu] >> >> On 09/14/2012 11:47 AM, Daniel P. Berrange wrote: >>> On Fri, Sep 14, 2012 at 07:34:50PM +0200, Michal Privoznik wrote: With this element users will control how S

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

2012-09-19 Thread Eric Blake
On 09/09/2012 04:07 PM, Doug Goldstein 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(-) ACK and pushed, although we probably have a l

Re: [libvirt] [PATCH] qemu: Transition domain to PAUSED after 'stop' command

2012-09-19 Thread Martin Kletzander
On 09/19/2012 12:16 PM, Michal Privoznik wrote: > On 19.09.2012 11:43, Michal Privoznik wrote: >> Currently, we mark domain PAUSED (but not emit an event) >> just before we issue 'stop' on monitor; This command can >> take ages to finish, esp. when domain's doing a lot of >> IO - users can enforce

[libvirt] [PATCHv3 1.5/2] fixups to WITH_INTERFACE patch

2012-09-19 Thread Eric Blake
Here's what I'm planning on squashing into Doug's patch; the biggest changes are to libvirt.spec.in, and I'd appreciate a review on that portion. --- configure.ac| 1 + libvirt.spec.in | 19 --- po/POTFILES.in | 2 +- tools/virsh.c | 4 ++-- 4 files changed, 16 insertion

Re: [libvirt] [PATCH] virsh: Fix resource leaks when editing files.

2012-09-19 Thread Peter Krempa
On 09/19/12 14:42, Michal Privoznik wrote: On 19.09.2012 11:43, Peter Krempa wrote: The cleanup path in virsh-edit helper was never reached when the edit was successful leaking the document in memory as well as the temporary file. --- tools/virsh-edit.c | 7 +-- 1 file changed, 5 insertio

Re: [libvirt] [PATCH] virsh: Fix resource leaks when editing files.

2012-09-19 Thread Michal Privoznik
On 19.09.2012 11:43, Peter Krempa wrote: > The cleanup path in virsh-edit helper was never reached when the edit > was successful leaking the document in memory as well as the temporary > file. > --- > tools/virsh-edit.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > ACK Micha

[libvirt] [PATCHv3] security: Don't ignore errors when parsing DAC security labels

2012-09-19 Thread Peter Krempa
The DAC security driver silently ignored errors when parsing the DAC label and used default values instead. With a domain containing the following label definition: sdfklsdjlfjklsdjkl the domain would start normaly but the disk images would be still owned by root and no error was displayed.

Re: [libvirt] [PATCH] util: don't free dmidecode path string before printing it

2012-09-19 Thread Eric Blake
On 09/19/2012 05:59 AM, Jiri Denemark wrote: > On Tue, Sep 18, 2012 at 17:33:57 -0600, Eric Blake wrote: >> On 09/18/2012 04:57 AM, Ján Tomko wrote: >>> The path was freed before printing the error message, resulting in: >>> error : virSysinfoRead:773 : internal error Failed to execute command >>>

Re: [libvirt] [PATCHv2] security: Don't ignore errors when parsing DAC security labels

2012-09-19 Thread Martin Kletzander
On 09/18/2012 04:00 PM, Peter Krempa wrote: > The DAC security driver silently ignored errors when parsing the DAC > label and used default values instead. > > With a domain containing the following label definition: > > > sdfklsdjlfjklsdjkl > > > the domain would start normaly but the disk im

Re: [libvirt] [PATCH] util: don't free dmidecode path string before printing it

2012-09-19 Thread Jiri Denemark
On Tue, Sep 18, 2012 at 17:33:57 -0600, Eric Blake wrote: > On 09/18/2012 04:57 AM, Ján Tomko wrote: > > The path was freed before printing the error message, resulting in: > > error : virSysinfoRead:773 : internal error Failed to execute command > > (null) > > --- > > src/util/sysinfo.c |2 +-

Re: [libvirt] [PATCH] qemu: Transition domain to PAUSED after 'stop' command

2012-09-19 Thread Michal Privoznik
On 19.09.2012 11:43, Michal Privoznik wrote: > Currently, we mark domain PAUSED (but not emit an event) > just before we issue 'stop' on monitor; This command can > take ages to finish, esp. when domain's doing a lot of > IO - users can enforce qemu to open files with O_DIRECT > which doesn't retur

[libvirt] [PATCH] qemu: Transition domain to PAUSED after 'stop' command

2012-09-19 Thread Michal Privoznik
Currently, we mark domain PAUSED (but not emit an event) just before we issue 'stop' on monitor; This command can take ages to finish, esp. when domain's doing a lot of IO - users can enforce qemu to open files with O_DIRECT which doesn't return from write() until data reaches the block device. Hav

[libvirt] [PATCH] virsh: Fix resource leaks when editing files.

2012-09-19 Thread Peter Krempa
The cleanup path in virsh-edit helper was never reached when the edit was successful leaking the document in memory as well as the temporary file. --- tools/virsh-edit.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/virsh-edit.c b/tools/virsh-edit.c index 512ac0d

Re: [libvirt] [Libvirt-announce] Entering freeze for 0.10.2

2012-09-19 Thread Daniel Veillard
On Wed, Sep 19, 2012 at 05:42:15PM +1000, Justin Clift wrote: > On 18/09/2012, at 9:25 PM, Daniel Veillard wrote: > > I have just tagged the release candidate 1 version and provided > > tarball and rpms at ftp://libvirt.org/libvirt/ > > > > so we have now entered freeze, I hope we didn't forgot

Re: [libvirt] [Libvirt-announce] Entering freeze for 0.10.2

2012-09-19 Thread Justin Clift
On 18/09/2012, at 9:25 PM, Daniel Veillard wrote: > I have just tagged the release candidate 1 version and provided > tarball and rpms at ftp://libvirt.org/libvirt/ > > so we have now entered freeze, I hope we didn't forgot any feature > except Dan's work for a locking daemon. maybe we can try t

Re: [libvirt] [PATCH 2/4] Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
On 09/18/2012 06:50 PM, Daniel P. Berrange wrote: > On Tue, Sep 18, 2012 at 05:36:47PM +0200, Martin Kletzander wrote: >> Whenever the guest machine fails to boot, new parameter (reboot-timeout) >> controls whether it should reboot and after how many ms it should do so. >> >> Docs included. >> ---