Re: [libvirt] [libvirt-python PATCH] setup: Make libvirt API XML path configurable

2014-03-24 Thread Daniel P. Berrange
On Fri, Mar 21, 2014 at 05:00:35PM -0600, Eric Blake wrote: On 03/13/2014 12:03 AM, Martin Kletzander wrote: On Wed, Mar 12, 2014 at 11:15:43AM -0600, Eric Blake wrote: Revisiting an older thread -libvirt_api = get_pkgconfig_data([--variable, libvirt_api], libvirt) +

Re: [libvirt] Memory allocation/usage

2014-03-24 Thread Claudio Bley
At Mon, 24 Mar 2014 11:19:35 +0530, Vikas Kokare wrote: We are trying to understand the memory allocation and usage for a KVM guest using the libvirt java API version 0.5.0. A certain memoryStats(int) on the Domain class allows you to fetch MemoryStatistic values. Each of this statistic has a

Re: [libvirt] [libvirt-java][PATCH] make Flags used to manipulate Domain accessible from outside of the package

2014-03-24 Thread Claudio Bley
[FTR, I've noticed the same thing when I started to use the Java bindings. Back then, this made me wonder whether the bindings are actually used by someone, because the constants are rather useless without being public and nobody objected...] At Fri, 21 Mar 2014 14:05:26 -0600, Yoshikazu

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

2014-03-24 Thread Cedric Bosdonnat
Hi, Did anyone have some time to have a look at this small example tool? Regards, -- Cedric On Tue, 2014-03-11 at 13:40 +0100, Cédric Bosdonnat wrote: --- Makefile.am | 2 +- configure.ac | 1 + examples/lxcconvert/Makefile.am | 19

[libvirt] [PATCH 2/2] sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_RESTART

2014-03-24 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=905282 https://bugzilla.redhat.com/show_bug.cgi?id=967494 When lock failure is detected by sanlock, our sanlock_helper kill script will try to restart (shutdown followed by start) the affected domain when RESTART action is configured for it. While

[libvirt] [PATCH 0/2] sanlock: Forbid unsupported lock failure actions

2014-03-24 Thread Jiri Denemark
Some lock failure actions do not make any sense in combination with sanlock driver. Let's just report an error if someone tries to use them instead of causing unexpected and possibly quite bad thing to happen. Jiri Denemark (2): sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_IGNORE sanlock: Forbid

[libvirt] [PATCH 1/2] sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_IGNORE

2014-03-24 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=905280 https://bugzilla.redhat.com/show_bug.cgi?id=967493 Sanlock expects that the configured kill script either kills the PID on lock failure or removes all locks the PID owns. If none of the two options happen, sanlock will reboot the host. Although

Re: [libvirt] [python PATCH 1/2] qemu: support arbitrary monitor events

2014-03-24 Thread Pavel Hrdina
On 5.2.2014 03:01, Eric Blake wrote: Wrap the new virConnectDomainQemuMonitorEventRegister function being added in libvirt 1.2.2. This patch copies heavily from network events (commit 6ea5be0) and from event loop callbacks in libvirt-override.c, since in the libvirt_qemu module, we must expose

Re: [libvirt] [PATCH] migration: Fix possible bug for migrate cancel

2014-03-24 Thread Eric Blake
[adding libvirt] On 03/24/2014 09:47 AM, Paolo Bonzini wrote: Il 24/03/2014 14:04, arei.gong...@huawei.com ha scritto: From: zengjunliang zengjunli...@huawei.com Return error for migrate cancel, when migration status is not MIG_STATE_SETUP or MIG_STATE_ACTIVE. Thus, libvirt can can perceive

[libvirt] [PATCH] bhyve: add domainCreateWithFlags support

2014-03-24 Thread Michal Privoznik
From: Roman Bogorodskiy bogorods...@gmail.com The only supported flag for now is 'autodestroy'. In order to support 'autodestroy', add support for close callbacks. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/bhyve/bhyve_driver.c | 28 ---

Re: [libvirt] [python PATCH 1/2] qemu: support arbitrary monitor events

2014-03-24 Thread Eric Blake
On 03/21/2014 10:22 AM, Michal Privoznik wrote: On 05.02.2014 03:01, Eric Blake wrote: Wrap the new virConnectDomainQemuMonitorEventRegister function being added in libvirt 1.2.2. This patch copies heavily from network events (commit 6ea5be0) and from event loop callbacks in

Re: [libvirt] [PATCH] bhyve: add domainCreateWithFlags support

2014-03-24 Thread Michal Privoznik
D'oh! I've hit 'git send-email -1' being on the wrong branch. Sorry for the noise. Ignore this. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] qemuDomainGetImageIds: Skip seclabel/ without label

2014-03-24 Thread Michal Privoznik
It's easy to shed the daemon these days. With this XML snippet: disk type='file' device='disk' driver name='qemu' type='raw'/ source file='/some/dummy/path/test.bin' seclabel model='dac' relabel='no'/ /source target dev='vdb' bus='virtio'/ readonly/

Re: [libvirt] [PATCH] qemuDomainGetImageIds: Skip seclabel/ without label

2014-03-24 Thread Eric Blake
On 03/24/2014 10:16 AM, Michal Privoznik wrote: It's easy to shed the daemon these days. With this XML snippet: disk type='file' device='disk' driver name='qemu' type='raw'/ source file='/some/dummy/path/test.bin' seclabel model='dac' relabel='no'/ /source

[libvirt] [python PATCH] maint: set up preferred emacs settings

2014-03-24 Thread Eric Blake
Copy the relevant settings from libvirt.git, so that emacs users maintain the style previously used before the two repos split. * .dir-locals.el: New file. Signed-off-by: Eric Blake ebl...@redhat.com --- Pushing under the trivial rule. .dir-locals.el | 8 1 file changed, 8

[libvirt] [TCK][PATCH] Remove whitespace differences in network tmp files

2014-03-24 Thread Mike Latimer
The network/100-apply-verify-host.t test compares the results of various network commands (route, iptables, ebtables, etc...) against known, valid results. Depending on the versions of these tools, minor whitespace differences in command output can result in the failure of the test. This patch

Re: [libvirt] [PATCH v2] libvirt-tck: prefer kvm domains if multiple domain types exist

2014-03-24 Thread Mike Latimer
Ping. Has anyone (possibly Osier) had a chance to review this patch? On Friday, March 07, 2014 11:06:35 AM Mike Latimer wrote: When matching capabilities of a guest, if multiple domain types exist (for example, 'qemu' and 'kvm') the order in which they are returned can change. To avoid

Re: [libvirt] ownership change for readonly disks

2014-03-24 Thread Michal Privoznik
On 21.03.2014 18:52, Jim Fehlig wrote: Noticed the qemu driver will change owner:group for readonly disks. I suspect this is intentional, but for reasons that elude me ATM. Any hints? :-) Regards, Jim Yes and no. It's both intentional and bug in our code. I was going to suggest to use:

[libvirt] [PATCH] security_dac: Honor norelabel attribute

2014-03-24 Thread Michal Privoznik
The inspiration for this patch comes from a question on the list asking if there's a way to not label some disks. Well, in DAC driver there's not. Even if user have requested norelabel: disk type='file' device='disk' driver name='qemu' type='raw'/ source

[libvirt] [TCK][PATCH] Enable tests with a .pl extension

2014-03-24 Thread Mike Latimer
The main libvirt-tck script only executes tests using the default (.t) extension. This patch adds .t and .pl as valid extensions using the --ext parameter. This is required to enable storage tests added in commit 97c6a506. --- Build.PL| 2 +- bin/libvirt-tck | 5 + 2 files changed, 6

Re: [libvirt] [TCK][PATCH] Enable tests with a .pl extension

2014-03-24 Thread Daniel P. Berrange
On Mon, Mar 24, 2014 at 10:42:35AM -0600, Mike Latimer wrote: The main libvirt-tck script only executes tests using the default (.t) extension. This patch adds .t and .pl as valid extensions using the --ext parameter. This is required to enable storage tests added in commit 97c6a506. Err the

[libvirt] [python PATCH] maint: balance {} usage

2014-03-24 Thread Eric Blake
Emacs gets lost when finding function boundaries when #ifdef sections do not have balanced {}. * libvirt-override.c (virPyDictToTypedParams): Avoid unbalanced {} across ifdef. Signed-off-by: Eric Blake ebl...@redhat.com --- This feels trivial, but it's also hacky enough that I'll wait for a

[libvirt] [TCK][PATCH] Rename .pl tests to .t

2014-03-24 Thread Mike Latimer
Commit 97c6a506 added several storage tests with a .pl extension. Rather than enable .pl tests, this patch simply renames these tests to .t. --- scripts/storage/{400-vol-download.pl = 400-vol-download.t} | 0 scripts/storage/{405-vol-download-all.pl = 405-vol-download-all.t}

Re: [libvirt] [TCK][PATCH] Enable tests with a .pl extension

2014-03-24 Thread Mike Latimer
On Monday, March 24, 2014 04:55:38 PM Daniel P. Berrange wrote: On Mon, Mar 24, 2014 at 10:42:35AM -0600, Mike Latimer wrote: The main libvirt-tck script only executes tests using the default (.t) extension. This patch adds .t and .pl as valid extensions using the --ext parameter. This is

Re: [libvirt] Error while running event-test.c from libvirt

2014-03-24 Thread Michal Privoznik
On 22.03.2014 08:37, Avanti Ajay wrote: Hi.. I compiled event-test.c as : gcc event-test.c -o events -lvirt and then running as : ./events But I am getting this output and the code terminates without detecting events : main:471: Registering domain event cbs myFreeFunc: Freeing [tray change]

Re: [libvirt] Error while running event-test.c from libvirt

2014-03-24 Thread Eric Blake
On 03/24/2014 11:16 AM, Michal Privoznik wrote: On 22.03.2014 08:37, Avanti Ajay wrote: Hi.. I compiled event-test.c as : gcc event-test.c -o events -lvirt and then running as : ./events But I am getting this output and the code terminates without detecting events : main:471: Registering

[libvirt] [PATCH 1/2] Fixed regression in apparmor profiles for qemu brought by 43c030f

2014-03-24 Thread Cédric Bosdonnat
--- src/security/virt-aa-helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index b8b0610..59de517 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1281,7 +1281,9 @@

[libvirt] [PATCH 2/2] Fix apparmor profile to make vfio pci passthrough work

2014-03-24 Thread Cédric Bosdonnat
See lp#1276719 for the bug description. As virt-aa-helper doesn't know the VFIO groups to use for the guest, allow access to all /dev/vfio/[0-9]* and /dev/vfio/vfio files. --- examples/apparmor/libvirt-qemu | 5 + examples/apparmor/usr.sbin.libvirtd | 3 +++ 2 files changed, 8

[libvirt] [PATCH 0/2] apparmor fixes

2014-03-24 Thread Cédric Bosdonnat
Fixes a regression I brough in virt-aa-helper with the lxc apparmor profiles. And makes vfio work even with apparmor enforced on libvirtd Cédric Bosdonnat (2): Fixed regression in apparmor profiles for qemu brought by 43c030f Fix apparmor profile to make vfio pci passthrough work

Re: [libvirt] [libvirt-python PATCH] setup: Make libvirt API XML path configurable

2014-03-24 Thread Eric Blake
On 03/24/2014 03:49 AM, Daniel P. Berrange wrote: NACK, setting pkg-config already takes care of this. See the build-many.sh scrpit attached to this mail which demonstrates use of PKG_CONFIG_PATH to build against every version of libvirt back to 0.9.11 Is there a way to point pkg-config at

Re: [libvirt] [PATCH 15/18] conf: use disk source accessors in vmx/

2014-03-24 Thread Eric Blake
On 03/21/2014 03:10 PM, Laine Stump wrote: On 03/19/2014 11:20 AM, Eric Blake wrote: Part of a series of cleanups to use new accessor methods. * src/vmx/vmx.c (virVMXHandleLegacySCSIDiskDriverName) (virVMXParseDisk, virVMXFormatDisk, virVMXFormatFloppy): Use accessors. -

Re: [libvirt] [python PATCH] maint: balance {} usage

2014-03-24 Thread Peter Krempa
On 03/24/14 18:03, Eric Blake wrote: Emacs gets lost when finding function boundaries when #ifdef sections do not have balanced {}. * libvirt-override.c (virPyDictToTypedParams): Avoid unbalanced {} across ifdef. Signed-off-by: Eric Blake ebl...@redhat.com --- This feels trivial, but

[libvirt] [python PATCH] maint: Add ctags configuration file and ignore the output

2014-03-24 Thread Peter Krempa
Add the config file to ease creation of tags to help navigation in editors. --- .ctags | 2 ++ .gitignore | 1 + 2 files changed, 3 insertions(+) create mode 100644 .ctags diff --git a/.ctags b/.ctags new file mode 100644 index 000..21ac79a --- /dev/null +++ b/.ctags @@ -0,0 +1,2 @@

Re: [libvirt] [python PATCH] maint: balance {} usage

2014-03-24 Thread Eric Blake
On 03/24/2014 12:09 PM, Peter Krempa wrote: On 03/24/14 18:03, Eric Blake wrote: Emacs gets lost when finding function boundaries when #ifdef sections do not have balanced {}. * libvirt-override.c (virPyDictToTypedParams): Avoid unbalanced {} across ifdef. Signed-off-by: Eric Blake

Re: [libvirt] [python PATCH] maint: Add ctags configuration file and ignore the output

2014-03-24 Thread Eric Blake
On 03/24/2014 12:19 PM, Peter Krempa wrote: Add the config file to ease creation of tags to help navigation in editors. --- .ctags | 2 ++ .gitignore | 1 + 2 files changed, 3 insertions(+) create mode 100644 .ctags ACK diff --git a/.ctags b/.ctags new file mode 100644 index

Re: [libvirt] [python PATCH] maint: Add ctags configuration file and ignore the output

2014-03-24 Thread Peter Krempa
On 03/24/14 19:27, Eric Blake wrote: On 03/24/2014 12:19 PM, Peter Krempa wrote: Add the config file to ease creation of tags to help navigation in editors. --- .ctags | 2 ++ .gitignore | 1 + 2 files changed, 3 insertions(+) create mode 100644 .ctags ACK Pushed; Thanks. Peter

[libvirt] [PATCHv2] maint: balance {} usage

2014-03-24 Thread Eric Blake
Emacs gets lost when finding function boundaries when #ifdef sections do not have balanced {}. * libvirt-override.c (libvirt_PyString_Check): New define. (virPyDictToTypedParams): Avoid unbalanced {} across ifdef. Signed-off-by: Eric Blake ebl...@redhat.com --- v2: Hoisting #ifdefs outside of

Re: [libvirt] [PATCH 18/18] conf: prepare to track multiple host source files per disk

2014-03-24 Thread Eric Blake
On 03/21/2014 04:45 PM, Laine Stump wrote: On 03/19/2014 11:20 AM, Eric Blake wrote: It's finally time to start tracking disk backing chains in domain XML. The first step is to start refactoring code so that we have an object more convenient for representing each host source resource in the

Re: [libvirt] [PATCHv2] maint: balance {} usage

2014-03-24 Thread Peter Krempa
On 03/24/14 19:50, Eric Blake wrote: Emacs gets lost when finding function boundaries when #ifdef sections do not have balanced {}. * libvirt-override.c (libvirt_PyString_Check): New define. (virPyDictToTypedParams): Avoid unbalanced {} across ifdef. Signed-off-by: Eric Blake

[libvirt] [PATCH] apparmor: Fix build after split of disk source metadata

2014-03-24 Thread Peter Krempa
Commit 4f20226664b2d4d9e9496ec1e05c9280581a1ca0 breaks build with AppArmor enabled as it missed the refactor to the new accessors. --- Notes: Pushed under the build-breaker rule. src/security/security_apparmor.c | 13 - src/security/virt-aa-helper.c| 4 ++-- 2 files

[libvirt] [python PATCHv2 0/2] arbitrary qemu events

2014-03-24 Thread Eric Blake
Changes since v1: rebase to latest code base, address review comments regarding a leak of dom, add prereq patch to fix bugs that I had been copying and pasting Eric Blake (2): event: fix domain reference bugs qemu: support arbitrary monitor events generator.py | 20 +--

[libvirt] [python PATCHv2 1/2] event: fix domain reference bugs

2014-03-24 Thread Eric Blake
Noticed this bug while adding qemu monitor events; there's probably lots of other misuse of libvirt_virDomainPtrWrap, but for now I'm limiting the fix to all copied-and-pasted event callbacks, since I'm about to copy it again in the next patch. While at it, check for failure to extract the conn

[libvirt] [python PATCHv2 2/2] qemu: support arbitrary monitor events

2014-03-24 Thread Eric Blake
Wrap the new virConnectDomainQemuMonitorEventRegister function added in libvirt 1.2.3. This patch copies heavily from network events (commit 6ea5be0) and from event loop callbacks in libvirt-override.c, since in the libvirt_qemu module, we must expose top-level functions rather than class

Re: [libvirt] [PATCHv2] maint: balance {} usage

2014-03-24 Thread Eric Blake
On 03/24/2014 12:54 PM, Peter Krempa wrote: On 03/24/14 19:50, Eric Blake wrote: Emacs gets lost when finding function boundaries when #ifdef sections do not have balanced {}. * libvirt-override.c (libvirt_PyString_Check): New define. (virPyDictToTypedParams): Avoid unbalanced {} across

Re: [libvirt] [PATCH v8 resend 1/4] add new virDomainCoreDumpWithFormat API

2014-03-24 Thread Eric Blake
On 03/22/2014 09:51 PM, Wen Congyang wrote: From: Qiao Nuohan qiaonuo...@cn.fujitsu.com --memory-only option is introduced without compression supported. Now qemu has support dumping domain's memory in kdump-compressed format. This patch is adding new virDomainCoreDumpWithFormat API, so

Re: [libvirt] [PATCH v8 resend 4/4] allow virsh dump --memory-only specify dump format

2014-03-24 Thread Eric Blake
On 03/22/2014 09:51 PM, Wen Congyang wrote: From: Qiao Nuohan qiaonuo...@cn.fujitsu.com This patch adds [--format] string to virsh dump --memory-only, which is changed to use the new virDomainCoreDumpWithFormat API. And --compress is added as an alias for --format kdump-zlib.

Re: [libvirt] [TCK][PATCH] Remove whitespace differences in network tmp files

2014-03-24 Thread Eric Blake
On 03/24/2014 10:42 AM, Mike Latimer wrote: The network/100-apply-verify-host.t test compares the results of various network commands (route, iptables, ebtables, etc...) against known, valid results. Depending on the versions of these tools, minor whitespace differences in command output can

Re: [libvirt] [python PATCH 1/2] qemu: support arbitrary monitor events

2014-03-24 Thread Eric Blake
On 03/24/2014 08:32 AM, Pavel Hrdina wrote: On 5.2.2014 03:01, Eric Blake wrote: Wrap the new virConnectDomainQemuMonitorEventRegister function being added in libvirt 1.2.2. This patch copies heavily from network events (commit 6ea5be0) and from event loop callbacks in libvirt-override.c,

Re: [libvirt] [TCK][PATCH] Rename .pl tests to .t

2014-03-24 Thread Eric Blake
On 03/24/2014 11:11 AM, Mike Latimer wrote: Commit 97c6a506 added several storage tests with a .pl extension. Rather than enable .pl tests, this patch simply renames these tests to .t. --- scripts/storage/{400-vol-download.pl = 400-vol-download.t} | 0

Re: [libvirt] [PATCH 0/2] sanlock: Forbid unsupported lock failure actions

2014-03-24 Thread Eric Blake
On 03/24/2014 07:50 AM, Jiri Denemark wrote: Some lock failure actions do not make any sense in combination with sanlock driver. Let's just report an error if someone tries to use them instead of causing unexpected and possibly quite bad thing to happen. ACK series. However, are we missing

Re: [libvirt] [PATCH] Add utility functions for storing uninstalled location

2014-03-24 Thread Eric Blake
On 03/23/2014 02:22 AM, Nehal J Wani wrote: When libvirtd is run from a build directory without being installed, it should not depend on files from a libvirt package installed in the system. Currently, APIs defined in src/ don't know whether libvirtd is being run from the build dir or the

[libvirt] Crash when using python-libvirt setSchedulerParameters

2014-03-24 Thread Brian Rak
I'm seeing a very weird (and somewhat reproducable) crash in setSchedulerParameters. The backtrace looks like this: *** glibc detected *** python2.7: free(): invalid pointer: 0x0152bc48 *** === Backtrace: = /lib64/libc.so.6(+0x76166)[0x7faa9e991166]

Re: [libvirt] [PATCH] Add utility functions for storing uninstalled location

2014-03-24 Thread Eric Blake
On 03/24/2014 02:54 PM, Eric Blake wrote: On 03/23/2014 02:22 AM, Nehal J Wani wrote: When libvirtd is run from a build directory without being installed, it should not depend on files from a libvirt package installed in the system. Currently, APIs defined in src/ don't know whether libvirtd

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

2014-03-24 Thread Eric Blake
While we aren't impacted by most of upstream's changes this month, at least the regex improvement looks useful. * gnulib: Synchronize to upstream. --- Pushing under trivial rule before we go into freeze. * .gnulib 72fb907...ce457d6 (16): gitlog-to-changelog: include a dummy git-log-fix file

Re: [libvirt] [TCK][PATCH] Remove whitespace differences in network tmp files

2014-03-24 Thread Mike Latimer
On Monday, March 24, 2014 02:24:23 PM Eric Blake wrote: 'sed -i' is not portable (it is a GNU-ism) - but it's not the first time we've assumed GNU tools in this testsuite so I can overlook it. Ok. I'll keep that in mind in the future. If you'd rather the -i not be used, it's easy enough to

Re: [libvirt] [PATCH] Add utility functions for storing uninstalled location

2014-03-24 Thread Eric Blake
On 03/24/2014 03:19 PM, Eric Blake wrote: Note that the testsuite knows how to run uninstalled libvirt_iohelper when testing fdstream.c directly, but also note that virfile.c uses libvirt_iohelper but never uses its overridden location - our existing override is only half-baked. And even

Re: [libvirt] [PATCH v3 3/5] qemu: Track domain quiesced status

2014-03-24 Thread Jon Bernard
* Tomoki Sekiyama tomoki.sekiy...@hds.com wrote: Adds an quiesced flag into qemuDomainObjPrivate that tracks whether guest filesystems of the domain is quiesced or not. It also modify error code from qemuDomainSnapshotFSFreeze and qemuDomainSnapshotFSThaw, so that a caller can know whether

Re: [libvirt] [PATCH 2/2] Fix apparmor profile to make vfio pci passthrough work

2014-03-24 Thread Serge Hallyn
Quoting Cédric Bosdonnat (cbosdon...@suse.com): See lp#1276719 for the bug description. As virt-aa-helper doesn't know Great, thanks for addressing this. the VFIO groups to use for the guest, Is there really no way for it to know that (based on xml)? If not then I guess this is the way to go