[libvirt] [PATCH v2] virsh domxml-from-native to treat SCSI as the bus type for pseries by default

2013-10-28 Thread Shivaprasad G Bhat
The bus type IDE being enum Zero, the bus type on pseries system appears as IDE for all the disk types. Pseries platform needs this to appear as SCSI instead of IDE. Signed-off-by: Shivaprasad G Bhat sb...@linux.vnet.ibm.com --- src/qemu/qemu_domain.c | 11 +++ 1 file changed, 11

Re: [libvirt] [PATCH]lxc: don't always print debug log in lxcContainerSetID

2013-10-28 Thread Daniel P. Berrange
On Wed, Oct 16, 2013 at 12:08:34PM +0800, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com lxcContainerSetID is used for user namespace. If we don't enable user namespace, don't print debug log. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com ---

Re: [libvirt] [PATCH]lxc: improve readability of lxcContainer[Send|Waitfor]Continue

2013-10-28 Thread Daniel P. Berrange
On Mon, Oct 21, 2013 at 02:28:37PM +0100, Michal Privoznik wrote: On 16.10.2013 08:27, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com Currently, lxcContainer[Send|Waitfor]Continue only tell us 'fd', but we had to deal with the interaction between

[libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The following sequence 1. Define a persistent QMEU guest 2. Start the QEMU guest 3. Stop libvirtd 4. Kill the QEMU process 5. Start libvirtd 6. List persistent guets At the last step, the previously running persistent guest will be missing.

Re: [libvirt] When vm's status file being left over, some persistent but inactive vms will be lost by libvirtd after libvirtd rebooting.

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 03:00:22AM +, Wangyufei (A) wrote: Hello, I found a problem that: vm's status file may be left over in the path /var/run/libvirt/qemu under some situation, such as host reboot. When vm's status file is left over, some persistent but inactive vms will be lost

Re: [libvirt] [PATCH v4 1/3] security: use a single function to set DAC user and group

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 02:13:19PM +0200, Giuseppe Scrivano wrote: Merge the functions 'virSecurityDACSetUser' and 'virSecurityDACSetGroup' into 'virSecurityDACSetUserAndGroup'. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/security/security_dac.c | 24

Re: [libvirt] [PATCH v4 2/3] security: add new internal function virSecurityManagerGetBaseLabel

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 02:13:20PM +0200, Giuseppe Scrivano wrote: virSecurityManagerGetBaseLabel queries the default settings used by a security model. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/libvirt_private.syms | 1 + src/security/security_apparmor.c | 8

Re: [libvirt] [PATCH v4 3/3] capabilities: add baselabel per sec driver/virt type to secmodel

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 02:13:21PM +0200, Giuseppe Scrivano wrote: Expand the secmodel XML fragment of host with a sequence of baselabel's which describe the default security context used by libvirt with a specific security model and virtualization type: secmodel modelselinux/model

[libvirt] [PATCH] virsh: new environment variable VIRSH_HISTSIZE

2013-10-28 Thread Pavel Raiskup
Allow adjust the number of commands to remember in the command history. * tools/virsh.c (vshReadlineInit): Read and sanity the VIRSH_HISTSIZE variable. (VIRSH_HISTSIZE_MAX): New constant. * tools/virsh.pod: Document VIRSH_HISTSIZE variable. --- tools/virsh.c | 17 -

Re: [libvirt] [PATCHv2 01/10] nodeinfo: Rename linuxNodeInfoCPUPopulate and export it properly

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:41PM +0200, Peter Krempa wrote: Call it virNodeInfoLinuxPopulateCPU and use the header file to export it instead of extern definition in the test file. --- src/libvirt_linux.syms | 2 +- src/nodeinfo.c | 14 +- src/nodeinfo.h | 5

Re: [libvirt] [PATCHv2 02/10] numa: Introduce virNumaIsAvailable and use it instead of numa_available

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:42PM +0200, Peter Krempa wrote: All functions from libnuma must be protected with ifdefs. Avoid this by using our own wrapper. --- src/libvirt_private.syms | 1 + src/nodeinfo.c | 13 + src/util/virnuma.c | 14 ++

Re: [libvirt] [PATCHv2 03/10] nodeinfo: Avoid forward declarations of static functions

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:43PM +0200, Peter Krempa wrote: linuxNodeGetCPUStats() and linuxNodeGetMemoryStats() are static and don't need a forward declaration. --- src/nodeinfo.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) ACK Daniel -- |:

Re: [libvirt] [PATCHv2 04/10] numa: Introduce virNumaGetMaxNode and use it instead of numa_max_node

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:44PM +0200, Peter Krempa wrote: Avoid necessary checks for the numa library with this helper. --- src/libvirt_private.syms | 1 + src/nodeinfo.c | 37 ++--- src/util/virnuma.c | 37

Re: [libvirt] [PATCHv2 05/10] numa: Introduce virNumaGetNodeMemory and use it instead of numa_node_size64

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:45PM +0200, Peter Krempa wrote: --- src/libvirt_private.syms | 1 + src/nodeinfo.c | 21 +++--- src/util/virnuma.c | 55 src/util/virnuma.h | 3 +++ 4 files changed, 67

Re: [libvirt] [PATCHv2 06/10] nodeinfo: Get rid of nodeGetCellMemory

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:46PM +0200, Peter Krempa wrote: The function was called in a single place only and was reporting errors that were later ignored. Use the virNumaGetNodeMemory helper to get the size of the memory in the NUMA node and remove the helper --- src/nodeinfo.c | 47

Re: [libvirt] [PATCHv2 07/10] numa: Replace NUMA_MAX_N_CPUS macro with virNumaGetMaxCPUs()

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:47PM +0200, Peter Krempa wrote: --- src/nodeinfo.c | 9 ++--- src/util/virnuma.c | 24 +++- src/util/virnuma.h | 2 ++ 3 files changed, 27 insertions(+), 8 deletions(-) ACK Daniel -- |: http://berrange.com -o-

Re: [libvirt] [PATCHv2 08/10] caps: Fix function docs for virCapabilitiesAddHostNUMACell

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:48PM +0200, Peter Krempa wrote: --- src/conf/capabilities.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 1acc936..8d53370 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@

Re: [libvirt] [PATCHv2 09/10] numa: Add wrapper of numa_node_to_cpus and use it

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:49PM +0200, Peter Krempa wrote: --- src/nodeinfo.c | 62 ++--- src/util/virnuma.c | 91 ++ src/util/virnuma.h | 2 ++ 3 files changed, 117 insertions(+), 38 deletions(-)

Re: [libvirt] [PATCHv2 10/10] nodeinfo: Remove libnuma include

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:05:50PM +0200, Peter Krempa wrote: Now that all libnuma functions used by libvirt are wrapped in virNuma we can remove the dependancy from nodeinfo. --- src/nodeinfo.c | 26 -- 1 file changed, 26 deletions(-) ACK Daniel -- |:

Re: [libvirt] [PATCH] virsh: new environment variable VIRSH_HISTSIZE

2013-10-28 Thread Daniel P. Berrange
On Sun, Oct 27, 2013 at 10:17:29AM +0100, Pavel Raiskup wrote: Allow adjust the number of commands to remember in the command history. * tools/virsh.c (vshReadlineInit): Read and sanity the VIRSH_HISTSIZE variable. (VIRSH_HISTSIZE_MAX): New constant. * tools/virsh.pod: Document

Re: [libvirt] Schedule for next release

2013-10-28 Thread Daniel P. Berrange
On Fri, Oct 18, 2013 at 05:18:22PM -0400, Daniel Veillard wrote: Assuming we want to release around the end of the month means we ought to enter freeze next week around the 24 or 25, but I know I will be very busy and have a hard time on those days. So potentially I will try to do the freeze

Re: [libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread John Ferlan
On 10/28/2013 07:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The following sequence 1. Define a persistent QMEU guest s/QMEU/QEMU 2. Start the QEMU guest 3. Stop libvirtd 4. Kill the QEMU process 5. Start libvirtd 6. List persistent guets

[libvirt] [PATCH] virsh: new environment variable VIRSH_HISTSIZE

2013-10-28 Thread Pavel Raiskup
Allow adjust the number of commands to remember in the command history. * tools/virsh.c (vshReadlineInit): Read and sanity the VIRSH_HISTSIZE variable. (VIRSH_HISTSIZE_MAX): New constant. * tools/virsh.pod: Document VIRSH_HISTSIZE variable. --- tools/virsh.c | 17 -

Re: [libvirt] [RFC] net-dhcp-leases: Query: Reg: Leases API Script

2013-10-28 Thread Nehal J Wani
ping On Thu, Oct 24, 2013 at 11:01 AM, Nehal J Wani nehaljw.k...@gmail.com wrote: I tried writing the helper program, didn't send v5, since I have some doubts. The program works. Problems listed below. diff --git a/src/Makefile.am b/src/Makefile.am index 21b9caf..ef88132 100644 ---

Re: [libvirt] [PATCH] virsh: new environment variable VIRSH_HISTSIZE

2013-10-28 Thread Daniel P. Berrange
On Mon, Oct 28, 2013 at 02:38:46PM +0100, Pavel Raiskup wrote: Allow adjust the number of commands to remember in the command history. * tools/virsh.c (vshReadlineInit): Read and sanity the VIRSH_HISTSIZE variable. (VIRSH_HISTSIZE_MAX): New constant. * tools/virsh.pod: Document

[libvirt] [PATCH] Don't update dom-persistent without lock held

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com virDomainObjListLoadAllConfigs sets dom-persistent after having released its lock on the domain object. This exposes a possible race condition. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/conf/domain_conf.c | 2 +- 1 file changed, 1

Re: [libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread Daniel P. Berrange
On Mon, Oct 28, 2013 at 09:17:16AM -0400, John Ferlan wrote: On 10/28/2013 07:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The following sequence 1. Define a persistent QMEU guest s/QMEU/QEMU 2. Start the QEMU guest 3. Stop libvirtd 4.

Re: [libvirt] [PATCH] Don't update dom-persistent without lock held

2013-10-28 Thread John Ferlan
On 10/28/2013 10:08 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com virDomainObjListLoadAllConfigs sets dom-persistent after having released its lock on the domain object. This exposes a possible race condition. Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH v2 REPOST] Skip any files which are not mounted on the host

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the LXC container tries to skip selinux/securityfs mounts if the directory does not exist in the filesystem, or if SELinux is disabled. The former check is flawed because the /sys/fs/selinux or /sys/kernel/securityfs directories may exist in

[libvirt] [PATCH v2 REPOST] Try to fix selinux/securityfs mount handling in LXC

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Update of https://www.redhat.com/archives/libvir-list/2013-October/msg00270.html Previously I just re-sent the one patch needing changes. This time I am reposting the whole series after rebasing. Daniel P. Berrange (1): Skip any files which are

[libvirt] [PATCH v2 REPOST 5/6] Add flag to lxcBasicMounts to control use in user namespaces

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Some mounts must be skipped if running inside a user namespace, since the kernel forbids their use. Instead of strcmp'ing the filesystem type in the body of the loop, set an explicit flag in the lxcBasicMounts table. Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH v2 REPOST 0/6] Try to fix selinux/securityfs mount handling in LXC

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Update of https://www.redhat.com/archives/libvir-list/2013-October/msg00270.html Previously I just re-sent the one patch needing changes. This time I am reposting the whole series after rebasing. Daniel P. Berrange (6): Add virFileIsMountPoint

[libvirt] [PATCH v2 REPOST 1/6] Add virFileIsMountPoint function

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add a function for efficiently checking if a path is a filesystem mount point. NB will not work for bind mounts, only true filesystem mounts. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 +

[libvirt] [PATCH v2 REPOST 6/6] Skip any files which are not mounted on the host

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the LXC container tries to skip selinux/securityfs mounts if the directory does not exist in the filesystem, or if SELinux is disabled. The former check is flawed because the /sys/fs/selinux or /sys/kernel/securityfs directories may exist in

[libvirt] [PATCH v2 REPOST 2/6] Remove unused 'opts' field from LXC basic mounts struct

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virLXCBasicMountInfo struct contains a 'char *opts' field passed onto the mount() syscall. Every entry in the list sets this to NULL though, so it can be removed to simplify life. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH v2 REPOST 4/6] Remove duplicate entries in lxcBasicMounts array

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the lxcBasicMounts array has separate entries for most mounts, to reflect that we must do a separate mount operation to make mounts read-only. Remove the duplicate entries and instead set the MS_RDONLY flag against the main entry. Then change

[libvirt] [PATCH v2 REPOST 3/6] Remove pointless 'srcpath' variable in lxcContainerMountBasicFS

2013-10-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The 'srcpath' variable is initialized from 'mnt-src' and never changed thereafter. Some places continue to use 'mnt-src' and others use 'srcpath'. Remove the pointless 'srcpath' variable and use 'mnt-src' everywhere. Signed-off-by: Daniel P. Berrange

Re: [libvirt] Schedule for next release

2013-10-28 Thread Doug Goldstein
On Mon, Oct 28, 2013 at 7:30 AM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Oct 18, 2013 at 05:18:22PM -0400, Daniel Veillard wrote: Assuming we want to release around the end of the month means we ought to enter freeze next week around the 24 or 25, but I know I will be very busy

Re: [libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread Cole Robinson
On 10/28/2013 07:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The following sequence 1. Define a persistent QMEU guest 2. Start the QEMU guest 3. Stop libvirtd 4. Kill the QEMU process 5. Start libvirtd 6. List persistent guets At the last

Re: [libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread Daniel P. Berrange
On Mon, Oct 28, 2013 at 01:03:49PM -0400, Cole Robinson wrote: On 10/28/2013 07:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The following sequence 1. Define a persistent QMEU guest 2. Start the QEMU guest 3. Stop libvirtd 4. Kill the QEMU

Re: [libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread Cole Robinson
On 10/28/2013 01:06 PM, Daniel P. Berrange wrote: On Mon, Oct 28, 2013 at 01:03:49PM -0400, Cole Robinson wrote: On 10/28/2013 07:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The following sequence 1. Define a persistent QMEU guest 2. Start the QEMU guest

Re: [libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread Daniel P. Berrange
On Mon, Oct 28, 2013 at 01:08:45PM -0400, Cole Robinson wrote: On 10/28/2013 01:06 PM, Daniel P. Berrange wrote: On Mon, Oct 28, 2013 at 01:03:49PM -0400, Cole Robinson wrote: On 10/28/2013 07:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The following

Re: [libvirt] [PATCH] Fix race condition reconnecting to vms loading configs

2013-10-28 Thread Cole Robinson
On 10/28/2013 01:14 PM, Daniel P. Berrange wrote: On Mon, Oct 28, 2013 at 01:08:45PM -0400, Cole Robinson wrote: On 10/28/2013 01:06 PM, Daniel P. Berrange wrote: On Mon, Oct 28, 2013 at 01:03:49PM -0400, Cole Robinson wrote: On 10/28/2013 07:52 AM, Daniel P. Berrange wrote: From: Daniel P.

[libvirt] [PATCH] MacOS: Handle changes to args in xdrproc_t

2013-10-28 Thread Doug Goldstein
With Mac OS X 10.9, xdrproc_t is no longer defined as: typedef bool_t (*xdrproc_t) (XDR *, void *, ...); but instead as typedef bool-t (*xdrproc_t) (XDR *, void *, unsigned int); The rationale explained in the header is that using a vararg is incorrect and has a potential to change the ABI

Re: [libvirt] [PATCH] Quick fix for config-demo.py

2013-10-28 Thread Ian Main
On Thu, Oct 24, 2013 at 10:16:50AM +0100, Michal Privoznik wrote: On 22.10.2013 23:50, Ian Main wrote: I guess this must have been changed and the demo not updated. Fix the demo so it uses the right value. Signed-off-by: Ian Main im...@redhat.com --- examples/config-demo.py | 2 +-

[libvirt] [PATCH] maint: update to latest gnulib

2013-10-28 Thread Eric Blake
Since we haven't quite frozen yet, it's time to pick up some fixes. I know at least cygwin benefits from this update. * .gnulib: Update to latest, in part for cygwin compilation. Signed-off-by: Eric Blake ebl...@redhat.com --- Pushing under the gnulib rule. * .gnulib 4a5ee89...8f74258 (33):

Re: [libvirt] [PATCH] MacOS: Handle changes to args in xdrproc_t

2013-10-28 Thread Doug Goldstein
On Mon, Oct 28, 2013 at 1:05 PM, Doug Goldstein car...@cardoe.com wrote: With Mac OS X 10.9, xdrproc_t is no longer defined as: typedef bool_t (*xdrproc_t) (XDR *, void *, ...); This was the typedef from Linux accidentally so I've updated that as well. but instead as typedef bool-t

[libvirt] [PATCH] MacOS: Re-add support for QEMU backend

2013-10-28 Thread Doug Goldstein
The QEMU backend was disabled on Mac OS X without a reason in the code and due to refactors its difficult to understand when/why it was disabled. With QEMU being supported on Mac OS X there is no reason to disable QEMU on this platform. --- configure.ac | 6 +- 1 file changed, 1 insertion(+),

[libvirt] [PATCH 0/2 v2] improve auto complete in virsh

2013-10-28 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com Chen Hanxiao (2): [libvirt]virsh: introduce member excludeOption in vshCmdOptDef and improve auto complete with it [libvirt]virsh: set --shareable and --mode's new member: excludeOption tools/virsh-domain.c | 6 -- tools/virsh.c

[libvirt] [PATCH 1/2 v2]virsh: introduce member excludeOption in vshCmdOptDef and improve auto complete with it

2013-10-28 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we need to exclude one parameters from another, we could use this member to specify one. With this flag, we could archive what Eric comment on: https://www.redhat.com/archives/libvir-list/2013-October/msg00965.html 1. COMMAND TAB or COMMAND --TAB

[libvirt] [PATCH 2/2 v2]virsh: set --shareable and --mode's new member: excludeOption

2013-10-28 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tools/virsh-domain.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 59e3d8d..84fbc90 100644 ---