Re: [libvirt] [PATCH RFC 0/2] Report OOM on VIR_ALLOC failure

2013-03-22 Thread Laine Stump
On 03/22/2013 07:44 AM, Michal Privoznik wrote: > Currently, our code is plenty of following scheme: > > if (VIR_ALLOC(dummyPtr) < 0) { > virReportOOMError(); > goto cleanup; > } > > or something similar. What if we just move the OOM reporting into > VIR_ALLOC? One thing you might

Re: [libvirt] [PATCH] storage: fix unlikely memory leak in rbd backend

2013-03-22 Thread Laine Stump
On 03/18/2013 06:28 PM, Eric Blake wrote: > On 03/18/2013 02:07 PM, Laine Stump wrote: >> virStorageBackendRBDRefreshPool() first allocates an array big enough >> to hold 1024 names, then calls rbd_list(), which returns ERANGE if the >> array isn't big enough. When that happens, the VIR_ALLOC_N is

Re: [libvirt] [PATCH] virsh: Fix docs for "virsh setmaxmem"

2013-03-22 Thread Eric Blake
On 03/22/2013 04:08 AM, Peter Krempa wrote: > The docs assumed the command works always for QEMU and other > hypervisors. Unfortunately until qemu will add memory hotplug > this can't be done. Fix the docs to mention this limitation. The setmaxmem command controls balloon size, not memory hotplug.

Re: [libvirt] [PATCH] Make virsh support '~' and '$HOME' in interactive mode

2013-03-22 Thread Eric Blake
On 03/22/2013 03:34 AM, Christophe Fergeau wrote: > On Thu, Mar 21, 2013 at 09:43:02PM -0600, Eric Blake wrote: >> Expanding everything means re-implementing what the shell does. >> wordexp() would be ideal for this, except that wordexp() is not portable >> enough. > > Maybe wordexp() could be use

[libvirt] [PATCH v3] nwfilter: probe for inverted ctdir

2013-03-22 Thread Stefan Berger
Linux netfilter at some point inverted the meaning of the '--ctdir reply' and newer netfilter implementations now expect '--ctdir original' instead and vice-versa. We probe for this netfilter change via a UDP message over loopback and 3 filtering rules applied to INPUT two times, one time with '--

[libvirt] [PATCH v5] qemu: Allow migration over IPv6

2013-03-22 Thread Ján Tomko
Allow migration over IPv6 by listening on [::] instead of 0.0.0.0 when QEMU supports it (QEMU_CAPS_IPV6_MIGRATION) and there is at least one v6 address configured on the system. Use virURIParse in qemuMigrationPrepareDirect to allow parsing IPv6 addresses, which would cause an 'incorrect :port' er

Re: [libvirt] [PATCH v2] nwfilter: probe for inverted ctdir

2013-03-22 Thread Stefan Berger
On 03/22/2013 02:29 PM, Laine Stump wrote: On 03/22/2013 08:26 AM, Stefan Berger wrote: Linux netfilter at some point inverted the meaning of the '--ctdir reply' and newer netfilter implementations now expect '--ctdir original' instead and vice-versa. We probe for this netfilter change via a UDP

Re: [libvirt] [PATCH v2] nwfilter: probe for inverted ctdir

2013-03-22 Thread Laine Stump
On 03/22/2013 08:26 AM, Stefan Berger wrote: > Linux netfilter at some point inverted the meaning of the '--ctdir reply' > and newer netfilter implementations now expect '--ctdir original' > instead and vice-versa. > We probe for this netfilter change via a UDP message over loopback and 3 > filteri

Re: [libvirt] [PATCH v2] nwfilter: probe for inverted ctdir

2013-03-22 Thread Stefan Berger
On 03/22/2013 02:04 PM, Daniel P. Berrange wrote: On Fri, Mar 22, 2013 at 01:58:50PM -0400, Stefan Berger wrote: On 03/22/2013 01:49 PM, Daniel P. Berrange wrote: On Fri, Mar 22, 2013 at 08:26:59AM -0400, Stefan Berger wrote: Linux netfilter at some point inverted the meaning of the '--ctdir r

Re: [libvirt] [PATCH v2] nwfilter: probe for inverted ctdir

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 01:58:50PM -0400, Stefan Berger wrote: > On 03/22/2013 01:49 PM, Daniel P. Berrange wrote: > >On Fri, Mar 22, 2013 at 08:26:59AM -0400, Stefan Berger wrote: > >>Linux netfilter at some point inverted the meaning of the '--ctdir reply' > >>and newer netfilter implementations

Re: [libvirt] [PATCH v2] nwfilter: probe for inverted ctdir

2013-03-22 Thread Stefan Berger
On 03/22/2013 01:49 PM, Daniel P. Berrange wrote: On Fri, Mar 22, 2013 at 08:26:59AM -0400, Stefan Berger wrote: Linux netfilter at some point inverted the meaning of the '--ctdir reply' and newer netfilter implementations now expect '--ctdir original' instead and vice-versa. We probe for this n

[libvirt] [PATCH v2] qemu: Don't set address type too early during virtio disk hotplug

2013-03-22 Thread Guido Günther
f946462e14ac036357b7c11ce5c23f94a3ee4e49 changed behavior by settings VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI upfront. If we do so before invoking qemuDomainPCIAddressEnsureAddr we merely try to set the PCI slot via qemuDomainPCIAddressReserveSlot instead reserving a new address via qemuDomainPCIAddress

Re: [libvirt] [PATCH v2] nwfilter: probe for inverted ctdir

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 08:26:59AM -0400, Stefan Berger wrote: > Linux netfilter at some point inverted the meaning of the '--ctdir reply' > and newer netfilter implementations now expect '--ctdir original' > instead and vice-versa. > We probe for this netfilter change via a UDP message over loopba

Re: [libvirt] [PATCH RFC 2/2] util: Don't report OOM twice

2013-03-22 Thread Michal Privoznik
On 22.03.2013 18:32, Stefan Berger wrote: > On 03/22/2013 07:44 AM, Michal Privoznik wrote: >> Adapt code under src/util/ to fact, that VIR_ALLOC* now reports OOM >> error. There is no need to report it twice now. >> --- > > Maybe an sed script could help here at least in removing the > virReport

Re: [libvirt] [PATCH 1/5] Rename virCgroupGetAppRoot to virCgroupForSelf

2013-03-22 Thread Stefan Berger
On 03/22/2013 10:28 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" The virCgroupGetAppRoot is not clear in its meaning. Change to virCgroupForSelf to highlight that this returns the cgroup config for the caller's process Signed-off-by: Daniel P. Berrange --- src/libvirt_private.sy

Re: [libvirt] [PATCH RFC 2/2] util: Don't report OOM twice

2013-03-22 Thread Stefan Berger
On 03/22/2013 07:44 AM, Michal Privoznik wrote: Adapt code under src/util/ to fact, that VIR_ALLOC* now reports OOM error. There is no need to report it twice now. --- src/util/iohelper.c | 4 +--- src/util/virauthconfig.c | 8 ++-- src/util/vircommand.c

Re: [libvirt] Problems with

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 11:59:56AM +, Daniel P. Berrange wrote: > On Thu, Mar 21, 2013 at 11:50:40PM -0500, Doug Goldstein wrote: > > So still trying to figure out what I'm doing wrong with LXC because I > > just can't get any joy. So I'll go one issue at a time. > > > > The following VM defin

Re: [libvirt] [PATCH RFC 1/2] viralloc: Report OOM error on failure

2013-03-22 Thread Stefan Berger
On 03/22/2013 07:44 AM, Michal Privoznik wrote: In nearly all cases of calling VIR_ALLOC*, VIR_REALLOC_N, VIR_EXPAND_N, VIR_RESIZE_N, VIR_*_ELEMENT etc. we want to report OOM error, so our source code base is full of: if (VIR_ALLOC(somePtr) < 0) { virReportOOMError(); goto clean

Re: [libvirt] [PATCH] Fix free of uninitialized value in LXC numad setup

2013-03-22 Thread Stefan Berger
On 03/22/2013 07:45 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" The 'nodeset' variable was never initialized, causing a later VIR_FREE(nodeset) to free uninitialized memory. Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_controller.c | 2 +- 1 file changed, 1 insertion(+),

Re: [libvirt] [PATCH] Ensure root filesystem is mounted if a file/block mount.

2013-03-22 Thread Stefan Berger
On 03/22/2013 10:24 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" For a root filesystem with type=file or type=block, the LXC container was forgetting to actually mount it, before doing the pivot root step. Signed-off-by: Daniel P. Berrange --- ACK -- libvir-list mailing list li

Re: [libvirt] [PATCH] Mount temporary devpts on /var/lib/libvirt/lxc/$NAME.devpts

2013-03-22 Thread Stefan Berger
On 03/22/2013 10:24 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" Currently the lxc controller sets up the devpts instance on $rootfsdef->src, but this only works if $rootfsdef is using type=mount. To support type=block or type=file for the root filesystem, we must use /var/lib/libvi

Re: [libvirt] [PATCH] lxc: Prevent shutting down the host

2013-03-22 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 04:10:45PM +0100, Martin Kletzander wrote: > When the container has the same '/dev' mount as host (no chroot), > calling domainShutdown(WithFlags) shouldn't shutdown the host it is > running on. > > Signed-off-by: Martin Kletzander > --- > This is also valid for 1.0.[23]-m

Re: [libvirt] [PATCH] Move FUSE mount to /var/lib/libvirt/lxc/$NAME.fuse

2013-03-22 Thread Stefan Berger
On 03/22/2013 10:24 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" Instead of using /var/lib/libvirt/lxc/$NAME for the FUSE filesystem, use /var/lib/libvirt/lxc/$NAME.fuse. This allows room for other temporary mounts in the same directory --- src/lxc/lxc_container.c | 2 +- src/lxc

Re: [libvirt] [PATCH V2] Fix parsing of bond interface XML

2013-03-22 Thread Jim Fehlig
Jim Fehlig wrote: > Eric Blake wrote: > >> On 03/21/2013 05:13 PM, Jim Fehlig wrote: >> >> >>> Noticed that parsing bond interface XML containing the miimon element >>> fails >>> >>> >>> ... >>> >>> >>> ... >>> >>> >>> >>> This configuration does not cont

Re: [libvirt] Schedule for the next release suggestions

2013-03-22 Thread Michal Privoznik
On 22.03.2013 15:38, Daniel Veillard wrote: > On Fri, Mar 22, 2013 at 02:23:34PM +, Daniel P. Berrange wrote: >> On Fri, Mar 22, 2013 at 10:17:07PM +0800, Daniel Veillard wrote: >>> On Fri, Mar 22, 2013 at 02:07:05PM +, Daniel P. Berrange wrote: On Fri, Mar 22, 2013 at 09:36:03PM +0800

Re: [libvirt] [PATCH] Ensure root filesystem is mounted if a file/block mount.

2013-03-22 Thread Michal Privoznik
On 22.03.2013 15:24, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > For a root filesystem with type=file or type=block, the LXC > container was forgetting to actually mount it, before doing > the pivot root step. > > Signed-off-by: Daniel P. Berrange > --- > src/lxc/lxc_container.c

Re: [libvirt] [PATCH] Move FUSE mount to /var/lib/libvirt/lxc/$NAME.fuse

2013-03-22 Thread Michal Privoznik
On 22.03.2013 15:24, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Instead of using /var/lib/libvirt/lxc/$NAME for the FUSE > filesystem, use /var/lib/libvirt/lxc/$NAME.fuse. This allows > room for other temporary mounts in the same directory > --- > src/lxc/lxc_container.c | 2 +- >

Re: [libvirt] [PATCH] Mount temporary devpts on /var/lib/libvirt/lxc/$NAME.devpts

2013-03-22 Thread Michal Privoznik
On 22.03.2013 15:24, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Currently the lxc controller sets up the devpts instance on > $rootfsdef->src, but this only works if $rootfsdef is using > type=mount. To support type=block or type=file for the root > filesystem, we must use /var/li

Re: [libvirt] Schedule for the next release suggestions

2013-03-22 Thread Daniel Veillard
On Fri, Mar 22, 2013 at 02:23:34PM +, Daniel P. Berrange wrote: > On Fri, Mar 22, 2013 at 10:17:07PM +0800, Daniel Veillard wrote: > > On Fri, Mar 22, 2013 at 02:07:05PM +, Daniel P. Berrange wrote: > > > On Fri, Mar 22, 2013 at 09:36:03PM +0800, Daniel Veillard wrote: > > > > The 1.0.3 r

[libvirt] [PATCH 2/5] Don't create dirs in cgroup controllers we don't want to use

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Currently when getting an instance of virCgroupPtr we will create the path in all cgroup controllers. Only at the virt driver layer are we attempting to filter controllers. This is bad because the mere act of creating the dirs in the controllers can have a functional im

[libvirt] [PATCH 5/5] Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Instead of calling virCgroupForDomain every time we need the virCgrouPtr instance, just do it once at Vm startup and cache a reference to the object in virLXCDomainObjPrivatePtr until shutdown of the VM. Removing the virCgroupPtr from the LXC driver state also means we

[libvirt] [PATCH 1/5] Rename virCgroupGetAppRoot to virCgroupForSelf

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The virCgroupGetAppRoot is not clear in its meaning. Change to virCgroupForSelf to highlight that this returns the cgroup config for the caller's process Signed-off-by: Daniel P. Berrange --- src/libvirt_private.syms | 2 +- src/lxc/lxc_cgroup.c | 2 +- src/util/

[libvirt] [PATCH 3/5] Rename virCgroupMounted to virCgroupHasController & make it more robust

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The virCgroupMounted method is badly named, since a controller can be mounted, but disabled in the current object. Rename the method to be virCgroupHasController. Also make it tolerant to a NULL virCgroupPtr and out-of-range controller index, to avoid duplication of th

[libvirt] [PATCH 0/5] Refactoring of cgroups usage

2013-03-22 Thread Daniel P. Berrange
Currently libvirtd creates its basic cgroup hierarchy when it starts up. This is bad because if people mount cgroups after libvirtd it is running it doesn't detect this. The second issue is that the driver code re-creates the virCgroupPtr instance for a domain over & over again, which is inefficien

[libvirt] [PATCH] Ensure root filesystem is mounted if a file/block mount.

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" For a root filesystem with type=file or type=block, the LXC container was forgetting to actually mount it, before doing the pivot root step. Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_container.c | 52 + 1 file c

[libvirt] [PATCH] Mount temporary devpts on /var/lib/libvirt/lxc/$NAME.devpts

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Currently the lxc controller sets up the devpts instance on $rootfsdef->src, but this only works if $rootfsdef is using type=mount. To support type=block or type=file for the root filesystem, we must use /var/lib/libvirt/lxc/$NAME.devpts for the temporary devpts mount i

[libvirt] [PATCH] Move FUSE mount to /var/lib/libvirt/lxc/$NAME.fuse

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Instead of using /var/lib/libvirt/lxc/$NAME for the FUSE filesystem, use /var/lib/libvirt/lxc/$NAME.fuse. This allows room for other temporary mounts in the same directory --- src/lxc/lxc_container.c | 2 +- src/lxc/lxc_fuse.c | 2 +- 2 files changed, 2 insertions

Re: [libvirt] Schedule for the next release suggestions

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 10:17:07PM +0800, Daniel Veillard wrote: > On Fri, Mar 22, 2013 at 02:07:05PM +, Daniel P. Berrange wrote: > > On Fri, Mar 22, 2013 at 09:36:03PM +0800, Daniel Veillard wrote: > > > The 1.0.3 release was on the 5th March, and right now we have > > > accumulated 'only'

Re: [libvirt] Schedule for the next release suggestions

2013-03-22 Thread Daniel Veillard
On Fri, Mar 22, 2013 at 02:07:05PM +, Daniel P. Berrange wrote: > On Fri, Mar 22, 2013 at 09:36:03PM +0800, Daniel Veillard wrote: > > The 1.0.3 release was on the 5th March, and right now we have > > accumulated 'only' 150 commits since the release. Based on this I > > would suggest to wait

Re: [libvirt] Schedule for the next release suggestions

2013-03-22 Thread Daniel Veillard
On Fri, Mar 22, 2013 at 02:50:22PM +0100, Michal Privoznik wrote: > On 22.03.2013 14:36, Daniel Veillard wrote: > > The 1.0.3 release was on the 5th March, and right now we have > > accumulated 'only' 150 commits since the release. Based on this I > > would suggest to wait a couple of weeks befor

Re: [libvirt] Schedule for the next release suggestions

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 09:36:03PM +0800, Daniel Veillard wrote: > The 1.0.3 release was on the 5th March, and right now we have > accumulated 'only' 150 commits since the release. Based on this I > would suggest to wait a couple of weeks before to enter a freeze > for the following release. This

Re: [libvirt] Schedule for the next release suggestions

2013-03-22 Thread Michal Privoznik
On 22.03.2013 14:36, Daniel Veillard wrote: > The 1.0.3 release was on the 5th March, and right now we have > accumulated 'only' 150 commits since the release. Based on this I > would suggest to wait a couple of weeks before to enter a freeze > for the following release. This mean we drift from t

[libvirt] Schedule for the next release suggestions

2013-03-22 Thread Daniel Veillard
The 1.0.3 release was on the 5th March, and right now we have accumulated 'only' 150 commits since the release. Based on this I would suggest to wait a couple of weeks before to enter a freeze for the following release. This mean we drift from the usual end of month, but the ratio of freeze/devel

Re: [libvirt] Build failed in Jenkins: libvirt-syntax-check #759

2013-03-22 Thread Guido Günther
On Fri, Mar 22, 2013 at 02:10:59PM +0100, Guido Günther wrote: [..snip..] > > > prohibit_argmatch_without_use > > > grep: write error > > > grep: write error > > > sed: couldn't write 1 item to stdout: Broken pipe > > > sed: couldn't write 49 items to stdout: Broken pipe > > > 0.58 prohibit_argmat

Re: [libvirt] Build failed in Jenkins: libvirt-syntax-check #759

2013-03-22 Thread Guido Günther
On Fri, Mar 22, 2013 at 02:10:59PM +0100, Guido Günther wrote: > On Fri, Mar 22, 2013 at 06:18:48AM -0600, Eric Blake wrote: > > On 03/21/2013 09:54 PM, Jenkins CI wrote: > > > See > > > > > > -- >

Re: [libvirt] Build failed in Jenkins: libvirt-syntax-check #759

2013-03-22 Thread Guido Günther
On Fri, Mar 22, 2013 at 06:18:48AM -0600, Eric Blake wrote: > On 03/21/2013 09:54 PM, Jenkins CI wrote: > > See > > > > -- > > Started by upstream project "libvirt-build" build number 856 > > [work

[libvirt] [PATCH] [TCK] nwfilter: probe for inverted ctdir

2013-03-22 Thread Stefan Berger
Linux netfilter at some point inverted the meaning of the '--ctdir reply' and newer netfilter implementations now expect '--ctdir original' instead and vice-versa. We probe for this netfilter change via an IMCP message over loopback and 3 filtering rules applied to INPUT. If the sent byte arrives,

[libvirt] [PATCH v2] nwfilter: probe for inverted ctdir

2013-03-22 Thread Stefan Berger
Linux netfilter at some point inverted the meaning of the '--ctdir reply' and newer netfilter implementations now expect '--ctdir original' instead and vice-versa. We probe for this netfilter change via a UDP message over loopback and 3 filtering rules applied to INPUT. If the sent byte arrives, t

Re: [libvirt] [PATCH RFC 0/2] Report OOM on VIR_ALLOC failure

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 12:44:55PM +0100, Michal Privoznik wrote: > Currently, our code is plenty of following scheme: > > if (VIR_ALLOC(dummyPtr) < 0) { > virReportOOMError(); > goto cleanup; > } > > or something similar. What if we just move the OOM reporting into > VIR_ALLOC? I

Re: [libvirt] [PATCH] Fix thread safety in LXC callback handling

2013-03-22 Thread Michal Privoznik
On 22.03.2013 13:11, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Some of the LXC callbacks did not lock the virDomainObjPtr > instance. This caused transient errors like > > error: Failed to start domain busy-mount > error: cannot rename file '/var/run/libvirt/lxc/busy-mount.xml.n

Re: [libvirt] Build failed in Jenkins: libvirt-syntax-check #759

2013-03-22 Thread Eric Blake
On 03/21/2013 09:54 PM, Jenkins CI wrote: > See > > -- > Started by upstream project "libvirt-build" build number 856 > [workspace] $ /bin/sh -xe /tmp/hudson8330114436432330964.sh > + make syntax-c

Re: [libvirt] [PATCH] Remove bogus filtering from virDomainGetRootFilesystem

2013-03-22 Thread Michal Privoznik
On 22.03.2013 13:10, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The virDomainGetRootFilesystem was only returning filesystems > with type=mount. This is bogus - any type of filesystem is > valid as the root, if dst=/. > > Signed-off-by: Daniel P. Berrange > --- > src/conf/domai

Re: [libvirt] [PATCH] virsh: don't print --(null) in vol-name and vol-pool

2013-03-22 Thread Ján Tomko
On 03/22/2013 12:58 PM, Michal Privoznik wrote: > On 22.03.2013 12:51, Ján Tomko wrote: >> Don't print the pool option name if it's null. >> >> Before: >> virsh # vol-name vol >> error: failed to get vol 'vol', specifying --(null) might help >> error: Storage volume not found: no storage vol with m

[libvirt] [PATCH] Fix thread safety in LXC callback handling

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Some of the LXC callbacks did not lock the virDomainObjPtr instance. This caused transient errors like error: Failed to start domain busy-mount error: cannot rename file '/var/run/libvirt/lxc/busy-mount.xml.new' as '/var/run/libvirt/lxc/busy-mount.xml': No such file o

[libvirt] [PATCH] Remove bogus filtering from virDomainGetRootFilesystem

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The virDomainGetRootFilesystem was only returning filesystems with type=mount. This is bogus - any type of filesystem is valid as the root, if dst=/. Signed-off-by: Daniel P. Berrange --- src/conf/domain_conf.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sr

[libvirt] [PATCH] util: fix virAllocVar's comment

2013-03-22 Thread Ján Tomko
--- Pushed under the trivial rule. src/util/viralloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/viralloc.c b/src/util/viralloc.c index 342b0eb..8f219bf 100644 --- a/src/util/viralloc.c +++ b/src/util/viralloc.c @@ -389,7 +389,7 @@ virDeleteElementsN(void *ptrpt

Re: [libvirt] Problems with

2013-03-22 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 11:50:40PM -0500, Doug Goldstein wrote: > So still trying to figure out what I'm doing wrong with LXC because I > just can't get any joy. So I'll go one issue at a time. > > The following VM definition: > > testdeb > df03b2ce-725a-42e2-39e4-d646be8facb3 > 332768 >

Re: [libvirt] [PATCH] virsh: don't print --(null) in vol-name and vol-pool

2013-03-22 Thread Michal Privoznik
On 22.03.2013 12:51, Ján Tomko wrote: > Don't print the pool option name if it's null. > > Before: > virsh # vol-name vol > error: failed to get vol 'vol', specifying --(null) might help > error: Storage volume not found: no storage vol with matching path vol > > After: > > virsh # vol-name vol

[libvirt] [PATCH] virsh: don't print --(null) in vol-name and vol-pool

2013-03-22 Thread Ján Tomko
Don't print the pool option name if it's null. Before: virsh # vol-name vol error: failed to get vol 'vol', specifying --(null) might help error: Storage volume not found: no storage vol with matching path vol After: virsh # vol-name vol error: failed to get vol 'vol' error: Storage volume not f

[libvirt] [PATCH RFC 1/2] viralloc: Report OOM error on failure

2013-03-22 Thread Michal Privoznik
In nearly all cases of calling VIR_ALLOC*, VIR_REALLOC_N, VIR_EXPAND_N, VIR_RESIZE_N, VIR_*_ELEMENT etc. we want to report OOM error, so our source code base is full of: if (VIR_ALLOC(somePtr) < 0) { virReportOOMError(); goto cleanup; } or similar. Moreover, for those few cases wh

[libvirt] [PATCH RFC 2/2] util: Don't report OOM twice

2013-03-22 Thread Michal Privoznik
Adapt code under src/util/ to fact, that VIR_ALLOC* now reports OOM error. There is no need to report it twice now. --- src/util/iohelper.c | 4 +--- src/util/virauthconfig.c | 8 ++-- src/util/vircommand.c| 13 +++-- src/util/virconf.c

[libvirt] [PATCH RFC 0/2] Report OOM on VIR_ALLOC failure

2013-03-22 Thread Michal Privoznik
Currently, our code is plenty of following scheme: if (VIR_ALLOC(dummyPtr) < 0) { virReportOOMError(); goto cleanup; } or something similar. What if we just move the OOM reporting into VIR_ALLOC? It would have three nice features: 1) sizeof(code base) gets lower. A lot lower. 2)

[libvirt] [PATCH] Fix free of uninitialized value in LXC numad setup

2013-03-22 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The 'nodeset' variable was never initialized, causing a later VIR_FREE(nodeset) to free uninitialized memory. Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Pushed under trivial rule diff --git a

Re: [libvirt] [PATCH] viralloc: Export virAllocTest*

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 11:15:14AM +0100, Michal Privoznik wrote: > If users build with --enable-test-oom configure option, > they get this error saying, virAllocTest* functions are > not defined within tests/testutils.c. > --- > src/libvirt_private.syms | 4 > src/util/viralloc.c | 24

Re: [libvirt] [libvirt-designer] Add GvirDesignerDomain::osinfo-db

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 11:11:30AM +0100, Christophe Fergeau wrote: > virtxml was doing its own loading of the libosinfo database, > and gvir_designer_init() was loading it a second time. > By adding a GVirDesignerDomain::osinfo_db property, applications > can share the same OsinfoDb as libvirt-des

Re: [libvirt] [libvirt-sandbox][PATCH] Avoid segfault in gvir_sandbox_config_add_host_include_file

2013-03-22 Thread Daniel P. Berrange
On Fri, Mar 22, 2013 at 05:38:23PM +0800, Alex Jia wrote: > RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=924574 > > Valgrind defects memory error: > > ==19297== Invalid free() / delete / delete[] / realloc() > ==19297==at 0x4A077A6: free (vg_replace_malloc.c:446) > ==19297==by 0x350F

Re: [libvirt] [libvirt-designer] Add GvirDesignerDomain::osinfo-db

2013-03-22 Thread Christophe Fergeau
On Fri, Mar 22, 2013 at 11:22:20AM +0100, Michal Privoznik wrote: > On 22.03.2013 11:11, Christophe Fergeau wrote: > > virtxml was doing its own loading of the libosinfo database, > > and gvir_designer_init() was loading it a second time. > > By adding a GVirDesignerDomain::osinfo_db property, appl

Re: [libvirt] [libvirt-designer] Add GvirDesignerDomain::osinfo-db

2013-03-22 Thread Michal Privoznik
On 22.03.2013 11:11, Christophe Fergeau wrote: > virtxml was doing its own loading of the libosinfo database, > and gvir_designer_init() was loading it a second time. > By adding a GVirDesignerDomain::osinfo_db property, applications > can share the same OsinfoDb as libvirt-designer. The associatio

[libvirt] [PATCH] viralloc: Export virAllocTest*

2013-03-22 Thread Michal Privoznik
If users build with --enable-test-oom configure option, they get this error saying, virAllocTest* functions are not defined within tests/testutils.c. --- src/libvirt_private.syms | 4 src/util/viralloc.c | 24 src/util/viralloc.h | 7 --- tests/testuti

[libvirt] [libvirt-designer] Add GvirDesignerDomain::osinfo-db

2013-03-22 Thread Christophe Fergeau
virtxml was doing its own loading of the libosinfo database, and gvir_designer_init() was loading it a second time. By adding a GVirDesignerDomain::osinfo_db property, applications can share the same OsinfoDb as libvirt-designer. The association is made per libvirt-designer domain for more flexibil

[libvirt] [PATCH] qemu: Don't set type too earla during virtio disk hotplug

2013-03-22 Thread Guido Günther
f946462e14ac036357b7c11ce5c23f94a3ee4e49 changed behaviour by settings VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI upfront. If we do so before invoking qemuDomainPCIAddressEnsureAddr we merely try to set the PCI slot via qemuDomainPCIAddressReserveSlot instead reserving a new address via qemuDomainPCIAddres

Re: [libvirt] doc: write separate module for hostdev passthrough and in-use tracking

2013-03-22 Thread Osier Yang
On 2013年03月22日 17:36, Chunyan Liu wrote: Hi, List, As the mail I've sent a week before: https://www.redhat.com/archives/libvir-list/2013-March/msg00730.html I'm willing to push this work forward so that the passthrough APIs could be reused by qemu driver and libxl driver (which doesn't support p

[libvirt] [PATCH] virsh: Fix docs for "virsh setmaxmem"

2013-03-22 Thread Peter Krempa
The docs assumed the command works always for QEMU and other hypervisors. Unfortunately until qemu will add memory hotplug this can't be done. Fix the docs to mention this limitation. --- tools/virsh.pod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/

Re: [libvirt] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'

2013-03-22 Thread Yin Olivia-R63875
Hi Doug, Thanks for your help. qemu+tcp could work now after enabling listen_tcp in /etc/libvirt/libvirtd.conf. user@x86:~$ virsh -c qemu+tcp://10.193.20.109/system list --all IdName State 2 test

[libvirt] [libvirt-sandbox][PATCH] Avoid segfault in gvir_sandbox_config_add_host_include_file

2013-03-22 Thread Alex Jia
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=924574 Valgrind defects memory error: ==19297== Invalid free() / delete / delete[] / realloc() ==19297==at 0x4A077A6: free (vg_replace_malloc.c:446) ==19297==by 0x350F24D79E: g_free (in /usr/lib64/libglib-2.0.so.0.3400.2) ==19297==by 0

[libvirt] doc: write separate module for hostdev passthrough and in-use tracking

2013-03-22 Thread Chunyan Liu
Hi, List, As the mail I've sent a week before: https://www.redhat.com/archives/libvir-list/2013-March/msg00730.html I'm willing to push this work forward so that the passthrough APIs could be reused by qemu driver and libxl driver (which doesn't support pci passthrough yet and tries to add this fu

Re: [libvirt] [PATCH] Make virsh support '~' and '$HOME' in interactive mode

2013-03-22 Thread Christophe Fergeau
On Thu, Mar 21, 2013 at 09:43:02PM -0600, Eric Blake wrote: > Expanding everything means re-implementing what the shell does. > wordexp() would be ideal for this, except that wordexp() is not portable > enough. Maybe wordexp() could be used on platform which support it, and on platforms that do no

[libvirt] QEMU has applied for Google Summer of Code 2013

2013-03-22 Thread Stefan Hajnoczi
QEMU.org has applied for Google Summer of Code 2013 and also aims to be an umbrella organization for libvirt and the KVM kernel module. Accepted mentoring organizations will be announced on April 8 at 19:00 UTC at http://google-melange.com/. This year we have proposed 5 QEMU project ideas, 1 KVM