Re: [libvirt] [RFC PATCH v2 2/3] qemu: RDMA migration support using 'rdma' URI

2014-04-11 Thread Michael R. Hines
On 04/04/2014 11:47 PM, Eric Blake wrote: On 04/04/2014 12:19 AM, Michael R. Hines wrote: @@ -2561,6 +2570,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, if (qemuCaps-version = 1006000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); +if

Re: [libvirt] [RFC PATCH v2 3/3] qemu: memory pre-pinning support for RDMA migration

2014-04-11 Thread Michael R. Hines
On 04/05/2014 04:46 AM, Eric Blake wrote: On 04/04/2014 12:29 AM, Michael R. Hines wrote: Yes, it's present, but it still does not guarantee that QEMU supports it if RDMA was compiled out - only the version number is a (minimal) guarantee, and even then the hardware can still throw an error if

Re: [libvirt] [PATCH] storage: add check for invalid volume name

2014-04-11 Thread Jincheng Miao
On 04/11/2014 12:28 PM, Eric Blake wrote: On 04/10/2014 10:02 PM, Jincheng Miao wrote: If volume name is a path, storageVolCreateXML appends that name to the specified pool path, that will taint other pools. Adding the volume check is better for sanity. Signed-off-by: Jincheng Miao

[libvirt] [PATCH v5] Introduce --without-pm-utils to get rid of pm-is-supported dependency

2014-04-11 Thread Cédric Bosdonnat
This uses the dbus api of systemd to check the power management capabilities of the node. --- Difference with v4: * Removed left-over debug bits * Rebased * Cleaned up the spurious white space change configure.ac | 22 + libvirt.spec.in | 9

[libvirt] [PATCH] virsh: Add a white line into secret-get-value output

2014-04-11 Thread liyang
From: Li Yang liyang.f...@cn.fujitsu.com Commonly there is a whilt line at the end of the virsh command output, for example: [root@localhost /]# virsh list --name --all virt-tests-vm1 [root@localhost /]# For now the output of secret-get-value like this: [root@localhost /]# virsh

Re: [libvirt] [PATCH] tests: Fix systemd test with --without-driver-modules

2014-04-11 Thread Jiri Denemark
On Thu, Apr 10, 2014 at 11:02:02 -0600, Eric Blake wrote: On 04/10/2014 09:26 AM, Jiri Denemark wrote: Every test that makes use of virmock.h (only virsystemdtest as of now) needs to be linked with -export-dynamic to make sure the LD_PRELOADed mock library can access it's wrap_* symbols.

Re: [libvirt] [PATCH] cpu: Properly check input parameters

2014-04-11 Thread Jiri Denemark
On Fri, Apr 04, 2014 at 16:03:44 +0200, Peter Krempa wrote: On 03/26/14 16:14, Jiri Denemark wrote: Most of the APIs in CPU driver do not expect to get NULL for input parameters. Let's mark them with ATTRIBUTE_NONNULL and also check for some members of virCPUDef when the APIs expect them

Re: [libvirt] [PATCH] cpu: Add documentation for CPU driver APIs

2014-04-11 Thread Jiri Denemark
On Thu, Apr 03, 2014 at 15:57:49 +0200, Michal Privoznik wrote: On 26.03.2014 16:08, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/cpu/cpu.c | 202 ++ 1 file changed, 202 insertions(+) ACK

Re: [libvirt] [PATCH] nodeinfo: Make sure we always reset errno before calling readdir

2014-04-11 Thread Natanael Copa
On Thu, 10 Apr 2014 15:53:57 -0600 Eric Blake ebl...@redhat.com wrote: On 04/10/2014 02:52 PM, Natanael Copa wrote: I suppose we could use helper function to make it more readable: int virReaddir(DIR *dirp, struct dirent **ent) { errno = 0; *ent = readdir(dirp); if

Re: [libvirt] maint: backport of 736e017e and friends

2014-04-11 Thread Martin Kletzander
On Tue, Apr 08, 2014 at 01:24:45PM +0100, Daniel P. Berrange wrote: On Tue, Apr 08, 2014 at 01:28:35PM +0200, Martin Kletzander wrote: I wanted to back-port 736e017e as requested in Bug 1058149 [1], because it fixes a crash. However, it requires 5b3492fa and e9d09fe1 to be back-ported as well,

Re: [libvirt] [PATCH] nodeinfo: Make sure we always reset errno before calling readdir

2014-04-11 Thread Daniel P. Berrange
On Fri, Apr 11, 2014 at 09:48:41AM +, Natanael Copa wrote: On Thu, 10 Apr 2014 15:53:57 -0600 Eric Blake ebl...@redhat.com wrote: On 04/10/2014 02:52 PM, Natanael Copa wrote: I suppose we could use helper function to make it more readable: int virReaddir(DIR *dirp, struct

[libvirt] [PATCH] qemu: Avoid overflow when setting migration speed

2014-04-11 Thread Jiri Denemark
When passing migration bandwidth to QEMU, we multiply it by 1024 * 1024 to convert the speed to B/s and the result still needs to fit in int64_t. https://bugzilla.redhat.com/show_bug.cgi?id=1083483 Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/qemu/qemu_monitor.c | 7 +++ 1 file

[libvirt] API calls to get interfaces and block devices

2014-04-11 Thread Ruben Kerkhof
Hi all, I have a few python scripts which use the libvirt api to get interface and block device statistics. What has been bugging me for a while now that is that there’s no high level api to get a list of all interfaces or block devices for a vm. The list can be retrieved from the xml with a

Re: [libvirt] API calls to get interfaces and block devices

2014-04-11 Thread Daniel P. Berrange
On Fri, Apr 11, 2014 at 01:14:50PM +0200, Ruben Kerkhof wrote: Hi all, I have a few python scripts which use the libvirt api to get interface and block device statistics. What has been bugging me for a while now that is that there’s no high level api to get a list of all interfaces or

Re: [libvirt] API calls to get interfaces and block devices

2014-04-11 Thread Ruben Kerkhof
On Fri, Apr 11, 2014 at 1:23 PM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Apr 11, 2014 at 01:14:50PM +0200, Ruben Kerkhof wrote: Hi all, I have a few python scripts which use the libvirt api to get interface and block device statistics. What has been bugging me for a while now

Re: [libvirt] API calls to get interfaces and block devices

2014-04-11 Thread Daniel P. Berrange
On Fri, Apr 11, 2014 at 01:56:31PM +0200, Ruben Kerkhof wrote: On Fri, Apr 11, 2014 at 1:23 PM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Apr 11, 2014 at 01:14:50PM +0200, Ruben Kerkhof wrote: Hi all, I have a few python scripts which use the libvirt api to get interface and

Re: [libvirt] API calls to get interfaces and block devices

2014-04-11 Thread Cole Robinson
On 04/11/2014 07:14 AM, Ruben Kerkhof wrote: Hi all, I have a few python scripts which use the libvirt api to get interface and block device statistics. What has been bugging me for a while now that is that there’s no high level api to get a list of all interfaces or block devices for a

[libvirt] [PATCH] virsh: Add one blank line after output of dompmsuspend/dompmwakeup

2014-04-11 Thread Shanzhi Yu
There should be include one blank line after result of dompmsuspend and dompmwakeup --- tools/virsh-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 73414f8..3aca1e7 100644 --- a/tools/virsh-domain.c +++

Re: [libvirt] [PATCH] qemu: Avoid overflow when setting migration speed

2014-04-11 Thread Eric Blake
On 04/11/2014 04:52 AM, Jiri Denemark wrote: When passing migration bandwidth to QEMU, we multiply it by 1024 * 1024 to convert the speed to B/s and the result still needs to fit in int64_t. https://bugzilla.redhat.com/show_bug.cgi?id=1083483 Signed-off-by: Jiri Denemark

Re: [libvirt] [PATCH v2] Added example script on how to convert LXC container config

2014-04-11 Thread Cedric Bosdonnat
Eric, is there still something I should fix on this patch? -- Cedric On Fri, 2014-03-28 at 17:31 +0100, Cédric Bosdonnat wrote: --- Makefile.am | 2 +- configure.ac | 1 + examples/lxcconvert/Makefile.am | 18 ++

Re: [libvirt] API calls to get interfaces and block devices

2014-04-11 Thread Ruben Kerkhof
On Fri, Apr 11, 2014 at 2:11 PM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Apr 11, 2014 at 01:56:31PM +0200, Ruben Kerkhof wrote: On Fri, Apr 11, 2014 at 1:23 PM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Apr 11, 2014 at 01:14:50PM +0200, Ruben Kerkhof wrote: Hi

Re: [libvirt] API calls to get interfaces and block devices

2014-04-11 Thread Ruben Kerkhof
Hi Cole, On Fri, Apr 11, 2014 at 2:50 PM, Cole Robinson crobi...@redhat.com wrote: On 04/11/2014 07:14 AM, Ruben Kerkhof wrote: Hi all, I have a few python scripts which use the libvirt api to get interface and block device statistics. What has been bugging me for a while now that is that

Re: [libvirt] [PATCH 1/2] bhyve: fix domain management

2014-04-11 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Wojciech Macek wrote: When domain is not persistent, it should be forgotten upon destroying. --- src/bhyve/bhyve_driver.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c

Re: [libvirt] [PATCHv2] bhyve: domainCreateXML

2014-04-11 Thread Roman Bogorodskiy
Wojciech Macek wrote: Implement bhyveDomainCreteXML function. s/Crete/Create/ --- src/bhyve/bhyve_driver.c | 67 1 file changed, 67 insertions(+) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 7187202..4ac89c1

Re: [libvirt] [PATCHv2] bhyve: domainCreateXML

2014-04-11 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: +dom = virGetDomain(conn, vm-def-name, vm-def-uuid); +if (!dom) +goto cleanup; + +ret = virBhyveProcessStart(dom-conn, privconn, vm, + VIR_DOMAIN_RUNNING_BOOTED, +

[libvirt] [PATCH] tests: drop dead code from argv2xml and xml2xml

2014-04-11 Thread Eric Blake
Noticed while tweaking the RelaxNG grammar for disk elements. * tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-static-vcpu-no-numatune.xml: * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-cdrom-empty.xml: Drop unused files. * tests/qemuargv2xmltest.c (testInfo, DO_TEST_FULL): Drop unused field.

Re: [libvirt] [PATCH 1/6] conf: test backing chain lookup

2014-04-11 Thread John Ferlan
On 04/11/2014 12:21 AM, Eric Blake wrote: I realized that we had no good test coverage of looking up a name from within a backing chain, even though code like block-commit is relying on it. * tests/virstoragetest.c (testStorageLookup): New function. (mymain): New tests. Signed-off-by:

Re: [libvirt] [PATCH 2/6] util: new virFileRelLinkPointsTo function

2014-04-11 Thread John Ferlan
On 04/11/2014 12:21 AM, Eric Blake wrote: When checking if two filenames point to the same inode (whether by hardlink or symlink), sometimes one of the names might be relative. This convenience function makes it easier to check. * src/util/virfile.h (virFileRelLinkPointsTo): New

Re: [libvirt] [PATCH 3/6] conf: report error on chain lookup failure

2014-04-11 Thread John Ferlan
On 04/11/2014 12:21 AM, Eric Blake wrote: The chain lookup function was inconsistent on whether it left a message in the log when looking up a name that is not found on the chain (leaving a message for OOM or if name was relative but not part of the chain), and could litter the log even

Re: [libvirt] [PATCH 4/6] conf: drop redundant parameter to chain lookup

2014-04-11 Thread John Ferlan
On 04/11/2014 12:21 AM, Eric Blake wrote: The original chain lookup code had to pass in the starting name, because it was not available in the chain. But now that we have added fields to the struct, this parameter is redundant. * src/util/virstoragefile.h (virStorageFileChainLookup):

Re: [libvirt] [PATCH v5] Introduce --without-pm-utils to get rid of pm-is-supported dependency

2014-04-11 Thread Jim Fehlig
Cédric Bosdonnat wrote: This uses the dbus api of systemd to check the power management capabilities of the node. --- Difference with v4: * Removed left-over debug bits * Rebased * Cleaned up the spurious white space change configure.ac | 22 +

Re: [libvirt] [PATCH 1/6] conf: test backing chain lookup

2014-04-11 Thread Eric Blake
On 04/11/2014 01:11 PM, John Ferlan wrote: On 04/11/2014 12:21 AM, Eric Blake wrote: I realized that we had no good test coverage of looking up a name from within a backing chain, even though code like block-commit is relying on it. * tests/virstoragetest.c (testStorageLookup): New

Re: [libvirt] [PATCH 2/6] util: new virFileRelLinkPointsTo function

2014-04-11 Thread Eric Blake
On 04/11/2014 01:11 PM, John Ferlan wrote: +++ b/src/util/virfile.h @@ -144,6 +144,9 @@ int virFileStripSuffix(char *str, int virFileLinkPointsTo(const char *checkLink, const char *checkDest); +int virFileRelLinkPointsTo(const char *directory, +

Re: [libvirt] [PATCH 5/6] conf: tweak chain lookup internals

2014-04-11 Thread John Ferlan
On 04/11/2014 12:21 AM, Eric Blake wrote: Thanks to the testsuite, I feel quite confident that this rewrite still gives the same results for all cases except for one, and I can make the argument that _that_ case was a pre-existing bug. When looking up relative names, the lookup is supposed

Re: [libvirt] [PATCH 6/6] conf: delete internal directory field

2014-04-11 Thread John Ferlan
On 04/11/2014 12:21 AM, Eric Blake wrote: Another field no longer needed, getting us one step closer to merging virStorageFileMetadata and virStorageSource. * src/util/virstoragefile.h (_virStorageFileMetadata): Drop field. * src/util/virstoragefile.c (virStorageFileGetMetadataInternal)

Re: [libvirt] [PATCH 3/6] conf: report error on chain lookup failure

2014-04-11 Thread Eric Blake
On 04/11/2014 01:12 PM, John Ferlan wrote: On 04/11/2014 12:21 AM, Eric Blake wrote: The chain lookup function was inconsistent on whether it left a message in the log when looking up a name that is not found on the chain (leaving a message for OOM or if name was relative but not part of

Re: [libvirt] [PATCH 4/6] conf: drop redundant parameter to chain lookup

2014-04-11 Thread Eric Blake
On 04/11/2014 01:18 PM, John Ferlan wrote: On 04/11/2014 12:21 AM, Eric Blake wrote: The original chain lookup code had to pass in the starting name, because it was not available in the chain. But now that we have added fields to the struct, this parameter is redundant. *

Re: [libvirt] [PATCH 5/6] conf: tweak chain lookup internals

2014-04-11 Thread Eric Blake
On 04/11/2014 08:46 PM, John Ferlan wrote: On 04/11/2014 12:21 AM, Eric Blake wrote: Thanks to the testsuite, I feel quite confident that this rewrite still gives the same results for all cases except for one, and I can make the argument that _that_ case was a pre-existing bug. When