[libvirt] [PATCH 2/2] test: add lsi and virtio-scsi qemu caps in testcases.

2012-08-06 Thread Guannan Ren
--- tests/qemuhelptest.c | 10 +++--- tests/qemuxml2argvtest.c | 16 ++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 012ba26..62afabf 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -482,

[libvirt] [PATCH 1/2] qemu: add two qemu caps for lsi and virtio-scsi SCSI controllers

2012-08-06 Thread Guannan Ren
Rename qemuDefaultScsiControllerModel to qemuCheckScsiControllerModel. When scsi model is given explicitly in XML(model > 0) checking if the underlying QEMU support it or not first, raise error on checking failure. If the model is not given(mode <= 0), return lsi or virtio-scsi which is supported,

[libvirt] [PATCH 0/2] Add lsi and virtio-scsi qemu caps

2012-08-06 Thread Guannan Ren
On qemu-kvm-0.15.1, it supports only lsi scsi controller model. On qemu-kvm-0.12.1.2, it supports only virtio-scsi-pci scsi model On qemu 1.1.50, it supports both. So, instead of using the lsilogic model by default, the patch tries to check which model the current QEMU supports, then choose it, ls

Re: [libvirt] [PATCH 00/48 v3] Atomic APIs to list objects

2012-08-06 Thread Osier Yang
ping On 2012年08月03日 23:48, Osier Yang wrote: v2 - v3: * Various document fixes/improvements (Suggested by Laine and Eric) * Destroy virdomainlist.[ch], and folder all list helper funcs into its own *_conf.[ch] * Improve the helpers to get the object list. See https://www.redha

Re: [libvirt] [PATCH v2] storage: support all file permissions

2012-08-06 Thread Laine Stump
On 07/26/2012 04:52 AM, Ján Tomko wrote: > sticky, setuid and setgid are no longer ignored. I'm always automatically wary of any code that allows setting the suid bit, in case it may allow some new security hole. I can't think of anything specific that could be allowed by setting the suid bit of a

Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver

2012-08-06 Thread Laine Stump
On 08/06/2012 03:18 PM, Ata Bohra wrote: > But re-thinking the whole design in light of the explanation provided > by you, libvirt interfaces are actually mapping physical interfaces to > virtual network. Further, hostVirtualSwitch behaves like switch which > defines ports where we can plug VM virt

[libvirt] [PATCH 3/5] conf: output forward device connections count in network XML

2012-08-06 Thread Laine Stump
It may be useful for management applications to know which physical network devices are in use by guests. This information is already available in the network objects, but wasn't output in the XML. This patch outputs it whan the INACTIVE flag isn't set (and if it's non-0). --- src/conf/network_con

[libvirt] [PATCH 5/5] network: add connections counter to networks

2012-08-06 Thread Laine Stump
Just as each physical device used by a network has a connections counter, now each network has a connections counter which is incremented once for each guest interface that connects using this network. The count is output in the live network XML, like this: ... It is read-only, and fo

[libvirt] [PATCH 4/5] network: change cleanup: to error: in network*() functions

2012-08-06 Thread Laine Stump
A later patch will be adding a counter that will be incremented/decremented each time an guest interface starts/stops using a particular network. For this to work, all types of networks need to go through a common return sequence rather than returning early. To setup for this, the existing cleanup:

[libvirt] [PATCH 2/5] conf: rename interface "usageCount" to "connections"

2012-08-06 Thread Laine Stump
I want to include this count in the xml output of networks, but calling it "connections" in the XML sounds better than "usageCount", and it would be better if the name in the XML matched the variable name. In a few places, usageCount was being initialized to 0, but this is unnecessary, because VIR

[libvirt] [PATCH 0/5] network: report #connections in network xml

2012-08-06 Thread Laine Stump
The forward devices in direct mode (aka macvtap) networks already have a counter to keep track of how many guest interfaces are using each physical device. This series renames that counter to "connections", then adds another connects counter to the toplevel of each network, and outputs both of thes

[libvirt] [PATCH 1/5] conf: use a unique data type for PF array in virDomainNetDef

2012-08-06 Thread Laine Stump
This array was originally defined using the existing virNetworkForwardIfDef, but that struct has a UsageCount field that isn't used in the case of PFs. This patch just copies that struct and removes UsageCount. It ends up being a struct with a single field, but I left it as a struct in case we need

[libvirt] [PATCH] util: include stderr in log message when an external command fails

2012-08-06 Thread Laine Stump
This patch is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=818467 If a caller to virCommandRun doesn't ask for the exitstatus of the program it's running, the virCommand functions assume that they should log an error message and return failure if the exit code isn't 0. However, o

Re: [libvirt] [PATCH 10/17] Introduce qemudDomainPinHypervisorFlags and qemudDomainGetHypervisorPinInfo in qemu driver.

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Tang Chen Again, a subject line longer than 80 columns. I suggest the much shorter: qemu: support hypervisor pinning > > Introduce 2 APIs to support hypervisor threads pin in qemu driver. > 1) qemudDomainPinHypervisorFlags: setup hypervisor th

Re: [libvirt] [PATCH 09/17] Introduce virDomainPinHypervisorFlags and virDomainGetHypervisorPinInfo functions.

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Tang Chen > > Introduce 2 APIs for client to use. > 1) virDomainPinHypervisorFlags: call remote driver api, such as > remoteDomainPinHypervisorFlags. > 2) virDomainGetHypervisorPinInfo: call remote driver api, such as > remoteDomainGetHyperv

Re: [libvirt] [PATCH 08/17] Introduce virDomainHypervisorPinAdd and virDomainHypervisorPinDel functions

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Tang Chen > > Introduce 2 APIs to support hypervisor threads pin. > 1) virDomainHypervisorPinAdd: setup hypervisor threads pin with a given > cpumap string. > 2) virDomainHypervisorPinDel: remove all hypervisor threads pin. > > Signed-off-by

Re: [libvirt] [PATCH 07/17] Add qemuProcessSetHypervisorAffinites and set hypervisor threads affinities

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Tang Chen > > Hypervisor threads should also be pinned by sched_setaffinity(), just > the same as vcpu threads. Indeed, this fallback makes sense when cpuset cgroup is not present. Same question as earlier in the series - is affinity necessary when

Re: [libvirt] [PATCH 06/17] Introduce qemuSetupCgroupHypervisorPin and synchronize hypervisorpin info to cgroup.

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Tang Chen That's a long subject line (longer than 80! when we usually go for less than 60). I'd suggest: qemu: synchronize hypervisorpin info to cgroup > > Introduce qemuSetupCgroupHypervisorPin() function to add hypervisor threads > pin info to c

Re: [libvirt] [PATCH 05/17] Support hypervisorpin xml parse.

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Tang Chen > > This patch adds a new xml element , I would mention that this is a sibling to the existing element under the . > and also the parser functions, docs, and tests. > hypervisorpin means pinning hypervisor threads, and cpuset = '1' > mean

Re: [libvirt] [PATCH 04/17] Enable cpuset cgroup and synchronous vcpupin info to cgroup.

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Tang Chen > > vcpu threads pin are implemented using sched_setaffinity(), but > not controlled by cgroup. This patch does the following things: > > 1) enable cpuset cgroup > 2) reflect all the vcpu threads pin info to cgroup > > Signed-off-b

Re: [libvirt] [PATCH 03/17] create a new cgroup and move all hypervisor threads to the new cgroup

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Wen Congyang > > Create a new cgroup and move all hypervisor threads to the new cgroup. > And then we can do the other things: > 1. limit only vcpu usage rather than the whole qemu > 2. limit for hypervisor threads(include vhost-net threads) > > Sign

Re: [libvirt] [PATCH 02/17] Introduce the function virCgroupMoveTask

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Wen Congyang > > Introduce a new API to move tasks of one controller from a cgroup to another > cgroup > > Signed-off-by: Wen Congyang > Signed-off-by: Tang Chen > Signed-off-by: Hu Tao > --- > +static int virCgroupAddTaskStrController(virCgroup

Re: [libvirt] [PATCH 2/5] libssh2_transport: add main libssh2 transport implementation

2012-08-06 Thread Eric Blake
On 08/03/2012 08:03 AM, Peter Krempa wrote: > This patch adds helper functions to libssh2 that enable us to use > libssh2 in conjunction with libvirt-native virNetSockets instead of > using a spawned "ssh" client process. > > This implemetation supports tunneled plaintext, keyboard-interactive, s

Re: [libvirt] [PATCH 01/17] Introduce the function virCgroupForHypervisor

2012-08-06 Thread Eric Blake
On 08/03/2012 12:36 AM, Hu Tao wrote: > From: Wen Congyang > > Introduce the function virCgroupForHypervisor() to create sub directory > for hypervisor thread(include I/O thread, vhost-net thread). > > There is already function to create cgroup dir for vcpus. Function > virCgroupForHypervisor()

Re: [libvirt] [PATCH] Add APIs for obtaining the unique ID of LVM & SCSI volumes

2012-08-06 Thread Eric Blake
On 08/02/2012 07:09 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Both LVM volumes and SCSI LUNs have a globally unique > identifier associated with them. It is useful to be able > to query this identifier to then perform disk locking, > rather than try to figure out a stable pat

Re: [libvirt] [PATCH] qemu_agent: support qemu agent general command

2012-08-06 Thread Eric Blake
On 08/05/2012 04:49 PM, MATSUDA, Daiki wrote: > ACK or do I need to re-write ? Given this earlier review... Rather than just 2 flags, can we take an integer timeout parameter? If the parameter is -1, then we don't wait; if the parameter is 0, then we wait forever, otherwise, we wa

Re: [libvirt] [PATCH v3 10/10] Turn virNetClient* into virObject instances

2012-08-06 Thread Eric Blake
On 08/06/2012 05:53 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Make all the virNetClient* objects use virObject APIs for > reference counting > > Signed-off-by: Daniel P. Berrange > --- > src/libvirt_probes.d |4 +- > src/lxc/lxc_monitor.c |4 +- >

Re: [libvirt] [PATCH v3 09/10] Turn virNetServer* into virObject instances

2012-08-06 Thread Eric Blake
On 08/06/2012 05:53 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Make all the virNetServer* objects use the virObject APIs > for reference counting > > Signed-off-by: Daniel P. Berrange > --- > daemon/libvirtd.c | 22 - > daemon/stream.c |

Re: [libvirt] [PATCH v3 08/10] Turn virSocket into a virObject

2012-08-06 Thread Eric Blake
On 08/06/2012 05:53 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Make virSocket use the virObject APIs for reference counting > > Signed-off-by: Daniel P. Berrange > --- > src/libvirt_private.syms |1 - > src/libvirt_probes.d |4 +-- > src/qemu/qemu_migr

Re: [libvirt] [PATCH 4/9] util: utility functions for virNetDevVPortProfile

2012-08-06 Thread Laine Stump
On 08/05/2012 01:16 AM, Laine Stump wrote: > diff --git a/src/util/virnetdevvportprofile.c > b/src/util/virnetdevvportprofile.c > index 6db04f7..176190f 100644 > --- a/src/util/virnetdevvportprofile.c > +++ b/src/util/virnetdevvportprofile.c > [...] > +int virNetDevVPortProfileMerge3(virNetDevVPor

Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver

2012-08-06 Thread Ata Bohra
(Please ignore earlier messages, as for reason the messages got truncated) Thanks Matthias for the explanation, I was working on the project which required libvirt to control/set networking on a given ESX host. As ESXi is different from hosted hypervisors, we need to configure ESX interface (

Re: [libvirt] [PATCH v3 07/10] Turn virKeepAlive into a virObject

2012-08-06 Thread Eric Blake
On 08/06/2012 05:53 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Make virKeepAlive use the virObject APIs for reference counting > > Signed-off-by: Daniel P. Berrange > --- > +++ b/src/rpc/virkeepalive.h > @@ -24,6 +24,7 @@ > # define __VIR_KEEPALIVE_H__ > > # include "vi

[libvirt] [PATCH 9.5/9] network: fix bug in virtualport merging patch

2012-08-06 Thread Laine Stump
The original version of the virtualport merging patch added in a call to virNetDevVPortProfileCheckComplete() (which might fail) after the use count for newly allocated device was incremented. If that function did fail, the use count would be wrong which, in the worst case, would make that physical

Re: [libvirt] [PATCH v3 02/10] Convert public datatypes to inherit from virObject

2012-08-06 Thread Daniel P. Berrange
On Mon, Aug 06, 2012 at 10:57:41AM -0600, Eric Blake wrote: > On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > This converts the following public API datatypes to use the > > virObject infrastructure: > > > > > /** > > - * virReleaseConnect: > > + * virC

Re: [libvirt] [PATCH v3 02/10] Convert public datatypes to inherit from virObject

2012-08-06 Thread Daniel P. Berrange
On Mon, Aug 06, 2012 at 10:44:11AM -0600, Eric Blake wrote: > On 08/06/2012 10:29 AM, Eric Blake wrote: > > On 08/06/2012 10:28 AM, Eric Blake wrote: > >> On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: > >>> From: "Daniel P. Berrange" > >>> > >>> This converts the following public API datatypes

Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver

2012-08-06 Thread Ata Bohra
Thanks Matthias for the explanation, I was working on the project which required libvirt to control/set networking on a given ESX host. I may need > Date: Sun, 5 Aug 2012 22:45:26 +0200 > Subject: Re: [libvirt] [PATCH v5] ESX: Add routines to interface driver > From: matthias.bo...@googlemail.

Re: [libvirt] [Patch v3 0/3] Add QEMU network helper support

2012-08-06 Thread Richa Marwaha
libvir-list-boun...@redhat.com wrote on 08/06/2012 11:18:31 AM: > From: > > Laine Stump > > To: > > libvir-list@redhat.com > > Date: > > 08/06/2012 11:27 AM > > Subject: > > Re: [libvirt] [Patch v3 0/3] Add QEMU network helper support > > Sent by: > > libvir-list-boun...@redhat.com > > On 08/06/2

Re: [libvirt] [PATCH v3 06/10] Turn virNetSASLContext and virNetSASLSession into virObject instances

2012-08-06 Thread Eric Blake
On 08/06/2012 05:53 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Make virNetSASLContext and virNetSASLSession use virObject APIs > for reference counting > > Signed-off-by: Daniel P. Berrange > --- > daemon/remote.c |8 ++-- > src/remote/remote_driver.c |

Re: [libvirt] [PATCH v3 05/10] Turn virNetTLSContext and virNetTLSSession into virObject instances

2012-08-06 Thread Eric Blake
On 08/06/2012 05:53 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Make virNetTLSContext and virNetTLSSession use the virObject > APIs for reference counting > > Signed-off-by: Daniel P. Berrange > --- 'make check' failed: GENcheck-symfile Expected symbol virNetTLSContex

Re: [libvirt] [PATCH v3 04/10] Turn qemuAgentPtr and qemuMonitorPtr into virObjectPtr instances

2012-08-06 Thread Eric Blake
On 08/06/2012 05:53 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Make qemuAgentPtr and qemuMonitorPtr types use the virObject APIs > for reference counting > > Signed-off-by: Daniel P. Berrange > --- ACK. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtuali

Re: [libvirt] [PATCH v3 03/10] Turn virDomainObjPtr into a virObjectPtr

2012-08-06 Thread Eric Blake
On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Switch virDomainObjPtr to use the virObject APIs for reference > counting. The main change is that virObjectUnref does not return > the reference count, merely a bool indicating whether the object > still has any r

Re: [libvirt] [PATCH v3 02/10] Convert public datatypes to inherit from virObject

2012-08-06 Thread Eric Blake
On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > This converts the following public API datatypes to use the > virObject infrastructure: > > /** > - * virReleaseConnect: > + * virConnectDispose: > * @conn: the hypervisor connection to release > * > * Unc

Re: [libvirt] [PATCH v3 02/10] Convert public datatypes to inherit from virObject

2012-08-06 Thread Eric Blake
On 08/06/2012 10:29 AM, Eric Blake wrote: > On 08/06/2012 10:28 AM, Eric Blake wrote: >> On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: >>> From: "Daniel P. Berrange" >>> >>> This converts the following public API datatypes to use the >>> virObject infrastructure: >> > >> >> ACK with the doc f

Re: [libvirt] [PATCH v3 02/10] Convert public datatypes to inherit from virObject

2012-08-06 Thread Eric Blake
On 08/06/2012 10:28 AM, Eric Blake wrote: > On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: >> From: "Daniel P. Berrange" >> >> This converts the following public API datatypes to use the >> virObject infrastructure: > > > ACK with the doc fix. I spoke too soon, 'make check' fails: GEN

Re: [libvirt] [PATCH v3 02/10] Convert public datatypes to inherit from virObject

2012-08-06 Thread Eric Blake
On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > This converts the following public API datatypes to use the > virObject infrastructure: > +virGetConnect(void) > +{ > virConnectPtr ret; > > -if (VIR_ALLOC(ret) < 0) { > -virReportOOMError(); >

Re: [libvirt] [PATCH] Fix save/restore with USB controller in XML.

2012-08-06 Thread Ján Tomko
On 08/03/12 16:54, Ján Tomko wrote: > USB controller gets put on the first place in XML, but the default one > is added at the end of the controllers array. Sorting them before > checking ABI compatibility solves this. > > The default USB controller also doesn't get a PCI address assigned, > makin

Re: [libvirt] [PATCH v2] storage: support all file permissions

2012-08-06 Thread Ján Tomko
On 07/26/12 10:52, Ján Tomko wrote: > sticky, setuid and setgid are no longer ignored. > > --- > v2: reading these permissions from XML works too > --- > src/conf/storage_conf.c |9 ++--- > src/storage/storage_backend.c |3 ++- > 2 files changed, 8 insertions(+), 4 deletions(-)

Re: [libvirt] [PATCH v3 01/10] Add a generic reference counted virObject type

2012-08-06 Thread Eric Blake
On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > This introduces a fairly basic reference counted virObject type > and an associated virClass type, that use atomic operations for > ref counting. > > +virClassPtr virClassNew(const char *name, > +

Re: [libvirt] [Patch v3 0/3] Add QEMU network helper support

2012-08-06 Thread rmarwah
Quoting Michal Privoznik : On 03.08.2012 22:33, rmar...@linux.vnet.ibm.com wrote: From: Richa Marwaha QEMU has a new feature which allows QEMU to execute under an unprivileged user ID and still be able to add a tap device to a Linux network bridge. Below is the link to the QEMU patches f

Re: [libvirt] [Patch v3 0/3] Add QEMU network helper support

2012-08-06 Thread Laine Stump
On 08/06/2012 10:56 AM, Michal Privoznik wrote: > On 03.08.2012 22:33, rmar...@linux.vnet.ibm.com wrote: >> From: Richa Marwaha >> >> QEMU has a new feature which allows QEMU to execute under an unprivileged >> user ID and still be able to >> add a tap device to a Linux network bridge. >> [...]

Re: [libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Martin Kletzander
On 08/06/2012 04:35 PM, Daniel P. Berrange wrote: > On Mon, Aug 06, 2012 at 03:59:42PM +0200, Martin Kletzander wrote: >> On 08/06/2012 02:52 PM, Eric Blake wrote: >>> On 08/06/2012 06:24 AM, Daniel P. Berrange wrote: GLib has a g_ascii_dtostr() which forces uses of '.' as separator. Since >>>

Re: [libvirt] [Patch v3 0/3] Add QEMU network helper support

2012-08-06 Thread Michal Privoznik
On 03.08.2012 22:33, rmar...@linux.vnet.ibm.com wrote: > From: Richa Marwaha > > QEMU has a new feature which allows QEMU to execute under an unprivileged > user ID and still be able to > add a tap device to a Linux network bridge. Below is the link to the QEMU > patches for the bridge helper >

Re: [libvirt] [Patch v3 3/3] apparmor: QEMU bridge helper policy updates

2012-08-06 Thread Michal Privoznik
On 03.08.2012 22:33, rmar...@linux.vnet.ibm.com wrote: > From: Richa Marwaha > > This patch provides AppArmor policy updates for the QEMU bridge helper. > The QEMU bridge helper is a SUID executable exec'd by QEMU that drops > capabilities to CAP_NET_ADMIN and adds a tap device to a network bridg

Re: [libvirt] [Patch v3 1/3] Add -netdev bridge capabilities

2012-08-06 Thread Michal Privoznik
On 03.08.2012 22:33, rmar...@linux.vnet.ibm.com wrote: > From: Richa Marwaha > > This patch adds the capability in libvirt to check if > -netdev bridge option is supported or not. > > Signed-off-by: Richa Marwaha > Signed-off-by: Corey Bryant > --- > v2 > -This is a new patch that helps libvirt

Re: [libvirt] [Patch v3 2/3] Add -netdev bridge support

2012-08-06 Thread Michal Privoznik
On 03.08.2012 22:33, rmar...@linux.vnet.ibm.com wrote: > From: Richa Marwaha > > This patch adds the support to run the QEMU network helper > under unprivileged user. It also adds the support for > attach-interface option in virsh to run under unprivileged > user. > > Signed-off-by: Richa Marwah

Re: [libvirt] [PATCH 0/9] network: properly support openvswitch in

2012-08-06 Thread Kyle Mestery (kmestery)
I just looked at this series and it looks great to me Laine. I think the new flexibility this series introduces will be really nice to have, and it will make starting guests across hosts with differing network types easier as well. Thanks! Kyle On Aug 5, 2012, at 12:16 AM, Laine Stump wrote: > A

Re: [libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Daniel P. Berrange
On Mon, Aug 06, 2012 at 03:59:42PM +0200, Martin Kletzander wrote: > On 08/06/2012 02:52 PM, Eric Blake wrote: > > On 08/06/2012 06:24 AM, Daniel P. Berrange wrote: > >> On Mon, Aug 06, 2012 at 10:12:17AM +0200, Martin Kletzander wrote: > >>> libvirt creates invalid commands if wrong locale is sele

Re: [libvirt] [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-06 Thread Corey Bryant
On 08/06/2012 09:51 AM, Kevin Wolf wrote: Am 06.08.2012 15:32, schrieb Corey Bryant: On 08/06/2012 05:15 AM, Kevin Wolf wrote: Am 03.08.2012 00:21, schrieb Corey Bryant: @@ -84,6 +158,36 @@ int qemu_open(const char *name, int flags, ...) int ret; int mode = 0; +#ifndef _WIN3

Re: [libvirt] [PATCH] build: drop conditional use of mdns code

2012-08-06 Thread Eric Blake
On 08/06/2012 03:56 AM, Daniel P. Berrange wrote: > On Fri, Aug 03, 2012 at 04:33:17PM -0600, Eric Blake wrote: >> Commit 1f6f723 missed a step. At first I was worried that scrubbing >> the conditionals would lead to a runtime failure when compiled without >> avahi, but my testing makes it appear

Re: [libvirt] [PATCH] virrandom: make virRandomInitialize an automatic one-shot

2012-08-06 Thread Eric Blake
On 08/06/2012 03:58 AM, Daniel P. Berrange wrote: > On Fri, Aug 03, 2012 at 05:26:58PM -0600, Eric Blake wrote: >> All callers used the same initialization seed (well, the new >> viratomictest forgot to look at getpid()); so we might as well >> make this value automatic. And while it may feel like

Re: [libvirt] [PATCH] qemu: Migrate at unlimited speed by default

2012-08-06 Thread Eric Blake
On 08/03/2012 12:16 PM, Jiri Denemark wrote: > Previously, qemu did not respond to monitor commands during migration if > the limit was too high. This prevented us from raising the limit > earlier. The qemu issue seems to be fixed (according to my testing) and > we may remove the 32Mb/s limit. > --

Re: [libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Martin Kletzander
On 08/06/2012 02:52 PM, Eric Blake wrote: > On 08/06/2012 06:24 AM, Daniel P. Berrange wrote: >> On Mon, Aug 06, 2012 at 10:12:17AM +0200, Martin Kletzander wrote: >>> libvirt creates invalid commands if wrong locale is selected. For >>> example with locale that uses comma as a decimal point, JSON

Re: [libvirt] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-06 Thread Kevin Wolf
Am 06.08.2012 15:32, schrieb Corey Bryant: > On 08/06/2012 05:15 AM, Kevin Wolf wrote: >> Am 03.08.2012 00:21, schrieb Corey Bryant: > @@ -84,6 +158,36 @@ int qemu_open(const char *name, int flags, ...) >int ret; >int mode = 0; > > +#ifndef _WIN32 > +cons

Re: [libvirt] [PATCH v3 0/5] Per-guest configurable user/group for QEMU processes

2012-08-06 Thread Michal Privoznik
On 03.08.2012 16:18, Marcelo Cerri wrote: > This is a v3 patch series that updates the libvirt's security driver > mechanism to support per-guest configurable user and group for QEMU processes > running together with other security drivers, such as SELinux and AppArmor. > > Comments and feedback

Re: [libvirt] [PATCH v3 4/5] Support for multiple default security drivers in QEMU config

2012-08-06 Thread Michal Privoznik
On 03.08.2012 16:18, Marcelo Cerri wrote: > This patch replaces the key "security_driver" in QEMU config by > "security_drivers", which accepts a list of default drivers. If > "security_drivers" can't be found, libvirt will use "security_driver" to > ensure that it will remain compatible with older

Re: [libvirt] [PATCH v3 3/5] Update security layer to handle many security labels

2012-08-06 Thread Michal Privoznik
On 03.08.2012 16:18, Marcelo Cerri wrote: > These changes make the security drivers able to find and handle the > correct security label information when more than one label is > available. They also update the DAC driver to be used as an usual > security driver. > > Signed-off-by: Marcelo Cerri

Re: [libvirt] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-06 Thread Corey Bryant
On 08/06/2012 05:15 AM, Kevin Wolf wrote: Am 03.08.2012 00:21, schrieb Corey Bryant: @@ -84,6 +158,36 @@ int qemu_open(const char *name, int flags, ...) int ret; int mode = 0; +#ifndef _WIN32 +const char *fdset_id_str; + +/* Attempt dup of fd from fd set */ +if (strs

Re: [libvirt] [PATCH v3 2/5] Multiple security drivers in XML data

2012-08-06 Thread Michal Privoznik
On 03.08.2012 16:18, Marcelo Cerri wrote: > This patch updates the domain and capability XML parser and formatter to > support morethan one "seclabel" element for each domain and device. The > RNG schema and the tests related to this are also updated by this patch. > > Signed-off-by: Marcelo Cerri

Re: [libvirt] [PATCH v3 1/5] Internal refactory of data structures

2012-08-06 Thread Michal Privoznik
On 03.08.2012 16:18, Marcelo Cerri wrote: > This patch updates the structures that store information about each > domain and each hypervisor to support multiple security labels and > drivers. It also updates all the remaining code to use the new fields. > > Signed-off-by: Marcelo Cerri > --- > s

Re: [libvirt] [PATCH v3 5/5] Update the remote API

2012-08-06 Thread Michal Privoznik
On 03.08.2012 16:18, Marcelo Cerri wrote: > Thist patch updates libvirt's API to allow applications to inspect the > full list of security labels of a domain. > > Signed-off-by: Marcelo Cerri > --- > daemon/remote.c | 63 > include/libvirt/libv

Re: [libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Eric Blake
On 08/06/2012 06:24 AM, Daniel P. Berrange wrote: > On Mon, Aug 06, 2012 at 10:12:17AM +0200, Martin Kletzander wrote: >> libvirt creates invalid commands if wrong locale is selected. For >> example with locale that uses comma as a decimal point, JSON commands >> created with decimal numbers are i

Re: [libvirt] [PATCH libvirt-java] Add debian packaging for the Java bindings

2012-08-06 Thread Eric Blake
On 08/06/2012 05:29 AM, Wido den Hollander wrote: > >> I personally have never built a debian package, so I have no basis from >> which to review it. But if no one else comments by Friday (2 more days >> for a review), then ping me: I don't mind applying it as-is, since it >> doesn't affect the a

Re: [libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Daniel P. Berrange
On Mon, Aug 06, 2012 at 10:12:17AM +0200, Martin Kletzander wrote: > libvirt creates invalid commands if wrong locale is selected. For > example with locale that uses comma as a decimal point, JSON commands > created with decimal numbers are invalid because comma separates the > entries in JSON. >

[libvirt] [PATCH v3 08/10] Turn virSocket into a virObject

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make virSocket use the virObject APIs for reference counting Signed-off-by: Daniel P. Berrange --- src/libvirt_private.syms |1 - src/libvirt_probes.d |4 +-- src/qemu/qemu_migration.c |4 +-- src/rpc/virnetclient.c|4 +-- sr

[libvirt] [PATCH v3 10/10] Turn virNetClient* into virObject instances

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make all the virNetClient* objects use virObject APIs for reference counting Signed-off-by: Daniel P. Berrange --- src/libvirt_probes.d |4 +- src/lxc/lxc_monitor.c |4 +- src/remote/remote_driver.c| 20 - src/rpc/gendispatch.pl

[libvirt] [PATCH v3 09/10] Turn virNetServer* into virObject instances

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make all the virNetServer* objects use the virObject APIs for reference counting Signed-off-by: Daniel P. Berrange --- daemon/libvirtd.c | 22 - daemon/stream.c | 19 ++-- src/libvirt_private.syms |7 --- src/libvirt

[libvirt] [PATCH v3 05/10] Turn virNetTLSContext and virNetTLSSession into virObject instances

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make virNetTLSContext and virNetTLSSession use the virObject APIs for reference counting Signed-off-by: Daniel P. Berrange --- daemon/libvirtd.c |4 +- src/libvirt_private.syms |2 - src/libvirt_probes.d |8 +-- src/remote/remote

[libvirt] [PATCH v3 07/10] Turn virKeepAlive into a virObject

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make virKeepAlive use the virObject APIs for reference counting Signed-off-by: Daniel P. Berrange --- src/libvirt_probes.d |4 +-- src/rpc/virkeepalive.c | 73 +- src/rpc/virkeepalive.h |4 +-- src

[libvirt] [PATCH v3 04/10] Turn qemuAgentPtr and qemuMonitorPtr into virObjectPtr instances

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make qemuAgentPtr and qemuMonitorPtr types use the virObject APIs for reference counting Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_agent.c | 86 ++--- src/qemu/qemu_agent.h |3 -- src/qemu/qemu_domain.c | 22

[libvirt] [PATCH v3 03/10] Turn virDomainObjPtr into a virObjectPtr

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Switch virDomainObjPtr to use the virObject APIs for reference counting. The main change is that virObjectUnref does not return the reference count, merely a bool indicating whether the object still has any refs left. Checking the return value is also not mandatory. Si

[libvirt] [PATCH v3 06/10] Turn virNetSASLContext and virNetSASLSession into virObject instances

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make virNetSASLContext and virNetSASLSession use virObject APIs for reference counting Signed-off-by: Daniel P. Berrange --- daemon/remote.c |8 ++-- src/remote/remote_driver.c |4 +- src/rpc/virnetclient.c |7 ++- src/rpc/virnetsaslc

[libvirt] [PATCH v3 01/10] Add a generic reference counted virObject type

2012-08-06 Thread Daniel P. Berrange
From: "Daniel P. Berrange" This introduces a fairly basic reference counted virObject type and an associated virClass type, that use atomic operations for ref counting. In a global initializer (recommended to be invoked using the virOnceInit API), a virClass type must be allocated for each objec

[libvirt] [PATCH v3 00/10] Introduce a virObject module for reference counting

2012-08-06 Thread Daniel P. Berrange
A followup to: https://www.redhat.com/archives/libvir-list/2012-July/msg01733.html New in v3: - Introduce virObjectFreeCallback - Remove bogus ATTRIBUTE_NONNULL annotations - Add virObjectUnref/FreeCallback to useless-if-before-free checks - Other misc issues pointed out - Merged patches

Re: [libvirt] [PATCH libvirt-java] Add debian packaging for the Java bindings

2012-08-06 Thread Wido den Hollander
On 08/02/2012 01:00 AM, Eric Blake wrote: On 08/01/2012 08:51 AM, Wido den Hollander wrote: On 07/19/2012 07:33 PM, Wido den Hollander wrote: Signed-off-by: Wido den Hollander --- build.xml | 19 +++ debian/control.in |9 + 2 files changed, 28 ins

Re: [libvirt] [PATCH] block: Set cdrom device read only flag

2012-08-06 Thread Kevin Wolf
Am 02.08.2012 09:20, schrieb Kevin Shanahan: > On Thu, Aug 02, 2012 at 02:49:52PM +0930, Kevin Shanahan wrote: >> On Thu, Aug 02, 2012 at 11:46:13AM +0930, Kevin Shanahan wrote: >>> On Thu, Aug 02, 2012 at 11:02:42AM +0930, Kevin Shanahan wrote: Set the block driver read_only flag for cdrom de

Re: [libvirt] [PATCH] virrandom: make virRandomInitialize an automatic one-shot

2012-08-06 Thread Daniel P. Berrange
On Fri, Aug 03, 2012 at 05:26:58PM -0600, Eric Blake wrote: > All callers used the same initialization seed (well, the new > viratomictest forgot to look at getpid()); so we might as well > make this value automatic. And while it may feel like we are > giving up functionality, I documented how to

Re: [libvirt] [PATCH] qemu: Migrate at unlimited speed by default

2012-08-06 Thread Daniel P. Berrange
On Fri, Aug 03, 2012 at 08:16:06PM +0200, Jiri Denemark wrote: > Previously, qemu did not respond to monitor commands during migration if > the limit was too high. This prevented us from raising the limit > earlier. The qemu issue seems to be fixed (according to my testing) and > we may remove the

Re: [libvirt] [PATCH] build: drop conditional use of mdns code

2012-08-06 Thread Daniel P. Berrange
On Fri, Aug 03, 2012 at 04:33:17PM -0600, Eric Blake wrote: > Commit 1f6f723 missed a step. At first I was worried that scrubbing > the conditionals would lead to a runtime failure when compiled without > avahi, but my testing makes it appear that the runtime error will only > occur if the .conf f

Re: [libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Martin Kletzander
On 08/06/2012 11:13 AM, Michal Privoznik wrote: > On 06.08.2012 10:12, Martin Kletzander wrote: >> libvirt creates invalid commands if wrong locale is selected. For >> example with locale that uses comma as a decimal point, JSON commands >> created with decimal numbers are invalid because comma se

Re: [libvirt] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-06 Thread Kevin Wolf
Am 03.08.2012 00:21, schrieb Corey Bryant: >>> @@ -84,6 +158,36 @@ int qemu_open(const char *name, int flags, ...) >>> int ret; >>> int mode = 0; >>> >>> +#ifndef _WIN32 >>> +const char *fdset_id_str; >>> + >>> +/* Attempt dup of fd from fd set */ >>> +if (strstart(name, "/d

Re: [libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Michal Privoznik
On 06.08.2012 10:12, Martin Kletzander wrote: > libvirt creates invalid commands if wrong locale is selected. For > example with locale that uses comma as a decimal point, JSON commands > created with decimal numbers are invalid because comma separates the > entries in JSON. > > But even when dec

Re: [libvirt] [PATCH] esx: Implement interface driver

2012-08-06 Thread Michal Privoznik
On 05.08.2012 22:10, Matthias Bolte wrote: > Lists available PhysicalNic devices. A PhysicalNic is always active > and can neither be defined nor undefined. > > A PhysicalNic is used to bridge a HostVirtualSwitch to the physical > network. > --- > > This implementation differs from Ata's. It just

Re: [libvirt] [PATCH] esx: Implement network driver

2012-08-06 Thread Michal Privoznik
On 05.08.2012 22:11, Matthias Bolte wrote: > An ESX server has one or more PhysicalNics that represent the actual > hardware NICs. Those can be listed via the interface driver. > > A libvirt virtual network is mapped to a HostVirtualSwitch. On the > physical side a HostVirtualSwitch can be connect

Re: [libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

2012-08-06 Thread Michal Privoznik
On 05.08.2012 13:48, Matthias Bolte wrote: > esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL. > Remove redundant NULL checks from callers. > > Also prefer esxVI_GetStringValue over open-coding the logic. > --- > src/esx/esx_driver.c | 82 > +---

Re: [libvirt] [PATCH] esx: Fix dynamic deep copy

2012-08-06 Thread Michal Privoznik
On 05.08.2012 10:38, Matthias Bolte wrote: > The static deep copy allocates storage for the copy. The dynamic > version injected the dynamic dispatch after the allocation. This > triggered the invalid argument check in the dynamically dispatched > deep copy call. The deep copy function expects its

[libvirt] [PATCH] json: fix interface locale dependency

2012-08-06 Thread Martin Kletzander
libvirt creates invalid commands if wrong locale is selected. For example with locale that uses comma as a decimal point, JSON commands created with decimal numbers are invalid because comma separates the entries in JSON. But even when decimal point is affected, grouping is not, because for group

[libvirt] [test-API][PATCH 2/2] Replace env.conf with global.conf in env_parser

2012-08-06 Thread Wayne Sun
Only update the expection info when parsing. Signed-off-by: Wayne Sun --- src/env_parser.py | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/env_parser.py b/src/env_parser.py index f02af57..ddda727 100644 --- a/src/env_parser.py +++ b/src/env_

[libvirt] [test-API][PATCH 1/2] Reconnct libvirt after libvirtd restart

2012-08-06 Thread Wayne Sun
In domain_nfs_start case, libvirtd will be restarted during test, which broke existing connection. User need re-init connection in test case, for this: * Using sharedmod data dictionary to store Envparser class in generator. * Do not clear data dictionary in env_inspect, user ca