Re: [libvirt] [PATCH v3 2/2] virsh: report only filled values in 'nodecpustats'

2014-02-04 Thread Ján Tomko
On 01/28/2014 06:49 PM, Roman Bogorodskiy wrote: A set of fields for CPU stats could vary on different platforms, for example, FreeBSD doesn't report 'iowait'. Make virsh print out only the fields that were actually filled. --- tools/virsh-host.c | 119

Re: [libvirt] [PATCH v3 1/3] utils: Introduce functions for modprobe

2014-02-04 Thread Ján Tomko
On 01/30/2014 06:50 PM, John Ferlan wrote: This patch adds functions for various usages of modprobe Signed-off-by: John Ferlan jfer...@redhat.com --- configure.ac | 6 ++ src/Makefile.am | 1 + src/libvirt_private.syms | 7 ++ src/util/virkmod.c | 182

Re: [libvirt] [PATCH v3 2/3] tests: Add test for new virkmod functions

2014-02-04 Thread Ján Tomko
On 01/30/2014 06:50 PM, John Ferlan wrote: Adding tests for new virKMod{Config|Load|Unload}() API's. A test for virKModIsBlacklisted() would require some setup which cannot be assumed. Signed-off-by: John Ferlan jfer...@redhat.com --- .gitignore | 2 + tests/Makefile.am |

Re: [libvirt] [PATCH v3 3/3] Honor blacklist for modprobe command

2014-02-04 Thread Ján Tomko
On 01/30/2014 06:50 PM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1045124 When loading modules, libvirt does not honor the modprobe blacklist. Use the new virKModLoad() API in order to attempt load with blacklist check. Use the new virKModIsBlacklisted() API to check if

Re: [libvirt] [PATCH] qemu: be sure we're using the updated value of backend during hotplug

2014-02-04 Thread Ján Tomko
On 02/04/2014 12:24 PM, Laine Stump wrote: Probable fix for https://bugzilla.redhat.com/show_bug.cgi?id=1056360 commit f094aaac changed qemuPrepareHostdevPCIDevices() such that it may modify the backend (vfio vs. legacy kvm) setting in the virHostdevDef. However,

Re: [libvirt] [PATCH v3 2/3] tests: Add test for new virkmod functions

2014-02-04 Thread Ján Tomko
On 02/04/2014 03:01 PM, John Ferlan wrote: On 02/04/2014 06:06 AM, Ján Tomko wrote: On 01/30/2014 06:50 PM, John Ferlan wrote: Adding tests for new virKMod{Config|Load|Unload}() API's. A test for virKModIsBlacklisted() would require some setup which cannot be assumed. Signed-off

Re: [libvirt] [PATCH v3 3/3] Honor blacklist for modprobe command

2014-02-04 Thread Ján Tomko
On 02/04/2014 03:29 PM, John Ferlan wrote: On 02/04/2014 06:06 AM, Ján Tomko wrote: On 01/30/2014 06:50 PM, John Ferlan wrote: +VIR_FREE(errbuf); +goto cleanup; } goto recheck; } +/* If we know failure was because of blacklist

Re: [libvirt] [PATCH v3 3/3] Honor blacklist for modprobe command

2014-02-04 Thread Ján Tomko
On 02/04/2014 04:29 PM, John Ferlan wrote: On 02/04/2014 10:10 AM, Ján Tomko wrote: On 02/04/2014 03:29 PM, John Ferlan wrote: On 02/04/2014 06:06 AM, Ján Tomko wrote: On 01/30/2014 06:50 PM, John Ferlan wrote: +VIR_FREE(errbuf); +goto cleanup

Re: [libvirt] 1.2.0 segfault on Centos 6

2014-02-05 Thread Ján Tomko
On 02/04/2014 11:23 PM, Jiri Denemark wrote: On Tue, Feb 04, 2014 at 17:02:41 +0100, Franky Van Liedekerke wrote: Hi, using libvirt 1.2.0 on a up-to-date Centos6.5 machine leads to occasional segmentation faults (see below). Sometimes it runs for 5 minutes, sometimes for an hour, but after

[libvirt] [PATCH] Generate a valid imagelabel even for type 'none'

2014-02-05 Thread Ján Tomko
Commit 2ce63c1 added imagelabel generation when relabeling is turned off. But we weren't filling out the sensitivity for type 'none' labels, resulting in an invalid label: $ virsh managedsave domain error: unable to set security context 'system_u:object_r:svirt_image_t' on fd 28: Invalid argument

Re: [libvirt] [PATCH] Generate a valid imagelabel even for type 'none'

2014-02-05 Thread Ján Tomko
On 02/05/2014 07:54 PM, Eric Blake wrote: On 02/05/2014 11:47 AM, Ján Tomko wrote: Commit 2ce63c1 added imagelabel generation when relabeling is turned off. But we weren't filling out the sensitivity for type 'none' labels, resulting in an invalid label: $ virsh managedsave domain error

Re: [libvirt] [PATCH v3 1/2] BSD: implement nodeGetCPUStats

2014-02-06 Thread Ján Tomko
On 02/04/2014 10:24 AM, Ján Tomko wrote: On 01/28/2014 06:49 PM, Roman Bogorodskiy wrote: Implementation obtains CPU usage information using kern.cp_time and kern.cp_times sysctl(8)s and reports CPU utilization. --- include/libvirt/libvirt.h.in | 8 src/nodeinfo.c

Re: [libvirt] [PATCH] virsh: only report filled values in nodecpustats

2014-02-06 Thread Ján Tomko
On 02/06/2014 01:14 PM, Michal Privoznik wrote: On 04.02.2014 10:22, Ján Tomko wrote: Rewrite the function to use an array instead of a struct, translating the field names to int via an enum. --- tools/virsh-host.c | 126 +++-- 1 file

Re: [libvirt] [PATCH v2] qemuxml2argvtest: Set timezone

2014-02-06 Thread Ján Tomko
On 02/06/2014 03:11 PM, Michal Privoznik wrote: With my recent work on the test, both time() and localtime() are used. While mocking the former one, we get predictable result for UTC. But since the latter function uses timezone to get local time, the result of localtime() is not so predictive.

Re: [libvirt] [PATCH 1/2] qemuxml2argvmock: Mock time() on non-linux platforms too

2014-02-06 Thread Ján Tomko
On 02/06/2014 02:33 PM, Michal Privoznik wrote: The qemuxml2argvtest is run on more platforms than linux. For instance FreeBSD. On these platforms we are, however, not mocking time() which results in current time being fetched from system and hence tests number 32 and 33 failing.

[libvirt] [PATCHv3 1/2] Split out bind() from virPortAllocatorAcquire

2014-02-06 Thread Ján Tomko
--- src/util/virportallocator.c | 72 - 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c index 694f191..5d51434 100644 --- a/src/util/virportallocator.c +++

[libvirt] [PATCHv3 0/2] Support IPv6 in port allocator

2014-02-06 Thread Ján Tomko
a v4-only system even on systems with IPv6 compiled in Ján Tomko (2): Split out bind() from virPortAllocatorAcquire Support IPv6 in port allocator src/util/virportallocator.c | 106 +++ tests/virportallocatortest.c | 68

[libvirt] [PATCHv3 2/2] Support IPv6 in port allocator

2014-02-06 Thread Ján Tomko
Also try to bind on IPv6 to check if the port is occupied. Change the mocked bind in the test to return EADDRINUSE for some ports only for the IPv4/IPv6 socket if we're testing on a host with IPv6 compiled in. Also mock socket() to make it fail with EAFNOTSUPPORTED if LIBVIRT_TEST_IPV4ONLY is

Re: [libvirt] [PATCH] virpcitest: fix coverity issues

2014-02-07 Thread Ján Tomko
On 02/06/2014 05:36 PM, Pavel Hrdina wrote: On 6.2.2014 16:48, Eric Blake wrote: On 02/06/2014 08:18 AM, Pavel Hrdina wrote: diff --git a/tests/virpcitest.c b/tests/virpcitest.c index 994b300..8ff3b1d 100644 --- a/tests/virpcitest.c +++ b/tests/virpcitest.c @@ -248,6 +248,7 @@

[libvirt] [PATCH] Rename 'index' in virCapabilitiesGetCpusForNode

2014-02-11 Thread Ján Tomko
This shadows the index function on some systems (RHEL-6.4, FreeBSD 9): ../../src/conf/capabilities.c: In function 'virCapabilitiesGetCpusForNode': ../../src/conf/capabilities.c:1005: warning: declaration of'index' shadows a global declaration [-Wshadow] /usr/include/strings.h:57: warning:

[libvirt] [PATCH] Fix leaks in vircapstest

2014-02-12 Thread Ján Tomko
Coverity complains about cell_cpus being leaked on error and valgrind shows 'caps' is leaked on success. Introduced in eb64e87. --- tests/vircapstest.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/vircapstest.c b/tests/vircapstest.c index a40771d..4264e9e

Re: [libvirt] [PATCH 4/8] storage: lvm: Separate creating of the volume from building

2014-02-12 Thread Ján Tomko
On 02/12/2014 07:29 AM, Michael Chapman wrote: On Thu, 16 Jan 2014, Peter Krempa wrote: On 01/09/14 23:40, Eric Blake wrote: On 01/06/2014 09:44 AM, Peter Krempa wrote: Separate the steps to create libvirt's volume metadata from the actual volume building process. This is already done for

Re: [libvirt] [PATCH v2 2/2] vircapstest: Introduce virCapabilitiesGetCpusForNodemask test

2014-02-12 Thread Ján Tomko
On 02/12/2014 12:43 PM, John Ferlan wrote: Coverity has complained this morning about this change... see below. Please send a patch to resolve. A patch has been sent this morning, please review: https://www.redhat.com/archives/libvir-list/2014-February/msg00660.html signature.asc

Re: [libvirt] [PATCH] Fix leaks in vircapstest

2014-02-12 Thread Ján Tomko
On 02/12/2014 02:32 PM, Eric Blake wrote: On 02/12/2014 02:47 AM, Ján Tomko wrote: Coverity complains about cell_cpus being leaked on error and valgrind shows 'caps' is leaked on success. Introduced in eb64e87. --- tests/vircapstest.c | 7 +-- 1 file changed, 5 insertions(+), 2

[libvirt] [PATCH 0/2] Partially revert separation of volume creating and building

2014-02-12 Thread Ján Tomko
The storage driver expects 'createVol' to fill out the volume key. For disk and logical backends, we generate the key only after the volume has been built. Revert the separation commits for these backends. Ján Tomko (2): Revert storage: lvm: Separate creating of the volume from building

[libvirt] [PATCH 2/2] Revert storage: disk: Separate creating of the volume from building

2014-02-12 Thread Ján Tomko
This reverts commit 67ccf91bf29488783bd1fda46b362450f71a2078. We only generate the volume key after we've built it, but the storage driver expects it to be filled after createVol finishes. Squash the volume building back with creating to fulfill this expectation. ---

[libvirt] [PATCH 1/2] Revert storage: lvm: Separate creating of the volume from building

2014-02-12 Thread Ján Tomko
This reverts commit af1fb38f55d4fb87e0fcaee1e973fa9c6713b1e6. With it, creating new logical volumes fails: https://www.redhat.com/archives/libvir-list/2014-February/msg00658.html In the storage driver, we expect CreateVol to fill out the volume key, but the LVM backend fills the key with the uuid

Re: [libvirt] [PATCH] storage: handle NULL return from virGetStorageVol

2014-02-12 Thread Ján Tomko
On 02/12/2014 12:05 PM, Michael Chapman wrote: virGetStorageVol can return NULL on out-of-memory. If it does, cleanly abort the volume clone operation. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/storage/storage_driver.c | 4 1 file changed, 4 insertions(+) ACK

Re: [libvirt] [PATCH 0/2] Partially revert separation of volume creating and building

2014-02-12 Thread Ján Tomko
On 02/12/2014 03:15 PM, Peter Krempa wrote: On 02/12/14 15:03, Ján Tomko wrote: The storage driver expects 'createVol' to fill out the volume key. For disk and logical backends, we generate the key only after the volume has been built. Revert the separation commits for these backends. Ján

Re: [libvirt] [PATCH v6 4/6] qemu_cap: Add USB keyboard capability

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com QEMU can support USB keyboard but libvirt haven't supportted it yet. This patch is to add USB keyboard capabilities and test cases. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH v6 1/6] conf: Add a keyboard input device type

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard for non-x86 platforms when graphics are enabled. It's preferred to add one USB keyboard. This patch is to add keyboard input device type. Signed-off-by: Li Zhang

Re: [libvirt] [PATCH v6 3/6] conf: Remove the implicit PS2 mouse for non-X86 platforms and add an implicit PS2 keyboard device for X86 platforms.

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com PS2 device only works for X86 platform, other platforms may need USB mouse. Athough it doesn't influence the QEMU command line, but it's not right to add one PS2 mouse for non-X86 platform. What's more, PS2

Re: [libvirt] [PATCH v6 5/6] qemu: parse qemu command line for USB keyboard

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to format qemu command line and xen driver for USB keyboard and add test cases for it. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/qemu/qemu_command.c

Re: [libvirt] [PATCH v6 6/6] Add a default USB keyboard and USB mouse for PPC64

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard working on PPC64 and PS2 mouse is only for PPC64 when graphics are enabled. It needs to add a USB keyboard and USB mouse for it. This patch is to add a USB keyboard and USB mouse when

Re: [libvirt] [PATCH v6 2/6] conf: Add one interface to add default input devices

2014-02-13 Thread Ján Tomko
On 02/13/2014 09:48 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add one new interface to add input devices. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/conf/domain_conf.c | 29 + src/conf/domain_conf.h |

Re: [libvirt] [PATCH v1 1/4] Introduce virDomain{Get,Set}Time APIs

2014-02-14 Thread Ján Tomko
On 02/13/2014 07:51 PM, Michal Privoznik wrote: These APIs allow users to get or set time in a domain, which may come handy if the domain has been resumed just recently and NTP is not configured or hasn't kicked in yet and the guest is running something time critical. In addition, NTP may

Re: [libvirt] [PATCH v3 00/21] LXC configuration conversion

2014-02-14 Thread Ján Tomko
On 02/05/2014 03:09 PM, Cédric Bosdonnat wrote: Here is an updated version of the patch set fixing comments from Daniel. It also adds 3 commits: * One adding conversion for the newly supported blkio throttle tune in lxc driver. * One actually using the state of the veth network device

Re: [libvirt] [PATCH v6 1/6] conf: Add a keyboard input device type

2014-02-14 Thread Ján Tomko
On 02/14/2014 10:02 AM, Li Zhang wrote: On 2014年02月14日 00:39, Daniel P. Berrange wrote: On Thu, Feb 13, 2014 at 04:48:21PM +0800, Li Zhang wrote: @@ -12422,10 +12426,12 @@ virDomainDefParseXML(xmlDocPtr xml, * XXX will this be true for other virt types ? */ if

Re: [libvirt] [PATCHv3 0/2] Support IPv6 in port allocator

2014-02-14 Thread Ján Tomko
On 02/06/2014 05:43 PM, Ján Tomko wrote: v1: Support IPv6 in port allocator https://www.redhat.com/archives/libvir-list/2013-October/msg7.html v2: https://www.redhat.com/archives/libvir-list/2013-October/msg01313.html bind to v4 and v6 separately v3: fix the embarrasing bug

[libvirt] [PATCH 0/2] Test secret XML parsing and formatting

2014-02-14 Thread Ján Tomko
Ján Tomko (2): docs: remove auth from secret XML format Add tests for secret XML parsing docs/formatsecret.html.in| 2 - tests/Makefile.am| 12 ++- tests/secretschematest | 10 +++ tests/secretxml2xmlin

Re: [libvirt] [PATCH] Forgot to add lxcconf2xmldata to dist.

2014-02-14 Thread Ján Tomko
On 02/14/2014 04:06 PM, Cédric Bosdonnat wrote: --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) ACK and pushed. Jan signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 2/2] Add tests for secret XML parsing

2014-02-14 Thread Ján Tomko
also validate it against the RNG schema. --- tests/Makefile.am| 12 ++- tests/secretschematest | 10 +++ tests/secretxml2xmlin/ephemeral-usage-volume.xml | 7 ++ tests/secretxml2xmlin/usage-ceph.xml | 7 ++

Re: [libvirt] [PATCH 0/2] Test secret XML parsing and formatting

2014-02-14 Thread Ján Tomko
On 02/14/2014 04:44 PM, Eric Blake wrote: On 02/14/2014 08:08 AM, Ján Tomko wrote: Ján Tomko (2): docs: remove auth from secret XML format Add tests for secret XML parsing ACK series. Wow - we've gone that long without testing secret XML? Thanks, pushed. Jan signature.asc

Re: [libvirt] [PATCH v8 3/7] conf: Remove the implicit PS2 mouse for non-X86 platforms and add an implicit PS2 keyboard device for X86 platforms.

2014-02-17 Thread Ján Tomko
On 02/17/2014 08:33 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com PS2 device only works for X86 platform, other platforms may need USB mouse. Athough it doesn't influence the QEMU command line, but it's not right to add one PS2 mouse for non-X86 platform. What's more, PS2

Re: [libvirt] [PATCH v8 3/7] conf: Remove the implicit PS2 mouse for non-X86 platforms and add an implicit PS2 keyboard device for X86 platforms.

2014-02-17 Thread Ján Tomko
On 02/17/2014 10:04 AM, Li Zhang wrote: On 2014年02月17日 16:48, Ján Tomko wrote: On 02/17/2014 08:33 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com PS2 device only works for X86 platform, other platforms may need USB mouse. Athough it doesn't influence the QEMU command line

Re: [libvirt] [PATCH v9 2/7] conf: Add a keyboard input device type

2014-02-18 Thread Ján Tomko
On 02/17/2014 11:17 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard support currently in libvirt . For some platforms, it needs to add a USB keyboard when graphics are enabled. This patch is to add keyboard input device type. Signed-off-by: Li Zhang

Re: [libvirt] [PATCH v9 1/7] conf: Add one interface to add default input devices

2014-02-18 Thread Ján Tomko
On 02/17/2014 11:17 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add one new interface to add input devices. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- src/conf/domain_conf.c | 29 + src/conf/domain_conf.h |

Re: [libvirt] [PATCH v9 6/7] xen: format xen command line for USB keyboard

2014-02-18 Thread Ján Tomko
On 02/17/2014 11:17 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to format xen command line for USB keyboard s/xen command line/Xen XM and S-Expr config/ both here and in the subject. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH v9 3/7] conf: Remove the implicit PS2 devices for non-X86 platforms

2014-02-18 Thread Ján Tomko
On 02/17/2014 11:17 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com PS2 device only works for X86 platform, other platforms may need USB devices instead. Athough it doesn't influence the QEMU command line, but it's not right to add PS2 mouse/keyboard for non-X86 platform.

Re: [libvirt] [PATCH v9 0/7] Support keyboard device

2014-02-18 Thread Ján Tomko
On 02/18/2014 09:58 AM, Li Zhang wrote: Hi Jan and Daniel, Would you like to accept this patchset? Thanks. Hi, it looks good to me and I'd like to push it this week with the changes I pointed out, unless someone has a different opinion. Jan -- libvir-list mailing list

[libvirt] [PATCH] Fix conflicting types of virInitctlSetRunLevel

2014-02-18 Thread Ján Tomko
aebbcdd didn't change the non-linux definition of the function, breaking the build on FreeBSD: ../../src/util/virinitctl.c:164: error: conflicting types for 'virInitctlSetRunLevel' ../../src/util/virinitctl.h:40: error: previous declaration of 'virInitctlSetRunLevel' was here --- Pushed as

Re: [libvirt] [PATCH v9 0/7] Support keyboard device

2014-02-19 Thread Ján Tomko
On 02/19/2014 07:17 AM, Li Zhang wrote: On 2014年02月18日 20:52, Ján Tomko wrote: On 02/18/2014 09:58 AM, Li Zhang wrote: Hi Jan and Daniel, Would you like to accept this patchset? Thanks. Hi, it looks good to me and I'd like to push it this week with the changes I pointed out, unless

Re: [libvirt] [PATCH v9 2/7] conf: Add a keyboard input device type

2014-02-19 Thread Ján Tomko
On 02/19/2014 07:22 AM, Li Zhang wrote: On 2014年02月18日 20:51, Ján Tomko wrote: On 02/17/2014 11:17 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard support currently in libvirt . For some platforms, it needs to add a USB keyboard when graphics are enabled

[libvirt] [PATCH] Fix build of portallocator on mingw

2014-02-20 Thread Ján Tomko
IN6ADDR_ANY_INIT does not seem to be working as expected on MinGW: error: missing braces around initializer [-Werror=missing-braces] .sin6_addr = IN6ADDR_ANY_INIT, Use the in6addr_any variable instead. Reported by Daniel P. Berrange. --- Pushed as a build breaker.

Re: [libvirt] [PATCH 1/2] Add virStringSearch method for regex matching

2014-02-20 Thread Ján Tomko
On 02/19/2014 09:36 PM, Daniel P. Berrange wrote: From: Manuel VIVES manuel.vi...@diateam.net Add a virStringSearch method to virstring.{c,h} which performs a regex match against a string and returns the matching substrings. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH 2/2] Add virStringReplace method for substring replacement

2014-02-20 Thread Ján Tomko
On 02/19/2014 09:36 PM, Daniel P. Berrange wrote: Add a virStringReplace method to virstring.{h,c} to perform substring matching and replacement Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virstring.c | 44

[libvirt] [PATCH] Add a stub for virCgroupGetDomainTotalCpuStats

2014-02-21 Thread Ján Tomko
Commit 6515889 broke the build on FreeBSD: In function `qemuDomainGetCPUStats': /../../src/qemu/qemu_driver.c:16102: undefined reference to `virCgroupGetDomainTotalCpuStats' --- Pushed as a build-breaker. src/util/vircgroup.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

[libvirt] [PATCH] Ignore additional fields in iscsiadm output

2014-02-21 Thread Ján Tomko
There has been a new field introduced in iscsiadm --mode session output [1], but our regex only expects four fields. This breaks startup of iscsi pools: error: Failed to start pool iscsi error: internal error: cannot find session Fix this by ignoring anything after the fourth field.

Re: [libvirt] [PATCH] Ignore additional fields in iscsiadm output

2014-02-21 Thread Ján Tomko
On 02/21/2014 11:08 AM, Daniel P. Berrange wrote: On Fri, Feb 21, 2014 at 11:01:17AM +0100, Ján Tomko wrote: There has been a new field introduced in iscsiadm --mode session output [1], but our regex only expects four fields. This breaks startup of iscsi pools: error: Failed to start pool

Re: [libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Ján Tomko
domains, where the name contains double-hyphens. This no longer reproduces with current master, it has been fixed by either of: commit 0b121614a2086a8e66ae1f004fe912ba7c1d8a75 Author: Ján Tomko jto...@redhat.com CommitDate: 2012-10-29 14:38:43 +0100 xml: print uuids in the warning commit

Re: [libvirt] [PATCH 2/3] libvirt-guests: Wait for libirtd to initialize

2014-02-21 Thread Ján Tomko
s/libirtd/libvirtd/ in the subject Jan signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/3] rbd: Simplify opening RADOS IoCTX

2014-02-21 Thread Ján Tomko
On 02/12/2014 03:11 PM, Wido den Hollander wrote: Reduces code and brings logging back to one function. --- src/storage/storage_backend_rbd.c | 43 ++--- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/src/storage/storage_backend_rbd.c

[libvirt] [PATCH] Document the keyboard as a valid input type

2014-02-24 Thread Ján Tomko
Commit bc18373 added a new input type, but didn't change the documentation. --- docs/formatdomain.html.in | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index ea1a97b..400de07 100644 --- a/docs/formatdomain.html.in

[libvirt] [PATCH] virsh: Don't leak buffer if GetFDs fails in cmdCreate

2014-02-24 Thread Ján Tomko
Change the logic of the function to return false by default and move the freeing of the buffer to the cleanup section. https://bugzilla.redhat.com/show_bug.cgi?id=1067338 --- tools/virsh-domain.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git

Re: [libvirt] [PATCH] virsh: Don't leak buffer if GetFDs fails in cmdCreate

2014-02-24 Thread Ján Tomko
On 02/24/2014 05:49 PM, Eric Blake wrote: On 02/24/2014 06:29 AM, Ján Tomko wrote: Change the logic of the function to return false by default and move the freeing of the buffer to the cleanup section. https://bugzilla.redhat.com/show_bug.cgi?id=1067338 --- tools/virsh-domain.c | 29

Re: [libvirt] [PATCH] Document the keyboard as a valid input type

2014-02-24 Thread Ján Tomko
On 02/24/2014 05:39 PM, Eric Blake wrote: On 02/24/2014 02:55 AM, Ján Tomko wrote: Commit bc18373 added a new input type, but didn't change the documentation. --- docs/formatdomain.html.in | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in

[libvirt] [PATCH] virsh: mark CPU usage field names as translatable

2014-02-24 Thread Ján Tomko
My commit ac75801 removed the translation markers when moving the field names into an array. --- tools/virsh-host.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 502203b..6a04f9d 100644 --- a/tools/virsh-host.c +++

Re: [libvirt] [PATCH] virsh: initialize str to NULL for solving a build issue

2014-02-24 Thread Ján Tomko
On 02/25/2014 07:28 AM, Chen Hanxiao wrote: Fix a -Werror=maybe-uninitialized issue. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tools/virsh-domain-monitor.c | 2 +- tools/virsh-domain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ACK and pushed.

Re: [libvirt] [PATCH] virsh: mark CPU usage field names as translatable

2014-02-24 Thread Ján Tomko
On 02/24/2014 07:48 PM, Eric Blake wrote: On 02/24/2014 11:11 AM, Ján Tomko wrote: My commit ac75801 removed the translation markers when moving the field names into an array. --- tools/virsh-host.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) ACK. Thanks

Re: [libvirt] [PATCH 0/2] Improve RBD storage pool backend

2014-02-25 Thread Ján Tomko
On 02/25/2014 10:50 AM, Wido den Hollander wrote: The first patch improves the logging for the user. Currently the return codes from librados are not written to any logfile, which might leave a user clueless to why the storage pool is not working. The second patch sets three timeout options

Re: [libvirt] [PATCH] Fix memory leak in virSCSIDeviceListDel()

2014-02-26 Thread Ján Tomko
On 02/22/2014 09:00 PM, Nehal J Wani wrote: While running virscsitest, it was found that valgrind pointed out the following memory leak: ==320== 5 bytes in 1 blocks are definitely lost in loss record 4 of 37 ==320==at 0x4A069EE: malloc (vg_replace_malloc.c:270) ==320==by

Re: [libvirt] [PATCH] Fix memory leak in virDomainSnapshotDiskDefClear()

2014-02-26 Thread Ján Tomko
On 02/22/2014 08:37 PM, Nehal J Wani wrote: While running domainsnapshotxml2xmltest, it was found that valgrind pointed out the following memory leaks: ==32176== 42 (32 direct, 10 indirect) bytes in 1 blocks are definitely lost in loss record 42 of 66 ==32176==at 0x4A069EE: malloc

[libvirt] [PATCH 0/2] Add virusbtest

2014-02-26 Thread Ján Tomko
Test src/util/virusb.c. Ján Tomko (2): Add tests for virUSBDeviceFind functions Add a test for virUSBDeviceList functions .gitignore | 1 + cfg.mk | 3 +- tests/Makefile.am

[libvirt] [PATCH 1/2] Add tests for virUSBDeviceFind functions

2014-02-26 Thread Ján Tomko
Mock the /sys/bus/usb directory and test the finding (and not finding) of some USB devices. --- .gitignore | 1 + cfg.mk | 3 +- tests/Makefile.am | 12 + tests/virusbtest.c

[libvirt] [PATCH 2/2] Add a test for virUSBDeviceList functions

2014-02-26 Thread Ján Tomko
Most of them are already tested in a limited way by testing virUSBDeviceFind. --- tests/virusbtest.c | 75 ++ 1 file changed, 75 insertions(+) diff --git a/tests/virusbtest.c b/tests/virusbtest.c index f9104bf..74b9a5e 100644 ---

Re: [libvirt] [PATCH] sanlock: Truncate domain names longer than SANLK_NAME_LEN

2014-02-27 Thread Ján Tomko
On 02/27/2014 09:43 AM, Jiri Denemark wrote: Libvirt uses a domain name to fill in owner_name in sanlock_options in virLockManagerSanlockAcquire. Unfortunately, owner_name is limited to SANLK_NAME_LEN characters (including trailing '\0'), which means domains with longer names fail to start

Re: [libvirt] [PATCH 1/2] Add tests for virUSBDeviceFind functions

2014-02-27 Thread Ján Tomko
On 02/27/2014 02:27 PM, Michal Privoznik wrote: On 26.02.2014 17:54, Ján Tomko wrote: Mock the /sys/bus/usb directory and test the finding (and not finding) of some USB devices. --- @@ -815,6 +817,16 @@ virpcimock_la_LIBADD = $(GNULIB_LIBS) \ virpcimock_la_LDFLAGS = -module -avoid-version

[libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-27 Thread Ján Tomko
If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup creation if systemd is installed, but it's not PID 1. [1] https://bugs.freedesktop.org/show_bug.cgi?id=69962 ---

[libvirt] [PATCHv2 0/2] Add virusbtest

2014-02-28 Thread Ján Tomko
devices more often in testUSBList, not just at the end. Ján Tomko (2): Add tests for virUSBDeviceFind functions Add a test for virUSBDeviceList functions .gitignore | 1 + cfg.mk | 3 +- tests/Makefile.am

[libvirt] [PATCHv2 1/2] Add tests for virUSBDeviceFind functions

2014-02-28 Thread Ján Tomko
Mock the /sys/bus/usb directory and test the finding (and not finding) of some USB devices. --- .gitignore | 1 + cfg.mk | 3 +- tests/Makefile.am | 22 +++ tests/virusbmock.c

[libvirt] [PATCHv2 2/2] Add a test for virUSBDeviceList functions

2014-02-28 Thread Ján Tomko
Most of them are already tested in a limited way by testing virUSBDeviceFind. --- tests/virusbtest.c | 102 + 1 file changed, 102 insertions(+) diff --git a/tests/virusbtest.c b/tests/virusbtest.c index 9eb9abe..bb849b5 100644 ---

Re: [libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-28 Thread Ján Tomko
On 02/27/2014 09:29 PM, Ján Tomko wrote: If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup creation if systemd is installed, but it's not PID 1. [1] https

Re: [libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-28 Thread Ján Tomko
On 02/28/2014 12:05 PM, Daniel P. Berrange wrote: On Thu, Feb 27, 2014 at 09:29:24PM +0100, Ján Tomko wrote: If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup

Re: [libvirt] [PATCH] Bump version to 1.2.3 for new dev cycle

2014-03-03 Thread Ján Tomko
On 03/03/2014 09:44 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK, trivial: https://www.redhat.com/archives/libvir-list/2014-January/msg00718.html Jan signature.asc Description:

Re: [libvirt] [PATCH] Check if systemd is the init before creating machines

2014-03-03 Thread Ján Tomko
On 02/28/2014 06:36 PM, Daniel P. Berrange wrote: On Thu, Feb 27, 2014 at 09:29:24PM +0100, Ján Tomko wrote: If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup

[libvirt] [PATCH] Replace space with a tab in the Makefile

2014-03-03 Thread Ján Tomko
All the other test_programs in the section use tabs and virportallocatortest sticks out with tab width other than 8. --- Pushed as trivial. tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 1b752b2..cd91734 100644

Re: [libvirt] [PATCHv2 0/2] Add virusbtest

2014-03-03 Thread Ján Tomko
On 02/28/2014 11:15 AM, Michal Privoznik wrote: On 28.02.2014 11:10, Ján Tomko wrote: v1: https://www.redhat.com/archives/libvir-list/2014-February/msg01620.html v2: Split the mocked part into a separate file and only build the test on Linux. Remove 'serial' files. Get out of testDeviceFind

[libvirt] [PATCHv2 1/2] Split out most of virDBusIsServiceEnabled

2014-03-03 Thread Ján Tomko
Introduce virDBusIsServiceInList which can be used to call other methods for listing services (ListNames), not just ListActivatableNames. No functional change. --- src/util/virdbus.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git

[libvirt] [PATCH] Don't always skip virportallocatortest

2014-03-03 Thread Ján Tomko
Include dlfcn.h before checking if RTLD_NEXT is defined --- tests/virportallocatortest.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/virportallocatortest.c b/tests/virportallocatortest.c index 5a93dad..fd48c11 100644 --- a/tests/virportallocatortest.c +++

[libvirt] [PATCH] build: Include sys/wait.h in commandtest.c

2014-03-03 Thread Ján Tomko
Commit 631923e used a few macros from sys/wait.h without including it. On Linux, they were also defined in stdlib.h, but on FreeBSD the build failed: ../../tests/commandtest.c: In function 'test1': warning: implicit declaration of function 'WIFEXITED' warning: nested extern declaration of

Re: [libvirt] [PATCH] Don't always skip virportallocatortest

2014-03-04 Thread Ján Tomko
On 03/03/2014 08:24 PM, Martin Kletzander wrote: On Mon, Mar 03, 2014 at 06:33:19PM +0100, Ján Tomko wrote: Include dlfcn.h before checking if RTLD_NEXT is defined --- tests/virportallocatortest.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) ACK Martin Thanks

Re: [libvirt] [PATCHv2 2/2] Check if systemd is running before creating machines

2014-03-04 Thread Ján Tomko
On 03/03/2014 08:57 PM, Eric Blake wrote: On 03/03/2014 08:47 AM, Ján Tomko wrote: If systemd is installed, but not the init system, Took me a couple reads to understand this. It would be easier with s/not/is not/ systemd-machined fails with an unhelpful error message: Launch helper

Re: [libvirt] [PATCHv2 1/2] Split out most of virDBusIsServiceEnabled

2014-03-04 Thread Ján Tomko
On 03/03/2014 08:55 PM, Eric Blake wrote: On 03/03/2014 08:47 AM, Ján Tomko wrote: Introduce virDBusIsServiceInList which can be used to call other methods for listing services (ListNames), not just ListActivatableNames. Nice refactoring. No functional change. --- src/util/virdbus.c

Re: [libvirt] [PATCH] Fix memory leak in virDomainSnapshotDiskDefClear()

2014-03-04 Thread Ján Tomko
[cc-ing Peter as he invented the function] On 03/03/2014 09:04 PM, Nehal J Wani wrote: --- src/conf/snapshot_conf.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 12b0930..475525f 100644 ---

[libvirt] [PATCH 1/2] Treat zero cpu shares as a valid value

2014-03-04 Thread Ján Tomko
Currently, cputuneshares0/shares/cputune is treated as if it were not specified. Treat is as a valid value if it was explicitly specified and write it to the cgroups. --- src/conf/domain_conf.c | 12 +++- src/conf/domain_conf.h | 1 + src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_driver.c

[libvirt] [RFC][PATCH 0/2] Fix zero cpu shares handling

2014-03-04 Thread Ján Tomko
fs. Partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=998431 Ján Tomko (2): Treat zero cpu shares as a valid value Show the real cpu shares value in live xml src/conf/domain_conf.c | 12 +++- src/conf/domain_conf.h | 1 + src/lxc/lxc_cgroup.c | 13 ++--- src/lxc

[libvirt] [PATCH 2/2] Show the real cpu shares value in live xml

2014-03-04 Thread Ján Tomko
--- src/lxc/lxc_cgroup.c | 13 ++--- src/lxc/lxc_driver.c | 6 +- src/qemu/qemu_cgroup.c | 12 +--- src/qemu/qemu_driver.c | 7 ++- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index 876c32e..5887b24

Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc

2014-03-04 Thread Ján Tomko
On 02/28/2014 10:10 AM, hong-hua@freescale.com wrote: Hi Daniel, Refer to libvirt/src/qemu/qemu_capabilities.c, only x86_64/i686 support PCI_MULTIBUS. /* Currently only x86_64 and i686 support PCI-multibus. */ if (qemuCaps-arch == VIR_ARCH_X86_64 || qemuCaps-arch ==

Re: [libvirt] [PATCH 4/7] Turn virLogSource into a struct instead of an enum

2014-03-05 Thread Ján Tomko
On 03/03/2014 08:18 PM, Daniel P. Berrange wrote: As part of the goal to get away from doing string matching on filenames when deciding whether to emit a log message, turn the virLogSource enum into a struct which contains a log name. There will eventually be one virLogSource instance

Re: [libvirt] [PATCH 1/2] Treat zero cpu shares as a valid value

2014-03-05 Thread Ján Tomko
On 03/04/2014 03:30 PM, Martin Kletzander wrote: On Tue, Mar 04, 2014 at 02:13:14PM +0100, Ján Tomko wrote: Currently, cputuneshares0/shares/cputune is treated as if it were not specified. s/were/was/ in this particular case, I guess. I think this particular case is a perfectly cromulent

<    2   3   4   5   6   7   8   9   10   11   >