Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Jim Fehlig
David Lutterkort wrote: > For certain applications, we want libvirt to be able to configure host > network interfaces in a variety of ways; currently, we are most > interested in teaching libvirt how to set up ordinary ethernet > interfaces, bridges, bonding and vlan's. > I agree that carving u

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
On Fri, 2009-01-16 at 13:49 +, Daniel P. Berrange wrote: > On Fri, Jan 16, 2009 at 09:00:16AM +, Mark McLoughlin wrote: > > > > The thing is, this has to integrate with existing configuration - > > there's no point in futzing about with "ip link set eth0 ..." if the > > user has configured

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
Hi Mark, On Fri, 2009-01-16 at 09:00 +, Mark McLoughlin wrote: > Hi David, > > On Fri, 2009-01-16 at 01:13 +, David Lutterkort wrote: > > > > > > > > > > > > > > > > > > > > > > I don't think we want to define a bridge here, but more that an > interface is shared - i.e.

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
On Fri, 2009-01-16 at 15:06 +, Daniel P. Berrange wrote: > On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: > > From a style point of view I'd prefer these to all have the same > top level XML element name, and use type='phys|bond|vlan|bridge' > attribute for distinction, sinc

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread David Lutterkort
On Fri, 2009-01-16 at 03:29 +, John Levon wrote: > On Fri, Jan 16, 2009 at 02:59:17AM +, David Lutterkort wrote: > > > I am not disagreeing with you, but either way, libvirt needs _some_ way > > to control host interfaces. > > This is far from obvious to me. Could you explain more? The r

Re: [libvirt] PATCH: 9/25: Make global error object thread local

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > The virGetLastError() and virConnGetLastError() methods are not > even remotely thread safe, and the virCopyLastError/virConnCopyLastError > methods don't help in this goal, being open to a race condition. > > This patch changes the internal impl of the global error o

[libvirt] patch: allow disk cache mode to be specified in a domain's xml definition.

2009-01-16 Thread john cooper
We have found certain application scenarios where overriding of the default qemu host cache mode provides a substantial improvement in guest performance. In particular, disabling host caching of the file/dev backing a guest drive. A summary of performance metrics may be found below. Attached is

Re: [libvirt] PATCH: 9/25: Make global error object thread local

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > The virGetLastError() and virConnGetLastError() methods are not Dan, I suppose you're using mercurial to produce these diffs. If so, you may want to file a bug, since the diffs are misleadingly suboptimal. Here's one example: - -DEBUG("conn=%p", conn); +DE

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Jim Meyering
Cole Robinson wrote: > Jim Meyering wrote: >> Daniel Veillard wrote: >>> On Fri, Jan 16, 2009 at 12:09:33AM +, Daniel P. Berrange wrote: On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > ... >>> + virsh --connect qemu:///session

Re: [libvirt] PATCH: 8/25: Concurrent dispatch of RPC methods

2009-01-16 Thread Jim Meyering
Jim Meyering wrote: > "Daniel P. Berrange" wrote: >> This patch re-writes the code for dispatching RPC calls in the >> remote driver to allow use from multiple threads. Only one thread >> is allowed to send/recv on the socket at a time though. If another >> thread comes along it will put itself o

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Cole Robinson
Jim Meyering wrote: > Daniel Veillard wrote: >> On Fri, Jan 16, 2009 at 12:09:33AM +, Daniel P. Berrange wrote: >>> On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote: "Daniel P. Berrange" wrote: ... >> + virsh --connect qemu:///session define devs.xml > Shouldn'

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Jim Meyering
Daniel Veillard wrote: > On Fri, Jan 16, 2009 at 12:09:33AM +, Daniel P. Berrange wrote: >> On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote: >> > "Daniel P. Berrange" wrote: >> > ... >> > >> + virsh --connect qemu:///session define devs.xml >> > > >> > > Shouldn't use qemu:///s

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 03:06:16PM +, Daniel P. Berrange wrote: > > >eth0 > > > > > eth1 > > > > > eth2 > > > > >bond0 > > > > > > > >br0 > > > > > > > > vlan0 > > > >

Re: [libvirt] PATCH: 25/25: Support ac97 sound card

2009-01-16 Thread Daniel Veillard
On Tue, Jan 13, 2009 at 05:49:02PM +, Daniel P. Berrange wrote: > QEMU now has support for a sound card of type "ac97", so enable > that in the XML parser / qemu driver. Not related to the threading really, looks fine. Any automatic way to detect unused functions ? I guess we can't expect t

Re: [libvirt] PATCH: 24/25: Update python error reporting

2009-01-16 Thread Daniel Veillard
On Tue, Jan 13, 2009 at 05:48:40PM +, Daniel P. Berrange wrote: > The virGetLastError() method is now stored in a thread local > and virConnGetLastError() is deprecated, so switch to only > use the former. Also, no need to copy the error object since > it is thread local already thus guarenteed

Re: [libvirt] PATCH: 22/25: Make configure output aligned

2009-01-16 Thread Daniel Veillard
On Fri, Jan 16, 2009 at 12:24:36PM +, Richard W.M. Jones wrote: > On Tue, Jan 13, 2009 at 05:47:49PM +, Daniel P. Berrange wrote: > > > > The configure output looked untidy, so this aligns things > > correctly. > > > > configure.in | 20 ++-- > > 1 file changed, 10 inse

Re: [libvirt] PATCH: 21/25: Use random_r for random numbers

2009-01-16 Thread Daniel Veillard
On Tue, Jan 13, 2009 at 05:47:27PM +, Daniel P. Berrange wrote: > Now that gnulib's rand module is imported, we have a decent > quality random number generator that's portable. We don't > want to mess with the apps state, so in virInitialize() we > explicitly initialize our own private random n

Re: [libvirt] PATCH: 19/25: Remove use of non-threadsafe POSIX apis

2009-01-16 Thread Daniel Veillard
On Fri, Jan 16, 2009 at 12:25:02PM +, Daniel P. Berrange wrote: > On Fri, Jan 16, 2009 at 12:21:59PM +, Richard W.M. Jones wrote: > > On Tue, Jan 13, 2009 at 05:46:37PM +, Daniel P. Berrange wrote: > > > +char buf[1024]; > > > > sysconf (_SC_GETPW_R_SIZE_MAX)? > > > > Looking

Re: [libvirt] PATCH: 8/25: Concurrent dispatch of RPC methods

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 10:18:32AM -0500, Cole Robinson wrote: > Daniel P. Berrange wrote: > > On Fri, Jan 16, 2009 at 12:49:06PM +0100, Jim Meyering wrote: > >> "Daniel P. Berrange" wrote: > >>> This patch re-writes the code for dispatching RPC calls in the > >>> remote driver to allow use from m

Re: [libvirt] PATCH: 8/25: Concurrent dispatch of RPC methods

2009-01-16 Thread Cole Robinson
Daniel P. Berrange wrote: > On Fri, Jan 16, 2009 at 12:49:06PM +0100, Jim Meyering wrote: >> "Daniel P. Berrange" wrote: >>> This patch re-writes the code for dispatching RPC calls in the >>> remote driver to allow use from multiple threads. Only one thread >>> is allowed to send/recv on the socke

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: > 1. XML Format > = > > The first question is how the user would describe the host interfaces they > want. Below are some sketches of what an XML representation of the various > kinds of interfaces would look like. This

Re: [libvirt] PATCH: Allow virtual networks to survive daemon restarts

2009-01-16 Thread Daniel Veillard
On Wed, Jan 14, 2009 at 12:44:50PM +, Daniel P. Berrange wrote: > On Wed, Jan 14, 2009 at 08:55:46AM +, Mark McLoughlin wrote: > > On Tue, 2009-01-13 at 20:49 +, Daniel P. Berrange wrote: > > > Currently when we shutdown the virtual networks are all shutdown too. > > > This is less tha

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 01:24:53PM +, John Levon wrote: > We should be considering why libvirt is /well-placed/ to configure the > host. I think it should be pretty clear that it's actually not: the > problems around distro differences alone is a good indication. The > proposed API is anaemic e

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 02:20:27PM +, Mark McLoughlin wrote: > Just to be clear - I am very sympathetic to the need for this stuff and > the conclusion that it belongs in libvirt. I just think we need to be > fairly clear on where the line is. > > On Fri, 2009-01-16 at 13:41 +, Daniel P. B

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Mark McLoughlin
Just to be clear - I am very sympathetic to the need for this stuff and the conclusion that it belongs in libvirt. I just think we need to be fairly clear on where the line is. On Fri, 2009-01-16 at 13:41 +, Daniel P. Berrange wrote: > On Fri, Jan 16, 2009 at 01:24:53PM +, John Levon wrote

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 02:37:04PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > > On Fri, Jan 16, 2009 at 12:42:35PM +0100, Jim Meyering wrote: > >> "Daniel P. Berrange" wrote: > >> > >> > >> Ah. I'd only run the define, which is enough to make > >> libvirtd fail when using qemu:///

Re: [libvirt] PATCH: 18/25: Dynamic thread workers pool

2009-01-16 Thread Richard W.M. Jones
On Fri, Jan 16, 2009 at 03:07:21PM +0100, Jim Meyering wrote: > Please consider using some name other than "active", > since it is so close in meaning to "processing". > Maybe something like "created", "live" or "alive"? Indicates that it has a thread, so how about 'has_thread'? Rich. -- Richar

Re: [libvirt] PATCH: 18/25: Dynamic thread workers pool

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > On Fri, Jan 16, 2009 at 12:10:35PM +, Richard W.M. Jones wrote: >> On Tue, Jan 13, 2009 at 05:46:08PM +, Daniel P. Berrange wrote: >> > @@ -1948,6 +2000,26 @@ static int qemudRunLoop(struct qemud_ser >> > } >> > } >> > >> > +/* If

Re: [libvirt] sharing multiple identical USB devices?

2009-01-16 Thread Dr. Michael J. Chudobiak
Guido � wrote: Qemu/KVM allow to either use vendor/product or address/bus so with two identical USB devices you need to resort to address/bus only. Does dropping vendor/product from the XML completely help? Thanks, Guido! That was the problem! You can not use vendor/product and bus/device at t

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread John Levon
On Fri, Jan 16, 2009 at 01:41:19PM +, Daniel P. Berrange wrote: > > I don't think that's much of an argument. Plenty of things can be > > considered fundamental. My kernel version certainly is, so why isn't > > libvirt letting me upgrade that? What about my firewall? Why isn't > > libvirt conf

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 09:00:16AM +, Mark McLoughlin wrote: > Hi David, > > On Fri, 2009-01-16 at 01:13 +, David Lutterkort wrote: > > 3. Implementation > > = > > > > Configuring network interfaces is highly OS and OS-variant/distro > > dependant. There are at least two d

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Jim Meyering
Jim Meyering wrote: ... > FYI, here's a new version of this latest test. > Now it uses the new unix_sock_dir setting to avoid > risk of interfering with any existing qemu-based settings. > > (this patch depends on the unix_sock_dir-adding patch > that's still waiting for an ACK. Also, I have two

Re: [libvirt] PATCH: 15/25: Prohibit non-threadsafe POSIX apis

2009-01-16 Thread Daniel Veillard
On Tue, Jan 13, 2009 at 05:44:51PM +, Daniel P. Berrange wrote: > There are a huge list of functions in POSIX which are not > safe to use from multiple threads currently. I generated > the list by looking at all libc symbol exports for variants > which have a parallel _r symbol. > >nm -D -

Re: [libvirt] PATCH: 14/25: Xen thread safety

2009-01-16 Thread Daniel Veillard
On Thu, Jan 15, 2009 at 05:29:12PM +, Richard W.M. Jones wrote: > On Tue, Jan 13, 2009 at 05:44:21PM +, Daniel P. Berrange wrote: > > This patch makes the various Xen drivers threadsafe by adding a > > mutex lock on the xenUnifiedPrivatePtr object. The XenD driver > > does not really need m

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 01:24:53PM +, John Levon wrote: > On Fri, Jan 16, 2009 at 10:11:02AM +, Daniel P. Berrange wrote: > > > Integrating with host networking meanwhile is a fundamental requirement > > for virtualization for all apps using libvirt, since guests need network > > connecti

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > On Fri, Jan 16, 2009 at 12:42:35PM +0100, Jim Meyering wrote: >> "Daniel P. Berrange" wrote: >> >> > On Fri, Jan 16, 2009 at 09:24:33AM +0100, Jim Meyering wrote: >> >> "Daniel P. Berrange" wrote: >> >> > On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote:

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread John Levon
On Fri, Jan 16, 2009 at 09:00:16AM +, Mark McLoughlin wrote: > What I don't like about any of these is that I've always imagined we > might add further APIs to libvirt for changing a domain's configuration > without munging XML e.g. I'm glad to hear this is being considered: you're most certa

Re: [libvirt] [PATCH] patch queue: bridge-script

2009-01-16 Thread John Levon
On Fri, Jan 16, 2009 at 12:31:24PM +, Richard W.M. Jones wrote: > > # Node ID 04139c088854c23dc548c0f9f4abf54c4ed07e0d > > # Parent 253da3acb103a4ce764cb8192a65a4d51833c2f1 > > patch queue: bridge-script > > Hi John, is there some explanatory text for this patch? Erk, sorry, I accidentally

Re: [libvirt] PATCH: 13/25: Remove global state from XM driver

2009-01-16 Thread Daniel Veillard
On Thu, Jan 15, 2009 at 05:23:33PM +, Richard W.M. Jones wrote: > On Tue, Jan 13, 2009 at 05:44:00PM +, Daniel P. Berrange wrote: > > The 'xm' driver currently keeps all its state in a global static > > variables. Not cool, since we access this from all sorts of places > > and its hard to g

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread John Levon
On Fri, Jan 16, 2009 at 10:11:02AM +, Daniel P. Berrange wrote: > Integrating with host networking meanwhile is a fundamental requirement > for virtualization for all apps using libvirt, since guests need network > connectivity, and thus managing NICs should be within scope. I don't think th

Re: [libvirt] [PATCH] Solaris least privilege support

2009-01-16 Thread John Levon
On Fri, Jan 16, 2009 at 02:03:39PM +0100, Guido G?nther wrote: > virFileMakePath? The implementation of this is insufficient, and unnecessary. regards john -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] sharing multiple identical USB devices?

2009-01-16 Thread Guido Günther
On Thu, Jan 15, 2009 at 04:41:00PM -0500, Dr. Michael J. Chudobiak wrote: > However, I can't seem to get two of these to work at the same time. I > want to do: > > > > > > > > > >

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Richard W.M. Jones
On Fri, Jan 16, 2009 at 12:53:28PM +, Daniel P. Berrange wrote: > There isn't anything to pass into the guest . This is about how to > configure host network interfaces for bridging, bonding, vlans, etc > eg, So you can take an host with a NIC, eth0, put that NIC into a > bridge, br0, and thus

Re: [libvirt] PATCH: 15/25: Prohibit non-threadsafe POSIX apis

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 05:44:51PM +, Daniel P. Berrange wrote: > The readdir one is also unneccessary, since reading from a single > DIR* is safe from a single thread. readdir_r is also horrific > > http://womble.decadentplace.org.uk/readdir_r-advisory.html That web page also says that readd

Re: [libvirt] [PATCH] Solaris least privilege support

2009-01-16 Thread Guido Günther
On Thu, Jan 15, 2009 at 09:19:39AM -0800, john.le...@sun.com wrote: [..snip..] > +/* Change the group ownership of /var/run/libvirt to unix_sock_gid */ > +if (geteuid () == 0) { > +const char *rundir = LOCAL_STATE_DIR "/run/libvirt"; > + > +if (mkdir (rundir, 0755)) { virFi

Re: [libvirt] [PATCH] Solaris least privilege support

2009-01-16 Thread John Levon
On Fri, Jan 16, 2009 at 08:35:16AM +0100, Daniel Veillard wrote: > The comment and the code don't seems to match, and it seems to me Oops, will fix the comment. > that this code would fail except in the first time the daemon is > launched because mkdir /var/run/libvirt will return -1 and errno

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:44:21PM +, Richard W.M. Jones wrote: > On Fri, Jan 16, 2009 at 12:41:42PM +, Daniel P. Berrange wrote: > > On Fri, Jan 16, 2009 at 12:35:55PM +, Richard W.M. Jones wrote: > > > On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: > > > > For certa

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Richard W.M. Jones
On Fri, Jan 16, 2009 at 12:41:42PM +, Daniel P. Berrange wrote: > On Fri, Jan 16, 2009 at 12:35:55PM +, Richard W.M. Jones wrote: > > On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: > > > For certain applications, we want libvirt to be able to configure host > > > network

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:35:55PM +, Richard W.M. Jones wrote: > On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: > > For certain applications, we want libvirt to be able to configure host > > network interfaces in a variety of ways; currently, we are most > > interested in te

Re: [libvirt] PATCH: 17/25: Concurrent client dispatch in libvirtd

2009-01-16 Thread Richard W.M. Jones
On Fri, Jan 16, 2009 at 12:15:42PM +, Daniel P. Berrange wrote: > When we are generating the reply message though, we don't know how > big it'll be until we've made the XDR calls to serialize the struct > into the XDR. So we'd need to have the full sized buffer for filling > out the reply. Fai

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Richard W.M. Jones
On Fri, Jan 16, 2009 at 01:13:18AM +, David Lutterkort wrote: > For certain applications, we want libvirt to be able to configure host > network interfaces in a variety of ways; currently, we are most > interested in teaching libvirt how to set up ordinary ethernet > interfaces, bridges, bondin

Re: [libvirt] PATCH: 11/25: Public APIs for incrementing refcount

2009-01-16 Thread Daniel Veillard
On Thu, Jan 15, 2009 at 05:18:40PM +, Richard W.M. Jones wrote: > On Tue, Jan 13, 2009 at 05:43:08PM +, Daniel P. Berrange wrote: > > With the domain events code, the callbacks triggered upon events get given > > a virDomainPtr object instance. In many cases it'd be desirable to grab > > th

Re: [libvirt] sharing multiple identical USB devices?

2009-01-16 Thread Richard W.M. Jones
On Thu, Jan 15, 2009 at 04:41:00PM -0500, Dr. Michael J. Chudobiak wrote: > Hi, > > I have Windows XP running on Fedora 10. > > I can successfully share a single USB-to-RS232 converter by inserting > this in my xml file: I'm assuming this must be with qemu or KVM. What qemu command line does th

Re: [libvirt] [PATCH] patch queue: bridge-script

2009-01-16 Thread Richard W.M. Jones
On Thu, Jan 15, 2009 at 01:21:20PM -0800, john.le...@sun.com wrote: > # HG changeset patch > # User john.le...@sun.com > # Date 1232052415 28800 > # Node ID 04139c088854c23dc548c0f9f4abf54c4ed07e0d > # Parent 253da3acb103a4ce764cb8192a65a4d51833c2f1 > patch queue: bridge-script Hi John, is there

Re: [libvirt] PATCH: 25/25: Support ac97 sound card

2009-01-16 Thread Richard W.M. Jones
On Wed, Jan 14, 2009 at 11:41:32AM +, Daniel P. Berrange wrote: > On Tue, Jan 13, 2009 at 05:49:02PM +, Daniel P. Berrange wrote: > > QEMU now has support for a sound card of type "ac97", so enable > > that in the XML parser / qemu driver. > > > > Also remove some unused cruft relating to

Re: [libvirt] PATCH: 24/25: Update python error reporting

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 05:48:40PM +, Daniel P. Berrange wrote: > The virGetLastError() method is now stored in a thread local > and virConnGetLastError() is deprecated, so switch to only > use the former. Also, no need to copy the error object since > it is thread local already thus guarenteed

Re: [libvirt] PATCH: 23/25: Add domain events to test driver

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 09:51:52PM +, Daniel P. Berrange wrote: > On Tue, Jan 13, 2009 at 05:48:12PM +, Daniel P. Berrange wrote: > > This adds support for the domain events in the test driver. Code > > is following the same pattern as the impl in the QEMU driver. > > > > test.c | 223 >

Re: [libvirt] PATCH: 19/25: Remove use of non-threadsafe POSIX apis

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:21:59PM +, Richard W.M. Jones wrote: > On Tue, Jan 13, 2009 at 05:46:37PM +, Daniel P. Berrange wrote: > > +char buf[1024]; > > sysconf (_SC_GETPW_R_SIZE_MAX)? > > Looking at glibc's implementation of getpwuid (which uses getpwuid_r), > I see that glibc

Re: [libvirt] PATCH: 22/25: Make configure output aligned

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 05:47:49PM +, Daniel P. Berrange wrote: > > The configure output looked untidy, so this aligns things > correctly. > > configure.in | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) Cleanup always good. +1 Rich. -- Richard Jones, Eme

Re: [libvirt] PATCH: 21/25: Use random_r for random numbers

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 05:47:27PM +, Daniel P. Berrange wrote: > Now that gnulib's rand module is imported, we have a decent > quality random number generator that's portable. We don't > want to mess with the apps state, so in virInitialize() we > explicitly initialize our own private random n

Re: [libvirt] PATCH: 20/25: Import gnulbi random_r module

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 05:47:03PM +, Daniel P. Berrange wrote: > Import the gnulib 'random_r' module, which provides a nice > strong random number generator that is portable across OS. > > > bootstrap|1 > gnulib/lib/.cvsignore| 12 - > gnulib/lib/Makefile

Re: [libvirt] PATCH: 19/25: Remove use of non-threadsafe POSIX apis

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 05:46:37PM +, Daniel P. Berrange wrote: > +char buf[1024]; sysconf (_SC_GETPW_R_SIZE_MAX)? Looking at glibc's implementation of getpwuid (which uses getpwuid_r), I see that glibc dynamically reallocates the buffer as necessary to the correct size for the return

Re: [libvirt] PATCH: 18/25: Dynamic thread workers pool

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:10:35PM +, Richard W.M. Jones wrote: > On Tue, Jan 13, 2009 at 05:46:08PM +, Daniel P. Berrange wrote: > > @@ -1948,6 +2000,26 @@ static int qemudRunLoop(struct qemud_ser > > } > > } > > > > +/* If number of active workers exceeds b

Re: [libvirt] PATCH: 17/25: Concurrent client dispatch in libvirtd

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:01:16PM +, Richard W.M. Jones wrote: > On Tue, Jan 13, 2009 at 09:51:00PM +, Daniel P. Berrange wrote: > [...] > > From a "peephole" view of the patch, it looks sane enough, and I think > we should commit it and debug any fallout later. One tiny comment: > > >

Re: [libvirt] PATCH: 8/25: Concurrent dispatch of RPC methods

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:49:06PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > > This patch re-writes the code for dispatching RPC calls in the > > remote driver to allow use from multiple threads. Only one thread > > is allowed to send/recv on the socket at a time though. If anothe

Re: [libvirt] PATCH: 18/25: Dynamic thread workers pool

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 05:46:08PM +, Daniel P. Berrange wrote: > @@ -1948,6 +2000,26 @@ static int qemudRunLoop(struct qemud_ser > } > } > > +/* If number of active workers exceeds both the min_workers > + * threshold and the number of clients, then kill

Re: [libvirt] Fine grained Access Control in libVirt

2009-01-16 Thread Konrad Eriksson1
Daniel summarized my approach nicely. Basically I'm looking at enabling multi-tenancy administration where several admins can exist but they can only see and/or manipulate with resources (VMs, storage, networks) assigned to them. By making use of a generic AC-module approach where actions gets pa

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:42:35PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > > > On Fri, Jan 16, 2009 at 09:24:33AM +0100, Jim Meyering wrote: > >> "Daniel P. Berrange" wrote: > >> > On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote: > >> >> "Daniel P. Berrange" wrot

Re: [libvirt] PATCH: 17/25: Concurrent client dispatch in libvirtd

2009-01-16 Thread Richard W.M. Jones
On Tue, Jan 13, 2009 at 09:51:00PM +, Daniel P. Berrange wrote: [...] >From a "peephole" view of the patch, it looks sane enough, and I think we should commit it and debug any fallout later. One tiny comment: > +struct qemud_client_message; > + > +struct qemud_client_message { > +char bu

Re: [libvirt] PATCH: 8/25: Concurrent dispatch of RPC methods

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > This patch re-writes the code for dispatching RPC calls in the > remote driver to allow use from multiple threads. Only one thread > is allowed to send/recv on the socket at a time though. If another > thread comes along it will put itself on a queue and go to sleep.

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > On Fri, Jan 16, 2009 at 09:24:33AM +0100, Jim Meyering wrote: >> "Daniel P. Berrange" wrote: >> > On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote: >> >> "Daniel P. Berrange" wrote: >> >> ... >> >> >> + virsh --connect qemu:///session define devs.xml

Re: [libvirt] PATCH: 16/25: Fix GNULIB warnings on Mingw

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:14:51PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > > The GNULIB Makefile.am doesn't set any particular compiler warning > > flags in the belief that upstream GNULIB developers sort out all > > warnings before committing their code. This is reasonable for

Re: [libvirt] PATCH: 16/25: Fix GNULIB warnings on Mingw

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > The GNULIB Makefile.am doesn't set any particular compiler warning > flags in the belief that upstream GNULIB developers sort out all > warnings before committing their code. This is reasonable for builds > on mainstream Linux platforms, but MinGW builds of GNULIB don

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 09:06:05AM +, Mark McLoughlin wrote: > On Fri, 2009-01-16 at 03:29 +, John Levon wrote: > > On Fri, Jan 16, 2009 at 02:59:17AM +, David Lutterkort wrote: > > > > > I am not disagreeing with you, but either way, libvirt needs _some_ way > > > to control host inte

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 09:24:33AM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > > On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote: > >> "Daniel P. Berrange" wrote: > >> ... > >> >> + virsh --connect qemu:///session define devs.xml > >> > > >> > Shouldn't use qemu:///s

Re: [libvirt] Fine grained Access Control in libVirt

2009-01-16 Thread Daniel P. Berrange
On Fri, Jan 16, 2009 at 12:16:10PM +0900, Atsushi SAKAI wrote: > Hi, Dan > > Would you explain the difference with sVirt? > The final goal sVirt seems same form me. > (for example, define many security domain etc in .te file.) At this stage sVirt is primarily about protecting guests from each oth

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Mark McLoughlin
On Fri, 2009-01-16 at 03:29 +, John Levon wrote: > On Fri, Jan 16, 2009 at 02:59:17AM +, David Lutterkort wrote: > > > I am not disagreeing with you, but either way, libvirt needs _some_ way > > to control host interfaces. > > This is far from obvious to me. Could you explain more? You'r

Re: [libvirt] RFC: configuring host interfaces with libvirt

2009-01-16 Thread Mark McLoughlin
Hi David, On Fri, 2009-01-16 at 01:13 +, David Lutterkort wrote: > For certain applications, we want libvirt to be able to configure host > network interfaces in a variety of ways; currently, we are most > interested in teaching libvirt how to set up ordinary ethernet > interfaces, bridges, bo

Re: [libvirt] [PATCH] Fix vm define error with back compat console device

2009-01-16 Thread Jim Meyering
"Daniel P. Berrange" wrote: > On Thu, Jan 15, 2009 at 10:17:56PM +0100, Jim Meyering wrote: >> "Daniel P. Berrange" wrote: >> ... >> >> + virsh --connect qemu:///session define devs.xml >> > >> > Shouldn't use qemu:///session for test cases like this - this is what >> > the test:///default driv