[libvirt] [libvirt-sandbox][PATCH] Add missing get_unit_path function into class Container

2013-05-24 Thread Alex Jia
RHBZ:https://bugzilla.redhat.com/show_bug.cgi?id=966307 Signed-off-by: Alex Jia a...@redhat.com --- With the patch, we can successfully clone an existing Secure container, but I met a Warning, I think it may be a LibvirtGObject question, # virt-sandbox-service clone http1 clonebox Created

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 06:59, Deepak C Shetty ha scritto: Hi List, Facing issues trying to use virDomainAttachDevice API of libvirt from python. Here is what I am trying to do 1) Setup qemu-nbd to export a qcow2 disk image over unix socket on my localhost qemu-nbd -t -k /tmp/mysock2

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-24 Thread Deepak C Shetty
On 05/24/2013 12:38 PM, Paolo Bonzini wrote: Il 24/05/2013 06:59, Deepak C Shetty ha scritto: What version of libvirt is this? It should work starting from 1.0.4. Ah, thats what I seem to have missed. I was using the distro provided libvirt.. which seems to be old (0.9)! I will compile

[libvirt] [PATCH] virCgroupAddTaskStrController: s/-1/-ENOMEM/

2013-05-24 Thread Michal Privoznik
Within whole vircgroup.c we 'return -errno', e.g. 'return -ENOMEM'. However, in this specific function virCgroupAddTaskStrController we weren't returning -ENOMEM but -1 despite fact that later in the function we are returning one of errno values indeed. --- Notes: Pushing under trivial rule.

Re: [libvirt] [PATCH v4 09/13] Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/*

2013-05-24 Thread Michal Privoznik
On 23.05.2013 23:10, Eric Blake wrote: On 05/20/2013 11:55 AM, Michal Privoznik wrote: --- 34 files changed, 357 insertions(+), 570 deletions(-) I've got my work cut out for me! @@ -226,8 +228,11 @@ char *virBitmapFormat(virBitmapPtr bitmap) return NULL; cur =

Re: [libvirt] [PATCH] virsh: Fix regression of vol-resize

2013-05-24 Thread Ján Tomko
On 05/24/2013 06:05 AM, Osier Yang wrote: Introduced by commit 1daa4ba33acf. vshCommandOptStringReq returns 0 on *success* or the option is not required not present, both are right result. Error out when returning 0 is not correct. --- tools/virsh-volume.c | 2 +- 1 file changed, 1

Re: [libvirt] [PATCH v4 13/13] Introduce syntax-check rule to prefer VIR_STRDUP over strdup

2013-05-24 Thread Michal Privoznik
On 23.05.2013 21:34, Eric Blake wrote: On 05/20/2013 11:55 AM, Michal Privoznik wrote: --- cfg.mk | 8 1 file changed, 8 insertions(+) diff --git a/cfg.mk b/cfg.mk index bb93c6a..c714915 100644 --- a/cfg.mk +++ b/cfg.mk @@ -387,6 +387,11 @@ sc_prohibit_asprintf: halt='use

Re: [libvirt] two hostdev devices problem

2013-05-24 Thread Dominik Mostowiec
Hi, I have libnl3, kernel 3.8.8, os ubuntu 12.04, net:intel10G. Upgrade libnl to 3.2.16 not helps, I don't know - this is probably another problem, when I have set max_vfs=35,35 VF is attaching to VM but mac in VM is not set propertly. Libvirt probably set this macs because in syslog: May 23

Re: [libvirt] [PATCH] virsh: Fix regression of vol-resize

2013-05-24 Thread Osier Yang
On 24/05/13 16:18, Ján Tomko wrote: On 05/24/2013 06:05 AM, Osier Yang wrote: Introduced by commit 1daa4ba33acf. vshCommandOptStringReq returns 0 on *success* or the option is not required not present, both are right result. Error out when returning 0 is not correct. --- tools/virsh-volume.c

[libvirt] [PATCH 0/3 v3] Cgroup fixes

2013-05-24 Thread Osier Yang
Instead of only post v2 of 5/7 (v2) in the old mail thread, this resend the left patches of v2 with a independant thread for easy reviewing. v2 - v3: * 1/7 ~ 4/7 of v1 are pushed. * goto label cleanup is kept with Daniel's suggestion for 5/7 (v1) * Commit log of 6/7 (v1) are updated a bit

[libvirt] [PATCH 2/3] qemu: Set cpuset.cpus for domain process

2013-05-24 Thread Osier Yang
When either cpuset of vcpu is specified, or the placement of vcpu is auto, only setting the cpuset.mems might cause the guest starting to fail. E.g. (placement of both vcpu and numatune is auto): 1) Related XMLs vcpu placement='auto'4/vcpu numatune memory mode='strict' placement='auto'/

Re: [libvirt] [PATCH 00/12 v2] storage_conf: left cleanup/fixes/improvement patches

2013-05-24 Thread Osier Yang
On 22/05/13 20:05, Osier Yang wrote: Ping. 10/12 is outdated after Michal's patches are pushed. Part of v1 are pushed, the left patches are splitted Osier Yang (12): storage_conf: Fix the wrong error message storage_conf: Don't leak uuid in virStoragePoolDefParseAuthCephx

[libvirt] [PATCH 1/3] qemu: Abstract code for the cpu controller setting into a helper

2013-05-24 Thread Osier Yang
--- src/qemu/qemu_cgroup.c | 55 +- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index bb1b235..cf46993 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -676,6

[libvirt] [PATCH 3/3] qemu: Prohibit getting the numa parameters if mode is not strict

2013-05-24 Thread Osier Yang
I don't see any reason to getting the numa parameters if mode is not strict, as long as setNumaParameters doesn't allow to set nodeset if the mode is not strict, and cpuset.mems only understand strict mode. Things could be changed if we support to get numa parameters with libnuma one day, but

[libvirt] [PATCH 0/2] Fix the display of *virsh vcpuinfo* command.

2013-05-24 Thread yangdongsheng
Hi, I found some confusion in display of commad *virsh vcpuinfo domname* . There is no diffrence between a cpu offline and a cpu online but not be set for the affinity of vcpu, both are '-'. But users will find the difference of them in using them for a same action (such as vcpupin) and be

[libvirt] [PATCH 2/2] tool/virsh-domain.c: Fix the display of Affinity in function cmdVcpuinfo.

2013-05-24 Thread yangdongsheng
(1).Introduce a symbol 'x' to mean the physical cpu on host is offline. (2).And the symbol '-' means the physical cpu on host is online but the affinity of domain for this cpu is not set. There was no diffrence in display between the two kinds of cpu state before this patch, both are '-'.

[libvirt] [PATCH 1/2] tool/virsh-domain.c: Add a vshNodeGetCPUMap function to get cpumap of host.

2013-05-24 Thread yangdongsheng
Get CPU map of host node CPUs by trying virNodeGetCPUMap and falling back to virNodeGetCPUStats. Signed-off-by: yangdongsheng yangds.f...@cn.fujitsu.com --- tools/virsh-domain.c | 55 ++ 1 file changed, 55 insertions(+) diff --git

[libvirt] [PATCH] syntax-check: ignore all quoted strings in bracket-spacing

2013-05-24 Thread Ján Tomko
Ignore strings with an escaped double quote too. This removes the need for special handling of quotes in the semicolon check. --- build-aux/bracket-spacing.pl | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/build-aux/bracket-spacing.pl

Re: [libvirt] [PATCH] Fix blkdeviotune for shutoff domain

2013-05-24 Thread Jiri Denemark
On Thu, May 23, 2013 at 14:37:31 +0200, Martin Kletzander wrote: Function qemuDomainSetBlockIoTune() was creating job and checking QEMU capabilities even when !(flags VIR_DOMAIN_AFFECT_LIVE) and the domain was shutoff. Fix this with a little cleanup. Actually, the job needs to be hold for

[libvirt] [PATCH 1/2] virStrndup: Accept negative values as string length

2013-05-24 Thread Michal Privoznik
It may shorten the code a bit as the following pattern: VIR_STRNDUP(dst, src, cond ? n : strlen(src)) is used on several places among our code. However, we can move the strlen into virStrndup and thus write just: VIR_STRNDUP(dst, src, cond ? n : -1) --- src/util/virstring.c | 7 ++-

[libvirt] [PATCH 2/2] Adapt to new VIR_STRNDUP behavior

2013-05-24 Thread Michal Privoznik
With previous patch, we accept negative value as length of string to duplicate. So there is no need to pass strlen(src) in case we want to do duplicate the whole string. --- src/conf/domain_conf.c | 6 ++ src/qemu/qemu_command.c | 14 ++ src/util/virsexpr.c | 2 +-

[libvirt] [PATCH v2] Fix blkdeviotune for shutoff domain

2013-05-24 Thread Martin Kletzander
Function qemuDomainSetBlockIoTune() was checking QEMU capabilities even when !(flags VIR_DOMAIN_AFFECT_LIVE) and the domain was shutoff, resulting in the following problem: virsh # domstate asdf; blkdeviotune asdf vda --write-bytes-sec 100 shut off error: Unable to change block I/O throttle

Re: [libvirt] [PATCH] cgroups: Do not enforce nonexistent controllers

2013-05-24 Thread Michal Privoznik
On 23.05.2013 15:26, Viktor Mihajlovski wrote: Currently, the controllers argument to virCgroupDetect acts both as a result filter and a required controller specification, which is a bit overloaded. If both functionalities are needed, it would be better to have them seperated into a filter and

Re: [libvirt] [PATCH] cgroups: Do not enforce nonexistent controllers

2013-05-24 Thread Viktor Mihajlovski
On 05/24/2013 12:20 PM, Michal Privoznik wrote: ACKed and pushed. Michal Thanks, glad it made it before freeze -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung:

[libvirt] [PATCH 2/4] Remove redundant two-state integers

2013-05-24 Thread Ján Tomko
--- src/conf/network_conf.c | 5 ++--- src/conf/storage_conf.c | 5 ++--- src/nwfilter/nwfilter_dhcpsnoop.c | 8 +--- src/qemu/qemu_process.c | 9 +++-- src/util/virnetdev.c | 19 +-- 5 files changed, 17 insertions(+), 29

[libvirt] [PATCH 0/4] Assorted bool cleanups

2013-05-24 Thread Ján Tomko
Found by: git grep '= 1' Ján Tomko (4): Replace two-state local integers with bool Remove redundant two-state integers nwfilter: change two-state int parameters to bool qemu: change two-state int parameters to bool src/conf/domain_conf.c| 18 +-

[libvirt] [PATCH 1/4] Replace two-state local integers with bool

2013-05-24 Thread Ján Tomko
Found with 'git grep = 1'. --- src/conf/domain_conf.c| 18 +- src/conf/nwfilter_conf.c | 56 +++ src/lxc/lxc_controller.c | 4 +-- src/lxc/lxc_process.c | 4 +--

[libvirt] [PATCH 3/4] nwfilter: change two-state int parameters to bool

2013-05-24 Thread Ján Tomko
--- src/nwfilter/nwfilter_ebiptables_driver.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c index ffb597a..c4fcde6 100644 ---

[libvirt] [PATCH 4/4] qemu: change two-state int parameters to bool

2013-05-24 Thread Ján Tomko
--- src/qemu/qemu_capabilities.c | 13 +++-- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_hostdev.c | 6 +++--- tests/qemuhelptest.c | 5 +++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

Re: [libvirt] [PATCH v2] Fix blkdeviotune for shutoff domain

2013-05-24 Thread Jiri Denemark
On Fri, May 24, 2013 at 11:57:32 +0200, Martin Kletzander wrote: Function qemuDomainSetBlockIoTune() was checking QEMU capabilities even when !(flags VIR_DOMAIN_AFFECT_LIVE) and the domain was shutoff, resulting in the following problem: virsh # domstate asdf; blkdeviotune asdf vda

Re: [libvirt] [PATCH 01/12] storage_conf: Fix the wrong error message

2013-05-24 Thread Ján Tomko
On 05/22/2013 02:05 PM, Osier Yang wrote: It's for parsing login attribute of auth. --- src/conf/storage_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 6cb98bf..bd8eef0 100644 --- a/src/conf/storage_conf.c

Re: [libvirt] [PATCH 02/12] storage_conf: Don't leak uuid in virStoragePoolDefParseAuthCephx

2013-05-24 Thread Ján Tomko
On 05/22/2013 02:05 PM, Osier Yang wrote: Any string returned from virXPathString should be freed. --- src/conf/storage_conf.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) ACK Jan -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] two hostdev devices problem

2013-05-24 Thread Laine Stump
On 05/24/2013 04:45 AM, Dominik Mostowiec wrote: Hi, I have libnl3, kernel 3.8.8, os ubuntu 12.04, net:intel10G. Upgrade libnl to 3.2.16 not helps, I don't know - this is probably another problem, when I have set max_vfs=35,35 VF is attaching to VM but mac in VM is not set propertly. Do

Re: [libvirt] [PATCH 06/12] storage_conf: Fix the error type

2013-05-24 Thread Ján Tomko
On 05/22/2013 02:05 PM, Osier Yang wrote: s/VIR_ERR_INTERNAL_ERROR/VIR_ERR_XML_ERROR/. --- src/conf/storage_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 04/12] storage_conf: Use xmlStrEqual instead of STREQ

2013-05-24 Thread Ján Tomko
On 05/22/2013 02:05 PM, Osier Yang wrote: And improve the error message --- src/conf/storage_conf.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) ACK Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 05/12] storage_conf: Put %s at the same line with error type

2013-05-24 Thread Ján Tomko
On 05/22/2013 02:05 PM, Osier Yang wrote: Trivial, but it allows the error message to have more spaces. --- src/conf/storage_conf.c | 95 - 1 file changed, 47 insertions(+), 48 deletions(-) ACK Jan -- libvir-list mailing list

Re: [libvirt] [PATCH 03/12] storage_conf: Remove the useless casting

2013-05-24 Thread Ján Tomko
On 05/22/2013 02:05 PM, Osier Yang wrote: --- src/conf/storage_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 073099b..6f89f1c 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c ACK

Re: [libvirt] [PATCH 1/2] tool/virsh-domain.c: Add a vshNodeGetCPUMap function to get cpumap of host.

2013-05-24 Thread Peter Krempa
On 05/24/13 11:21, yangdongsheng wrote: Get CPU map of host node CPUs by trying virNodeGetCPUMap and falling back to virNodeGetCPUStats. Signed-off-by: yangdongsheng yangds.f...@cn.fujitsu.com --- tools/virsh-domain.c | 55 ++ 1 file changed,

Re: [libvirt] [PATCH 09/12] storage_conf: Use NULLSTR instead

2013-05-24 Thread Ján Tomko
On 05/22/2013 02:05 PM, Osier Yang wrote: --- src/conf/storage_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 4c08cea..1f376ef 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1485,7

Re: [libvirt] [PATCH] nwfilter: Remove error report in virNWFilterDHCPSnoopEnd

2013-05-24 Thread Stefan Berger
On 04/11/2013 09:20 PM, Laine Stump wrote: On 04/11/2013 04:30 PM, Stefan Berger wrote: Remove error reporting when calling the virNWFilterDHCPSnoopEnd function with an interface for which no thread is snooping traffic. Document the usage of this function. Signed-off-by: Stefan Berger

[libvirt] [PATCH] qemuOpenVhostNet: Decrease vhostfdSize on open failure

2013-05-24 Thread Michal Privoznik
Currently, if there's an error opening /dev/vhost-net (e.g. because it doesn't exist) but it's not required we proceed with vhostfd array filled with -1 and vhostfdSize unchanged. Later, when constructing the qemu command line only non-negative items within vhostfd array are taken into account.

Re: [libvirt] [PATCH 2/2] Adapt to new VIR_STRNDUP behavior

2013-05-24 Thread Michal Privoznik
On 24.05.2013 11:53, Michal Privoznik wrote: With previous patch, we accept negative value as length of string to duplicate. So there is no need to pass strlen(src) in case we want to do duplicate the whole string. --- src/conf/domain_conf.c | 6 ++ src/qemu/qemu_command.c | 14

Re: [libvirt] two hostdev devices problem

2013-05-24 Thread Dominik Mostowiec
Hi, Do you have this problem with mac addresses when max_vfs is set to an even lower number? No, When max_fs=10, macs in VM are OK. Phisical interfaces: ifconfig eth0 eth0 Link encap:Ethernet HWaddr b8:ca:3a:5b:a6:38 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1

Re: [libvirt] [PATCH v2] Fix blkdeviotune for shutoff domain

2013-05-24 Thread Martin Kletzander
On 05/24/2013 01:14 PM, Jiri Denemark wrote: On Fri, May 24, 2013 at 11:57:32 +0200, Martin Kletzander wrote: Function qemuDomainSetBlockIoTune() was checking QEMU capabilities even when !(flags VIR_DOMAIN_AFFECT_LIVE) and the domain was shutoff, resulting in the following problem: virsh #

Re: [libvirt] [PATCH 1/2] virStrndup: Accept negative values as string length

2013-05-24 Thread Eric Blake
On 05/24/2013 03:53 AM, Michal Privoznik wrote: It may shorten the code a bit as the following pattern: VIR_STRNDUP(dst, src, cond ? n : strlen(src)) is used on several places among our code. However, we can move the strlen into virStrndup and thus write just: VIR_STRNDUP(dst, src,

Re: [libvirt] [PATCH 2/2] Adapt to new VIR_STRNDUP behavior

2013-05-24 Thread Eric Blake
On 05/24/2013 06:57 AM, Michal Privoznik wrote: On 24.05.2013 11:53, Michal Privoznik wrote: With previous patch, we accept negative value as length of string to duplicate. So there is no need to pass strlen(src) in case we want to do duplicate the whole string. --- -if

Re: [libvirt] [PATCH 2/2] Adapt to new VIR_STRNDUP behavior

2013-05-24 Thread Eric Blake
On 05/24/2013 03:53 AM, Michal Privoznik wrote: With previous patch, we accept negative value as length of string to duplicate. So there is no need to pass strlen(src) in case we want to do duplicate the whole string. --- src/conf/domain_conf.c | 6 ++ src/qemu/qemu_command.c | 14

[libvirt] [PATCH] spec: Build vbox packages only for x86 architectures

2013-05-24 Thread Viktor Mihajlovski
Commit 6ab6bc19f03513fd87d29ecfd405bb7f4a7de114 has introduced separate daemon/driver packages for vbox. These should only be built for x86 architectures which is done hereby. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- libvirt.spec.in |5 + 1 file changed, 5

Re: [libvirt] [PATCH] syntax-check: ignore all quoted strings in bracket-spacing

2013-05-24 Thread Eric Blake
On 05/24/2013 03:26 AM, Ján Tomko wrote: Ignore strings with an escaped double quote too. This removes the need for special handling of quotes in the semicolon check. --- build-aux/bracket-spacing.pl | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

Re: [libvirt] [PATCH] syntax-check: ignore all quoted strings in bracket-spacing

2013-05-24 Thread Ján Tomko
On 05/24/2013 03:53 PM, Eric Blake wrote: On 05/24/2013 03:26 AM, Ján Tomko wrote: Ignore strings with an escaped double quote too. This removes the need for special handling of quotes in the semicolon check. --- build-aux/bracket-spacing.pl | 13 - 1 file changed, 4

Re: [libvirt] [PATCH 0/2] Fix the display of *virsh vcpuinfo* command.

2013-05-24 Thread Eric Blake
On 05/24/2013 03:21 AM, yangdongsheng wrote: Hi, [uggh; yet another victim of git's stupidity in using In-reply-to: y if you answer the 'git send-email' question incorrectly - just hit enter rather than filling in a response to that question] Would you mind resending this as a top-level thread,

Re: [libvirt] [PATCH 10/12] storage_conf: Use VIR_STRDUP instead of strdup

2013-05-24 Thread Eric Blake
On 05/22/2013 06:05 AM, Osier Yang wrote: --- src/conf/storage_conf.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) I think this was independently fixed by the STRDUP patch series. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [libvirt] [PATCH 12/12] storage_conf: Use uid_t/gid_t instead of int to cast the value

2013-05-24 Thread Eric Blake
On 05/22/2013 06:05 AM, Osier Yang wrote: And error out if the casted value is not same with the original one, which prevents the bug on platform(s) where uid_t/gid_t has different size with long. --- src/conf/storage_conf.c | 13 - 1 file changed, 8 insertions(+), 5

Re: [libvirt] [PATCH] syntax-check: ignore all quoted strings in bracket-spacing

2013-05-24 Thread Eric Blake
On 05/24/2013 03:26 AM, Ján Tomko wrote: Ignore strings with an escaped double quote too. This removes the need for special handling of quotes in the semicolon check. --- build-aux/bracket-spacing.pl | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) Hmm, our semicolon

Re: [libvirt] [PATCH 06/12] storage_conf: Fix the error type

2013-05-24 Thread Osier Yang
On 24/05/13 20:05, Ján Tomko wrote: On 05/22/2013 02:05 PM, Osier Yang wrote: s/VIR_ERR_INTERNAL_ERROR/VIR_ERR_XML_ERROR/. --- src/conf/storage_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK Thanks, 1/12 ~ 6/12 are pushed. -- libvir-list mailing list

Re: [libvirt] [PATCH] qemuOpenVhostNet: Decrease vhostfdSize on open failure

2013-05-24 Thread Laine Stump
On 05/24/2013 08:50 AM, Michal Privoznik wrote: Currently, if there's an error opening /dev/vhost-net (e.g. because it doesn't exist) but it's not required we proceed with vhostfd array filled with -1 and vhostfdSize unchanged. Later, when constructing the qemu command line only non-negative

Re: [libvirt] Ongoing work on lock contention in qemu driver?

2013-05-24 Thread Peter Feiner
On Wed, May 22, 2013 at 7:31 PM, Peter Feiner pe...@gridcentric.ca wrote: Since some security driver operations are costly, I think it's worthwhile to reduce the scope of the security manager lock or increase the granularity by introducing more locks. After a cursory look, the security manager

Re: [libvirt] two hostdev devices problem

2013-05-24 Thread Laine Stump
On 05/24/2013 09:16 AM, Dominik Mostowiec wrote: Do you have this problem with mac addresses when max_vfs is set to an even lower number? First - I just got confirmation from the libnl maintainer that the bug I mentioned causing problems with max_vfs 50 *is* an issue in libnl 3.2.16 - it is

Re: [libvirt] [PATCH] spec: Build vbox packages only for x86 architectures

2013-05-24 Thread Eric Blake
On 05/24/2013 07:44 AM, Viktor Mihajlovski wrote: Commit 6ab6bc19f03513fd87d29ecfd405bb7f4a7de114 has introduced separate daemon/driver packages for vbox. These should only be built for x86 architectures which is done hereby. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com ---

Re: [libvirt] [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information

2013-05-24 Thread Michael S. Tsirkin
On Fri, May 24, 2013 at 05:20:13PM +0200, Markus Armbruster wrote: Eric Blake ebl...@redhat.com writes: On 05/24/2013 06:23 AM, Luiz Capitulino wrote: I don't think we need this argument. This command is quite simple in its response, let's do this filtering in HMP only. Event message

[libvirt] [PATCH 2/2] syntax-check: mandate space after mid-line semicolon

2013-05-24 Thread Eric Blake
Enforce the style cleanup in the previous patch. * build-aux/bracket-spacing.pl: Enforce trailing spacing. * cfg.mk (bracket-spacing-check): Tweak error wording. * docs/hacking.html.in: Document the rule. * HACKING: Regenerate. Signed-off-by: Eric Blake ebl...@redhat.com --- HACKING

[libvirt] [PATCH 0/2] More semicolon cleanups

2013-05-24 Thread Eric Blake
In response to: https://www.redhat.com/archives/libvir-list/2013-May/msg01791.html Eric Blake (2): syntax: prefer space after semicolon in for loop syntax-check: mandate space after mid-line semicolon HACKING | 23 +++ build-aux/bracket-spacing.pl

[libvirt] [PATCH 1/2] syntax: prefer space after semicolon in for loop

2013-05-24 Thread Eric Blake
I noticed several unusual spacings in for loops, and decided to fix them up. See the next commit for the syntax check that found all of these. * examples/domsuspend/suspend.c (main): Fix spacing. * python/libvirt-override.c: Likewise. * src/conf/interface_conf.c: Likewise. *

Re: [libvirt] [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information

2013-05-24 Thread Eric Blake
On 05/24/2013 10:12 AM, Michael S. Tsirkin wrote: Event message contains the net client name, management might only want to query the single net client. The client can do the filtering itself. I'm not sure I buy the responsiveness argument. Sure, the fastest I/O is no I/O, but whether

Re: [libvirt] [PATCH] esx: Fix dynamic VI object type detection

2013-05-24 Thread Matthias Bolte
2013/5/20 Eric Blake ebl...@redhat.com: On 05/18/2013 04:03 PM, Matthias Bolte wrote: VI objects support inheritance with subtype polymorphism. For example the FileInfo object type is extended by FloppyImageFileInfo, FolderFileInfo etc. Then SearchDatastore_Task returns an array of FileInfo

Re: [libvirt] [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information

2013-05-24 Thread Luiz Capitulino
On Fri, 24 May 2013 12:05:12 -0600 Eric Blake ebl...@redhat.com wrote: On 05/24/2013 10:12 AM, Michael S. Tsirkin wrote: Event message contains the net client name, management might only want to query the single net client. The client can do the filtering itself. I'm not sure I

[libvirt] [PATCH 0/3] qemu: Fix how files are being opened

2013-05-24 Thread Martin Kletzander
There were some places in the code, where files were being opened with uid:gid of the daemon instead of the qemu process related to the file. First patch exposes the parseIds() function in order for it to be used somewhere else in the code than in the DAC security driver. The next patch fixes

[libvirt] [PATCH 2/3] Make qemuOpenFile aware of per-VM DAC seclabel.

2013-05-24 Thread Martin Kletzander
Function qemuOpenFile() haven't had any idea about seclabels applied to VMs only, so in case the seclabel differed from the user:group from configuration, there might have been issues with opening files. Make qemuOpenFile() VM-aware, but only optionally, passing NULL argument means skipping VM

[libvirt] [PATCH 1/3] Expose ownership ID parsing

2013-05-24 Thread Martin Kletzander
Parsing 'user:group' is useful even outside the DAC security driver, so expose the most abstract function which has no DAC security driver bits in itself. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/libvirt_private.syms| 1 + src/security/security_dac.c | 51

[libvirt] [PATCH 3/3] Use qemuOpenFile in qemu_driver.c

2013-05-24 Thread Martin Kletzander
On two places, the usage of open() is replaced with qemuOpenFile as that is the preferred method in those cases. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963881 Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/qemu/qemu_driver.c | 16 +--- 1 file changed, 5

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-24 Thread Paolo Bonzini
Il 24/05/2013 10:01, Deepak C Shetty ha scritto: Il 24/05/2013 06:59, Deepak C Shetty ha scritto: What version of libvirt is this? It should work starting from 1.0.4. Ah, thats what I seem to have missed. I was using the distro provided libvirt.. which seems to be old (0.9)! I will

Re: [libvirt] virStream double unref in virChrdevOpen()

2013-05-24 Thread Eric Blake
On 05/18/2013 02:22 AM, Sergey Fionov wrote: Hello, There is double unref virChrdevOpen() (src/conf/virchrdev.c) when error occured. if (virStreamRef(st) 0) { virMutexUnlock(devs-lock); return -1; } Thanks again for the report. I didn't see a reply to this

Re: [libvirt] [Qemu-devel] [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line

2013-05-24 Thread Eric Blake
On 05/22/2013 08:29 AM, Anthony Liguori wrote: Peter Maydell peter.mayd...@linaro.org writes: On 22 May 2013 14:15, Anthony Liguori aligu...@us.ibm.com wrote: Paolo Bonzini pbonz...@redhat.com writes: You don't need to know what targets were supported in the version that you compiled from.

Re: [libvirt] [PATCH] qemu: save domain state to XML after reboot

2013-05-24 Thread Eric Blake
On 05/18/2013 05:47 AM, Sergey Fionov wrote: Currently qemuDomainReboot() does reboot in two phases: qemuMonitorSystemPowerdown() and qemuProcessFakeReboot(). qemuMonitorSystemPowerdown() shutdowns the domain and saves domain state/reason as VIR_DOMAIN_SHUTDOWN_UNKNOWN.

Re: [libvirt] [PATCH] Introduce startupPolicy for chardev to make guest OS bootable when hardware failure happens in log disk

2013-05-24 Thread Eric Blake
On 05/02/2013 11:26 AM, Seiji Aguchi wrote: The subject line is a bit long for a patch. 'git shortlog -30' will give you an idea of typical subject lines; I'm modifying this to: xml: introduce startupPolicy for chardev device [Problem] Currently, guest OS's messages can be logged to a local

[libvirt] [PATCH] Expose all CPU features in host definition

2013-05-24 Thread Don Dugger
I've opened BZ 697141 on this as I would consider it more a bug than a feature request. Anyway, to re-iterate my rationale from the BZ: The virConnectGetCapabilities API describes the host capabilities by returning an XML description that includes the CPU model name and a set of CPU features.

[libvirt] [PATCHv2] xml: introduce startupPolicy for chardev device

2013-05-24 Thread Eric Blake
From: Seiji Aguchi seiji.agu...@hds.com [Problem] Currently, guest OS's messages can be logged to a local disk of host OS by creating chadevs with options below. -chardev file,id=charserial0,path=log file's path -device isa-serial,chardev=chardevserial0,id=serial0 When a hardware failure