[libvirt] [PATCH] storage: Fix volume cloning for logical volume.

2013-04-03 Thread Atsushi Kumagai
When creating a logical volume with virStorageVolCreateXMLFrom, "qemu-img convert" is called internally if clonevol is a file volume. Then, vol->target.format is used as output_fmt parameter but the target.format of logical volumes is always 0 because logical volumes haven't the volume format typ

[libvirt] [sandbox PATCH 13/15] Use args.uri rather then hard coding lxc:///

2013-04-03 Thread Dan Walsh
Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 8571374..8c9ea76 100755 --- a/bin/virt-sandbox-service +++ b/bin/virt-sandbox-service @@ -928,7 +928,7 @@ def fullpat

[libvirt] [sandbox PATCH 05/15] Change virt-sandbox-service-create.pod to use correct command --copy

2013-04-03 Thread Dan Walsh
Current the documentation says that you use --clone while the code uses --copy when you are createing a sandbox service container. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service-create.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/virt-sandbox-service-c

[libvirt] [sandbox PATCH 06/15] Internationalize all output strings in virt-sandbox-service

2013-04-03 Thread Dan Walsh
Wrap all output strings with _() to make sure we get proper translations. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-servi

[libvirt] [sandbox PATCH 12/15] Add support for InteractiveContainer

2013-04-03 Thread Dan Walsh
First use case will be OpenShift Differentiate on create based on whether one or more unit files specified (ServiceContainer), or a command is specified (Interactive Container). Signed-off-by: Dan Walsh --- bin/virt-sandbox-service| 165 bin/virt

[libvirt] [sandbox PATCH 10/15] Change variable config to config_path to avoid confusion.

2013-04-03 Thread Dan Walsh
save_config uses an internal variable to indicate the path to the virt-sandbox configuration file, this path renames this variable to prevent confusion. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/virt

[libvirt] [sandbox PATCH 15/15] Create new /etc/rc.d directory to bind mount over system.

2013-04-03 Thread Dan Walsh
We need to prevent SYSVInit scripts from running by default in the ServiceContainer. The so we recreate all of the directories under /etc/rc.d and copy the functions file over. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-)

[libvirt] [sandbox PATCH 08/15] Make CONFIG_PATH external to the Container Class

2013-04-03 Thread Dan Walsh
This patch moves CONFIG_PATH external from the Container Class. This will eliminate the need to create a container to get this constant. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/virt-sandbox-servi

[libvirt] [sandbox PATCH 11/15] Refactor Container class into Container and ServiceContainer Class.

2013-04-03 Thread Dan Walsh
This way we can share common methods between the ServiceContainer and the InteractiveContainer (Patch to be added) --- bin/virt-sandbox-service | 754 --- 1 file changed, 385 insertions(+), 369 deletions(-) diff --git a/bin/virt-sandbox-service b/bin/vi

[libvirt] [sandbox PATCH 14/15] Check for LXC if virt-sandbox-service execute command specified

2013-04-03 Thread Dan Walsh
virt-sandbox-service execute is not supported on qemu sandboxes. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 8c9ea76..7b0410a 100755 --- a/bin/virt-sandbox-

[libvirt] [sandbox PATCH 02/15] Add support for InteractiveContainers to virt-sandbox-service-util

2013-04-03 Thread Dan Walsh
We need to add support for interactive sandbox/containers for OpenShift. This patch will create the correct container type based off the /etc/libvirt-sandbox/service/* --- bin/virt-sandbox-service-util.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) dif

[libvirt] Patch set to add InteractiveContainer support to virt-sandbox

2013-04-03 Thread Dan Walsh
Resend of patches with lots of cleanups. This patch set adds InteractiveContainer support to virt-sandbox-service command. This is needed if we want to support the OpenShift model of containers. There are also some bug fix patches in the set. [sandbox PATCH 01/15] virt-sandbox-service-util

[libvirt] [sandbox PATCH 03/15] Move virt-sandbox-service bash completion script to default directory.

2013-04-03 Thread Dan Walsh
bash_completion scripts have added a new way to do completions, where you place you scripts in /usr/share/bash_completion/completions rather then /etc/bash_completions.d. We should follow the new standard, and this patch moves our bash_completion script to the proper location with the proper name.

[libvirt] [sandbox PATCH 09/15] Add exception handler GlibGerror to virt-sandbox-service

2013-04-03 Thread Dan Walsh
GlibGerror can be raised by virt-sandbox-service, this patch will catch the exception and write the error to stderr. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 4 1 file changed, 4 insertions(+) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index df88284..f4

[libvirt] [sandbox PATCH 01/15] virt-sandbox-service-util needs to free allocated memory.

2013-04-03 Thread Dan Walsh
Coverity found that we could be leaking memory with virt-sandbox-service-util -e --- bin/virt-sandbox-service-util.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service-util.c b/bin/virt-sandbox-service-util.c index 4d164d8..a292fcd 100644 --- a/bi

[libvirt] [sandbox PATCH 07/15] Remove distinction from Internal vs External Functions.

2013-04-03 Thread Dan Walsh
This patch removes all __METHOD and _METHOD functions calls. Since it is not intended that virt-sandbox-service will be imported into another python module, there is limited value to using the internal indicators. Signed-off-by: Dan Walsh --- bin/virt-sandbox-service | 118 +

[libvirt] [sandbox PATCH 04/15] Add -u UNITFILE option to virt-sandbox-service reload command

2013-04-03 Thread Dan Walsh
The command will allow administrators or the systemd service to reload units which are running within a container. If you have one or more units defined for a container, then just those units will get the reloads, as opposed to stopping and restarting the container. --- bin/virt-sandbox-service

Re: [libvirt] [PATCH] Add support for SD cards in nodedev driver

2013-04-03 Thread Eric Blake
On 04/03/2013 11:24 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The nodedev driver currently only detects harddisk, cdrom > and floppy devices. This adds support for SD cards, which > are common storage for ARM devices, eg the Google ChromeBook > > > block_mmcblk0_0xb1c7c08

Re: [libvirt] [PATCH v2 2/3] Auto-add a root element to LXC containers on startup

2013-04-03 Thread Eric Blake
On 04/03/2013 02:15 PM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Currently the LXC container code has two codepaths, depending on > whether there is a element with a target path of '/'. > If we automatically add a device with src=/ and dst=/, > for any container which has not

Re: [libvirt] [PATCH] security_manager: fix comparison

2013-04-03 Thread Eric Blake
On 04/03/2013 02:40 PM, Luiz Capitulino wrote: > On Wed, 3 Apr 2013 22:23:28 +0200 > Guido Günther wrote: > >> otherwise we crash later on if we don't find a match like: >> >> #0 0xb72c2b4f in virSecurityManagerGenLabel (mgr=0xb8e42d20, >> vm=0xb8ef40c0) at security/security_manager.c:424 >>

Re: [libvirt] [PATCH] Create fake NUMA info if libnuma isn't available

2013-04-03 Thread Eric Blake
On 04/03/2013 02:12 PM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > If libnuma is not compiled in, or numa_available() returns an > error, stub out fake NUMA info consisting of one NUMA cell > containing all CPUs and memory. > > Signed-off-by: Daniel P. Berrange > --- > src/node

Re: [libvirt] [PATCH] Add armv6l architecture to list of valid arches

2013-04-03 Thread Eric Blake
On 04/03/2013 12:59 PM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The Raspberry Pi runs the armv6l architecture and apparently > people are trying to run libvirt LXC on it. So we should allow > that as a valid arch > > Signed-off-by: Daniel P. Berrange > --- > src/util/virarch

Re: [libvirt] [PATCH] Cope with missing /sys/devices/system/cpu/cpu0/topology files

2013-04-03 Thread Eric Blake
On 04/03/2013 01:31 PM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Not all kernel builds have any entries under the location > /sys/devices/system/cpu/cpu0/topology. We already cope with > that being missing in some cases, but not all. Update the > code which looks for thread_sibl

Re: [libvirt] [PATCH] security_manager: fix comparison

2013-04-03 Thread Guido Günther
On Wed, Apr 03, 2013 at 02:53:05PM -0600, Eric Blake wrote: > On 04/03/2013 02:40 PM, Luiz Capitulino wrote: > > On Wed, 3 Apr 2013 22:23:28 +0200 > > Guido Günther wrote: > > > >> otherwise we crash later on if we don't find a match like: > >> > >> #0 0xb72c2b4f in virSecurityManagerGenLabel (

Re: [libvirt] [PATCH] security_manager: fix comparison

2013-04-03 Thread Luiz Capitulino
On Wed, 3 Apr 2013 22:23:28 +0200 Guido Günther wrote: > otherwise we crash later on if we don't find a match like: > > #0 0xb72c2b4f in virSecurityManagerGenLabel (mgr=0xb8e42d20, vm=0xb8ef40c0) > at security/security_manager.c:424 > #1 0xb18811f3 in qemuProcessStart (conn=conn@entry=0xb8e

[libvirt] [PATCH] security_manager: fix comparison

2013-04-03 Thread Guido Günther
otherwise we crash later on if we don't find a match like: #0 0xb72c2b4f in virSecurityManagerGenLabel (mgr=0xb8e42d20, vm=0xb8ef40c0) at security/security_manager.c:424 #1 0xb18811f3 in qemuProcessStart (conn=conn@entry=0xb8eed880, driver=driver@entry=0xb8e3b1e0, vm=vm@entry=0xb8ef58f0,

[libvirt] libvirtd segfault on latest git

2013-04-03 Thread Luiz Capitulino
Hi, Libvirtd from latest git (HEAD fc8c1787) is segfaulting when I try to restore a previously saved domain (backtrace below). I was testing a custom QEMU when it happened first time, but it also happens with latest qemu.git (HEAD 162cbbd17). What I did to run libvirt from source was: 1. Build

[libvirt] [PATCH v2 2/3] Auto-add a root element to LXC containers on startup

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Currently the LXC container code has two codepaths, depending on whether there is a element with a target path of '/'. If we automatically add a device with src=/ and dst=/, for any container which has not specified a root filesystem, then we only need one codepath fo

[libvirt] [PATCH] Create fake NUMA info if libnuma isn't available

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" If libnuma is not compiled in, or numa_available() returns an error, stub out fake NUMA info consisting of one NUMA cell containing all CPUs and memory. Signed-off-by: Daniel P. Berrange --- src/nodeinfo.c | 137 ++-

Re: [libvirt] [PATCH] Implement minimal sysinfo for ARM platforms

2013-04-03 Thread Eric Blake
On 04/03/2013 11:59 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Implement the bare minimal sysinfo for ARM platforms by > reading the CPU models from /proc/cpuinfo > > Signed-off-by: Daniel P. Berrange > --- > src/util/virsysinfo.c | 129 >

Re: [libvirt] [PATCH] Wire up sysinfo for LXC driver

2013-04-03 Thread Eric Blake
On 04/03/2013 11:59 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The sysinfo code used by QEMU is trivially portable to the > LXC driver > --- > src/lxc/lxc_conf.h | 3 +++ > src/lxc/lxc_driver.c | 29 + > 2 files changed, 32 insertions(+) ACK.

Re: [libvirt] [PATCH] v2:Support for adding a static route to a bridge

2013-04-03 Thread Gene Czarcinski
On 04/02/2013 03:31 PM, Laine Stump wrote: On 03/15/2013 02:10 PM, Gene Czarcinski wrote: This patch adds support for adding a static route for a network. The "via" specifies the gateway's IP address. Both IPv4 and IPv6 static routes are supported although it is expected that this functionalit

[libvirt] [PATCH] Cope with missing /sys/devices/system/cpu/cpu0/topology files

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Not all kernel builds have any entries under the location /sys/devices/system/cpu/cpu0/topology. We already cope with that being missing in some cases, but not all. Update the code which looks for thread_siblings to cope with the missing file Signed-off-by: Daniel P. B

[libvirt] [PATCH] Add armv6l architecture to list of valid arches

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The Raspberry Pi runs the armv6l architecture and apparently people are trying to run libvirt LXC on it. So we should allow that as a valid arch Signed-off-by: Daniel P. Berrange --- src/util/virarch.c | 1 + src/util/virarch.h | 1 + 2 files changed, 2 insertions(+)

[libvirt] [PATCH] Wire up sysinfo for LXC driver

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The sysinfo code used by QEMU is trivially portable to the LXC driver --- src/lxc/lxc_conf.h | 3 +++ src/lxc/lxc_driver.c | 29 + 2 files changed, 32 insertions(+) diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h index b46dc32..f8f7

[libvirt] [PATCH] Implement minimal sysinfo for ARM platforms

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Implement the bare minimal sysinfo for ARM platforms by reading the CPU models from /proc/cpuinfo Signed-off-by: Daniel P. Berrange --- src/util/virsysinfo.c | 129 +++- tests/sysinfodata/armcpuinfo.data | 17 + te

Re: [libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Eric Blake
On 04/03/2013 11:12 AM, Daniel P. Berrange wrote: >> We already reject compilation of LXC on RHEL 5 due to other >> configure-time checks; is this something worth turning into an >> additional configure test of whether a kernel is new enough, or are we >> okay with just leaving it as a runtime test

[libvirt] [PATCH] qemu: fix memory leak on -machine usage error

2013-04-03 Thread Eric Blake
Commit f84b92ea introduced a memory leak on error; John Ferlan reported that valgrind caught it during 'make check'. * src/qemu/qemu_command.c (qemuBuildMachineArgStr): Plug leak. --- Pushing under the trivial rule. src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src

Re: [libvirt] [PATCH 2/3] Auto-add a root element to LXC containers on startup

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 11:17:30AM -0600, Eric Blake wrote: > On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > Currently the LXC container code has two codepaths, depending on > > whether there is a element with a target path of '/'. > > If we automaticall

[libvirt] [PATCH] Add support for SD cards in nodedev driver

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The nodedev driver currently only detects harddisk, cdrom and floppy devices. This adds support for SD cards, which are common storage for ARM devices, eg the Google ChromeBook block_mmcblk0_0xb1c7c08b computer /dev/mmcblk0 sd 0xb1c7c08b 1575800

Re: [libvirt] [PATCH v3 1/2] Optimize machine option to set more options with it

2013-04-03 Thread Eric Blake
On 04/03/2013 10:14 AM, John Ferlan wrote: >>> } else { >>> +virBuffer buf = VIR_BUFFER_INITIALIZER; >>> >>> virCommandAddArg(cmd, "-machine"); >>> -virBufferAsprintf(&buf, "%s", def->os.machine); >>> +virBufferAdd(&buf, def->os.machine, -1); >>> >>>

Re: [libvirt] [PATCH 2/3] Auto-add a root element to LXC containers on startup

2013-04-03 Thread Eric Blake
On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Currently the LXC container code has two codepaths, depending on > whether there is a element with a target path of '/'. > If we automatically add a device with src=/ and dst=/, > for any container which has not

Re: [libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Eric Blake
On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Early on kernel support for private devpts was not widespread, > so we had compatibiltiy codepaths. Such old kernels are not > seriously used for LXC these days, so the compat code can go > away > > Signed-off-by:

Re: [libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 10:59:04AM -0600, Eric Blake wrote: > On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > Early on kernel support for private devpts was not widespread, > > so we had compatibiltiy codepaths. Such old kernels are not > > seriously used

Re: [libvirt] [PATCH 3/3] Revert "lxc: Prevent shutting down the host"

2013-04-03 Thread Eric Blake
On 04/03/2013 10:02 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > This reverts commit c9c87376f2b2197ad774533ad6a6dd2f631ca105. > > Now that we force all containers to have a root filesystem, > there is no way the host's /dev is ever exposed > > Signed-off-by: Daniel P. Berrang

Re: [libvirt] [PATCH v3 2/2] Add USB option capability

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 10:14:15AM +0800, Li Zhang wrote: > On 2013年04月02日 18:06, Daniel P. Berrange wrote: > >On Fri, Mar 29, 2013 at 01:22:47PM +0800, Li Zhang wrote: > >>From: Li Zhang > >> > >>To avoid the collision for creating USB controllers in machine->init() > >>and -device xx command lin

Re: [libvirt] [PATCH v3 1/2] Optimize machine option to set more options with it

2013-04-03 Thread John Ferlan
On 04/02/2013 09:50 PM, Li Zhang wrote: > On 2013年04月02日 20:52, Eric Blake wrote: >> On 04/02/2013 04:05 AM, Daniel P. Berrange wrote: >>> On Fri, Mar 29, 2013 at 01:22:46PM +0800, Li Zhang wrote: From: Li Zhang Currently, -machine option is used only when dump-guest-core is set. >>

[libvirt] [PATCH 2/3] Auto-add a root element to LXC containers on startup

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Currently the LXC container code has two codepaths, depending on whether there is a element with a target path of '/'. If we automatically add a device with src=/ and dst=/, for any container which has not specified a root filesystem, then we only need one codepath fo

[libvirt] [PATCH 3/3] Revert "lxc: Prevent shutting down the host"

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" This reverts commit c9c87376f2b2197ad774533ad6a6dd2f631ca105. Now that we force all containers to have a root filesystem, there is no way the host's /dev is ever exposed Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_driver.c | 43

[libvirt] [PATCH 6/7] qemu: Add support for plugging devices into PCI bridges

2013-04-03 Thread Ján Tomko
Allow specifying addresses with non-zero buses in the XML. Check that the bridge topology results in their indexes matching the PCI buses they provide. --- src/qemu/qemu_command.c | 207 +--- src/qemu/qemu_command.h | 3 +- 2 files changed, 196 inserti

[libvirt] [PATCH 1/3] Remove support for old kernels lacking private devpts

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Early on kernel support for private devpts was not widespread, so we had compatibiltiy codepaths. Such old kernels are not seriously used for LXC these days, so the compat code can go away Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_controller.c | 28 +-

[libvirt] [PATCH 5/7] qemu: build command line for pci-bridge device

2013-04-03 Thread Ján Tomko
From: liguang --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 15 ++- tests/qemuhelptest.c | 21 ++--- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/

[libvirt] [PATCH 7/7] qemu: auto-add and use bridges

2013-04-03 Thread Ján Tomko
Add a "dry run" address allocation to figure out how many bridges will be needed for all the devices without explicit addresses. Auto-add just enough bridges to put all the devices on, or up to the bridge with the largest specified index. --- src/qemu/qemu_command.c | 138

[libvirt] [PATCH 3/7] qemu: switch PCI address set from hash table to an array

2013-04-03 Thread Ján Tomko
Each bus (just one so far) is represented by an array with 32 slots where each slot is stored as an 8-bit integer where each bit represents a function. This makes operations with whole slots easier. --- src/qemu/qemu_command.c | 152 +++- 1 file changed

[libvirt] [PATCH 4/7] add pci-bridge controller type

2013-04-03 Thread Ján Tomko
From: liguang add a new controller type, then one can define a pci-bridge controller like this: actually, it works as a pci-bus, so as to support multi-pci-bus via pci-to-pci bridge Signed-off-by: liguang --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c

[libvirt] [PATCH 2/7] qemu: move PCI address check out of qemuPCIAddressAsString

2013-04-03 Thread Ján Tomko
Move bus and domain checks from qemuPCIAddressAsString to a separate function and add a check for function and slot so that we can switch from a hash table to an array. Remove redundant checks in qemuBuildDeviceAddressStr. --- src/qemu/qemu_command.c | 111 +---

[libvirt] [PATCH 0/7] qemu: PCI bridge support

2013-04-03 Thread Ján Tomko
This series allows PCI bridges to be added and used. After patch 6/7 more buses are usable if the bridges and addresses are explicitly specified in the XML. After 7/7 bridges are auto-added and the new buses are used automatically. (This only works if there is enough space on bus 0 for the bridges,

[libvirt] [PATCH 1/7] qemu: QEMU_PCI constant consistency

2013-04-03 Thread Ján Tomko
Change QEMU_PCI_ADDRESS_LAST_SLOT to the number of slots in the bus, not the maximum slot value, to match QEMU_PCI_ADDRESS_LAST_FUNCTION. --- src/qemu/qemu_command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 69

[libvirt] [PATCH 3/7] Use VIR_ALLOC_VAR instead of VIR_ALLOC_N for creating virObject

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The current way virObject instances are allocated using VIR_ALLOC_N causes alignment warnings util/virobject.c: In function 'virObjectNew': util/virobject.c:195:11: error: cast increases required alignment of target type [-Werror=cast-align] Changing to use VIR_ALLOC

[libvirt] [PATCH 5/7] Disable cast-align warnings in various places

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" There are a number of places which generate cast alignment warnings, which are difficult or impossible to address. Use pragmas to disable the warnings in these few places conf/nwfilter_conf.c: In function 'virNWFilterRuleDetailsParse': conf/nwfilter_conf.c:1806:16: war

[libvirt] [PATCH 2/7] Avoid casts between unsigned char * and struct nlmsghdr

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The virNetlinkCommand() method takes an 'unsigned char **' parameter to be filled with the received netlink message. The callers then immediately cast this to 'struct nlmsghdr', triggering (bogus) warnings about increasing alignment requirements util/virnetdev.c: In fu

[libvirt] [PATCH 6/7] Disable of unused sysinfotest functions

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Certain functions in the sysinfotest.c are not used unless a whitelisted architecture is being built. Disable those functions unless required to avoid warnings about unused functions. sysinfotest.c:93:1: warning: 'sysinfotest_run' defined but not used [-Wunused-functi

[libvirt] [PATCH 0/7] Fix multiple compiler warnings on ARMv7

2013-04-03 Thread Daniel P. Berrange
The ARMv7 builds of libvirt generate a number of warnings, mostly about cast alignment http://arm.koji.fedoraproject.org/packages/libvirt/1.0.4/1.fc19/data/logs/armv7hl/build.log this patch series fixes as many as possible, and then disables warnings for the rest using a pragma -- libvir-list ma

[libvirt] [PATCH 4/7] Copy struct inotify_event entries to avoid alignment problems

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When reading the inotify FD, we get back a sequence of struct inotify_event, each with variable length data following. It is not safe to simply cast from the char *buf to the struct inotify_event struct since this may violate data alignment rules. Thus we must copy from

[libvirt] [PATCH 7/7] Avoid cast alignment warnings in port allocator test

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" To avoid virportallocatortest.c: In function 'bind': virportallocatortest.c:34:33: warning: cast increases required alignment of target type [-Wcast-align] struct sockaddr_in *saddr = (struct sockaddr_in *)addr; ^ Signed-off-by:

[libvirt] [PATCH 1/7] Rewrite keycode map to avoid a struct

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Playing games with field offsets in a struct causes all sorts of alignment warnings on ARM platforms util/virkeycode.c: In function '__virKeycodeValueFromString': util/virkeycode.c:26:7: warning: cast increases required alignment of target type [-Wcast-align] (*(

Re: [libvirt] [PATCH 13/16] Add InteractiveContainer support. First use case will be OpenShift.

2013-04-03 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 10:34:33AM -0400, Daniel J Walsh wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 04/03/2013 08:47 AM, Daniel P. Berrange wrote: > > On Tue, Apr 02, 2013 at 06:11:29PM -0400, Dan Walsh wrote: > >> Differentiating on which kind of container to create based off

Re: [libvirt] [PATCH v3 00/11] Add support for guests with TPM passthrough device

2013-04-03 Thread Stefan Berger
Is anyone planning on reviewing this series? I have forward-ported it now with some nits fixed on the way. Regards, Stefan On 03/21/2013 11:42 AM, Stefan Berger wrote: Hello! The following set of patches adds support to libvirt for adding a TPM passthrough device to a QEMU guest. Support

Re: [libvirt] [PATCH 2/2] qemu-blockjob: Fix limit of bandwidth for block jobs to supported value

2013-04-03 Thread Peter Krempa
On 04/03/13 15:32, Eric Blake wrote: On 04/03/2013 02:46 AM, Peter Krempa wrote: The JSON generator is able to represent only values less than LLONG_MAX, fix the bandwidth limit checks when converting to value to catch overflows before they reach the parser. --- src/qemu/qemu_monitor.c | 21 ++

Re: [libvirt] [PATCH 13/16] Add InteractiveContainer support. First use case will be OpenShift.

2013-04-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2013 08:47 AM, Daniel P. Berrange wrote: > On Tue, Apr 02, 2013 at 06:11:29PM -0400, Dan Walsh wrote: >> Differentiating on which kind of container to create based off of the >> >> --command == InteractiveContainer --unitfile == ServiceContai

Re: [libvirt] [PATCH 1/2] qemu-JSON: Error out if number is out of range instead of overflowing to negative

2013-04-03 Thread Peter Krempa
On 04/03/13 15:29, Eric Blake wrote: On 04/03/2013 02:46 AM, Peter Krempa wrote: Commit 78eb8b60d59662271c4a9a1be8c9002ee84dc8cf works around qemu's inability to parse unsigned 64 bit integers by representing them as signed. This introduces a bug where if the requested integer is greater than LL

Re: [libvirt] [PATCH 07/16] Change all internal functions that use __METHOD to use _METHOD. __METHOD's.

2013-04-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2013 07:28 AM, Daniel P. Berrange wrote: > On Tue, Apr 02, 2013 at 06:11:23PM -0400, Dan Walsh wrote: >> Python makes assumptions about __METHOD names that will break some of >> the other patches that I am adding, involving inheritance of clas

Re: [libvirt] (no subject)

2013-04-03 Thread Eric Blake
On 04/02/2013 04:11 PM, Dan Walsh wrote: > Most of them effect virt-sandbox-service, with the biggest change beeing the > addition of > InteractiveContainers. The subject line on the cover letter needs to be relevant to the rest of the series; using "(no subject)" is generally wrong. Also, sin

Re: [libvirt] [PATCH 2/2] qemu-blockjob: Fix limit of bandwidth for block jobs to supported value

2013-04-03 Thread Eric Blake
On 04/03/2013 02:46 AM, Peter Krempa wrote: > The JSON generator is able to represent only values less than LLONG_MAX, fix > the > bandwidth limit checks when converting to value to catch overflows before they > reach the parser. > --- > src/qemu/qemu_monitor.c | 21 - > 1 fil

Re: [libvirt] [PATCH 1/2] qemu-JSON: Error out if number is out of range instead of overflowing to negative

2013-04-03 Thread Eric Blake
On 04/03/2013 02:46 AM, Peter Krempa wrote: > Commit 78eb8b60d59662271c4a9a1be8c9002ee84dc8cf works around qemu's inability > to > parse unsigned 64 bit integers by representing them as signed. This > introduces a > bug where if the requested integer is greater than LLONG_MAX the result is > wrap

Re: [libvirt] [PATCH 04/16] This patch adds a -u UNITFILE qualifier to the virt-sandbox-service reload command.

2013-04-03 Thread Daniel P. Berrange
s/This patch adds/Adds/ in the subject On Tue, Apr 02, 2013 at 06:11:20PM -0400, Dan Walsh wrote: > The basic idea is to allow administrators or the systemd service to reload > units which are running within a container. If you have one or more units > defined Line wrapping is missing here >

Re: [libvirt] [PATCH 2/2] Enable full RELRO mode

2013-04-03 Thread Eric Blake
On 04/03/2013 05:41 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > By passing the flags -z relro -z now to the linker, we can force > it to resolve all library symbols at startup, instead of on-demand. > This allows it to then make the global offset table (GOT) read-only, > which

Re: [libvirt] [PATCH 1/2] Build all binaries with PIE

2013-04-03 Thread Eric Blake
On 04/03/2013 05:41 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > PIE (position independent executable) adds security to executables > by composing them entirely of position-independent code (PIC. The > .so libraries already build with -fPIC. This adds -fPIE which is > the equiva

Re: [libvirt] [PATCH 14/16] Listing running sandbox containers takes a long time using the current protocol.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:30PM -0400, Dan Walsh wrote: > So I am execing a virsh list command to show all of the running containers. > --- > bin/virt-sandbox-service | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/bin/virt-sandbox-service b/bin/virt

Re: [libvirt] [PATCH 13/16] Add InteractiveContainer support. First use case will be OpenShift.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:29PM -0400, Dan Walsh wrote: > Differentiating on which kind of container to create based off of the > > --command == InteractiveContainer > --unitfile == ServiceContainer > > Resorted create args to be shown aphabetically except for the --command and > --unitfile w

Re: [libvirt] [PATCH 12/16] Split Container class definition into Container Class and ServiceContainer Class.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:28PM -0400, Dan Walsh wrote: > This way we can share common methods between the ServiceContainer and the > InteractiveContainer > --- > bin/virt-sandbox-service | 823 > ++- > 1 file changed, 450 insertions(+), 373 deletion

Re: [libvirt] [libvirt-designer 2/3] Accept 'iso' format in gvir_designer_domain_add_disk_full()

2013-04-03 Thread Christophe Fergeau
On Tue, Apr 02, 2013 at 11:12:29AM +0100, Daniel P. Berrange wrote: > I don't think it is a good idea to overload 'format' for this purpose. > It is perfectly acceptable to back a CDROM device by a qcow2 files. > I think we should just have a gvir_designer_domain_add_cdrom() method > or some other

[libvirt] [PATCH 0/2] Improve security hardening of binaries

2013-04-03 Thread Daniel P. Berrange
Fedora has a "hardened build" option in RPM specfiles: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE While we could enable that in the RPM, this would only apply to Fedora. Thus these patches directly integrate it in libvirt's configure.ac / Makefile.am files. With these 2 patches all

[libvirt] [PATCH 2/2] Enable full RELRO mode

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" By passing the flags -z relro -z now to the linker, we can force it to resolve all library symbols at startup, instead of on-demand. This allows it to then make the global offset table (GOT) read-only, which makes some security attacks harder. Signed-off-by: Daniel P.

[libvirt] [PATCH 1/2] Build all binaries with PIE

2013-04-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" PIE (position independent executable) adds security to executables by composing them entirely of position-independent code (PIC. The .so libraries already build with -fPIC. This adds -fPIE which is the equivalent to -fPIC, but for executables. This for allows Exec Shiel

[libvirt] [libvirt-designer PATCHv2] Add support for floppies and CDROMs

2013-04-03 Thread Christophe Fergeau
This mirrors disk_file/disk_device API so that it's possible to add CDROMs and floppies to a GVirDesignerDomain. This also adds the corresponding -C/-F options to virtxml --- Here is a reworked version of my patch to add support for CDROMs which does not override the 'format' parameter this time.

Re: [libvirt] [PATCH 16/16] Add cehck for execute command, since it will only work in lxc containers

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:32PM -0400, Dan Walsh wrote: Typo in commit message & it is also too long. > --- > bin/virt-sandbox-service | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service > index 1cce6a5..fe659e2 100

Re: [libvirt] [PATCH 15/16] Use args.uri rather then hard coding lxc:///

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:31PM -0400, Dan Walsh wrote: > --- > bin/virt-sandbox-service | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service > index ceb05b3..1cce6a5 100755 > --- a/bin/virt-sandbox-service > +++ b/bin

Re: [libvirt] [PATCH 11/16] Change makedirs and makefiles to be internal methods

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:27PM -0400, Dan Walsh wrote: > --- > bin/virt-sandbox-service | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) Per my earlier comments, I'd rather not use "_" anywhere here. Daniel -- |: http://berrange.com -o-http://www.fli

Re: [libvirt] [PATCH 10/16] Change variable name to be more specific to avoid confusion

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:26PM -0400, Dan Walsh wrote: > Signed-off-by: Dan Walsh > --- > bin/virt-sandbox-service | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service > index ca472f5..f32fd4a 100755 > --- a

Re: [libvirt] [PATCH 09/16] GlibGerror can be raised by virt-sandbox-service, need to catch and write to stderr

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:25PM -0400, Dan Walsh wrote: Again, bad subject line which is too long. > Signed-off-by: Dan Walsh > --- > bin/virt-sandbox-service | 4 > 1 file changed, 4 insertions(+) > > diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service > index b816933..ca

Re: [libvirt] [PATCH 07/16] Change all internal functions that use __METHOD to use _METHOD. __METHOD's.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:23PM -0400, Dan Walsh wrote: > Python makes assumptions about __METHOD names that will break some of the > other patches that I am adding, involving inheritance of classes. The > _METHODS are > treated the same as any methods, but still give maintainers an idea that

Re: [libvirt] [PATCH 08/16] Move CONFIG_PATH to external from the Class, so you will not need a to create a container to get the path

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:24PM -0400, Dan Walsh wrote: The subject line is too long again. Please re-write with a short first line, then a blank line, and then the full description > Signed-off-by: Dan Walsh > --- > bin/virt-sandbox-service | 13 + > 1 file changed, 9 insertions

Re: [libvirt] [PATCH 06/16] Wrap all output strings with _() to make sure we get proper translations.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:22PM -0400, Dan Walsh wrote: > Signed-off-by: Dan Walsh > --- > bin/virt-sandbox-service | 48 > > 1 file changed, 24 insertions(+), 24 deletions(-) Well, we haven't enabled localization at all in libvirt-sandbox, bu

Re: [libvirt] [PATCH 05/16] The command option is --copy not --clone

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:21PM -0400, Dan Walsh wrote: > Signed-off-by: Dan Walsh > --- > bin/virt-sandbox-service-create.pod | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/bin/virt-sandbox-service-create.pod > b/bin/virt-sandbox-service-create.pod > index 1f

Re: [libvirt] [PATCH 03/16] bash_completion scripts have added a new way to do completions, where you place you scripts in /usr/share/bash_completion/completions rather then /etc/bash_completions.d. W

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:19PM -0400, Dan Walsh wrote: GIT commit messages should have one initial line less than 70 characters, then a blank line, then the body of the commit message. This avoids getting crazy subject lines like you have here. > Signed-off-by: Dan Walsh > --- > bin/Makefil

Re: [libvirt] [PATCH 02/16] Current virt-sandbox-service-util only supports service sandbox/containers

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:18PM -0400, Dan Walsh wrote: > We need to add support for interactive sandbox/containers for OpenShift. > > This patch will create the correct container type based off the > /etc/libvirt-sandbox/service/* > > Signed-off-by: Dan Walsh > --- > bin/virt-sandbox-servi

Re: [libvirt] [PATCH 01/16] Free memory on exit, fixes a problem found by coverity.

2013-04-03 Thread Daniel P. Berrange
On Tue, Apr 02, 2013 at 06:11:17PM -0400, Dan Walsh wrote: > Signed-off-by: Dan Walsh > --- > bin/virt-sandbox-service-util.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/bin/virt-sandbox-service-util.c b/bin/virt-sandbox-service-util.c > index 4d164d8..430518

Re: [libvirt] libvirtd segfault

2013-04-03 Thread AL13N
> AL13N wrote: >> Op woensdag 20 maart 2013 08:42:52 schreef Jim Fehlig: >> >>> AL13N wrote: >>> Thread 1 (Thread 0x7fdef683b800 (LWP 20522)): #0 0x in ?? () #1 0x7fdee9a72dc7 in libxl_osevent_occurred_timeout (ctx=>>> out>, for_libxl=0x7fdedc001608) at lib

Re: [libvirt] Networking options in libvirt_lxc

2013-04-03 Thread Purcareata Bogdan-B43198
Hello, Thank you for the fast and detailed clarifications! I have some more questions, please find them inline. Best regards, Bogdan P. > -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Wednesday, April 03, 2013 1:12 PM > To: Purcareata Bogdan-B43198

  1   2   >