Re: [Libvir] Adding suppport for daemon restarts with stateful drivers

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 04:50:45PM -0400, Daniel Veillard wrote: > On Fri, Mar 21, 2008 at 05:35:12PM +, Daniel P. Berrange wrote: > > The libvirt daemon has the ability to reload itself by sending it SIGHUP. > > For the QEMU & network drivers this makes it reload the config files for > > VMs

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 04:35:34PM -0400, Daniel Veillard wrote: > On Fri, Mar 21, 2008 at 05:39:51PM +, Daniel P. Berrange wrote: > > On Fri, Mar 21, 2008 at 01:29:07PM -0400, Daniel Veillard wrote: > > > Another small issue is that I have the clone flags defined in > > > but not in so I ha

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Dave Leskovec
Dan Smith wrote: > DB> The patch I posted to make it use the state driver means all LXC > DB> driver calls go via the daemon. So nothing happens directly as a > DB> child of the calling application - its all in the context of the > DB> daemon. > > Yeah, just saw that. Even better :) > > It seems

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Dave Leskovec
Daniel P. Berrange wrote: > The following patches make the driver properly integrate with the stateful > driver APIs. It also changes the config files to be named by on VM name > instead of UUID, since this is what the QEMU driver does & its more user > friendly. It also adds the CLONE_XXX constant

Re: [Libvir] Adding suppport for daemon restarts with stateful drivers

2008-03-21 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 05:35:12PM +, Daniel P. Berrange wrote: > The libvirt daemon has the ability to reload itself by sending it SIGHUP. > For the QEMU & network drivers this makes it reload the config files for > VMs and re-init the iptables rules. It would be desirable though to allow > t

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 05:37:50PM +, Daniel P. Berrange wrote: > On Fri, Mar 21, 2008 at 01:33:55PM -0400, Daniel Veillard wrote: > > On Fri, Mar 21, 2008 at 10:30:36AM -0700, Dan Smith wrote: > > > DB> The patch I posted to make it use the state driver means all LXC > > > DB> driver calls go

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 05:05:43PM +, Daniel P. Berrange wrote: > The following patches make the driver properly integrate with the stateful > driver APIs. It also changes the config files to be named by on VM name > instead of UUID, since this is what the QEMU driver does & its more user > fri

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-21 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 05:39:51PM +, Daniel P. Berrange wrote: > On Fri, Mar 21, 2008 at 01:29:07PM -0400, Daniel Veillard wrote: > > Another small issue is that I have the clone flags defined in > > but not in so I had to add that include > > to get the module to compile, lxcCheckContainer

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 01:29:07PM -0400, Daniel Veillard wrote: > On Fri, Mar 21, 2008 at 10:17:35AM -0700, Dave Leskovec wrote: > > Daniel Veillard wrote: > > > I will look now at cleaning up the parsing code as explained in my > > > review, > > > that I can do easilly, > > > > Excellent. Th

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 01:33:55PM -0400, Daniel Veillard wrote: > On Fri, Mar 21, 2008 at 10:30:36AM -0700, Dan Smith wrote: > > DB> The patch I posted to make it use the state driver means all LXC > > DB> driver calls go via the daemon. So nothing happens directly as a > > DB> child of the callin

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 06:32:45PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > ... > > The following patches make the driver properly integrate with the stateful > > driver APIs. It also changes the config files to be named by on VM name > > instead of UUID, since

[Libvir] Adding suppport for daemon restarts with stateful drivers

2008-03-21 Thread Daniel P. Berrange
The libvirt daemon has the ability to reload itself by sending it SIGHUP. For the QEMU & network drivers this makes it reload the config files for VMs and re-init the iptables rules. It would be desirable though to allow the daemon to perform a full restart. Principally this is for RPM upgrades wh

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 10:30:36AM -0700, Dan Smith wrote: > DB> The patch I posted to make it use the state driver means all LXC > DB> driver calls go via the daemon. So nothing happens directly as a > DB> child of the calling application - its all in the context of the > DB> daemon. > > Yeah, ju

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Dave Leskovec
Daniel P. Berrange wrote: > On Fri, Mar 21, 2008 at 10:21:48AM -0700, Dan Smith wrote: >> DB> IMHO there's too much forking going on here. With the stateful >> DB> driver we should have the daemon be the parent of the forked VM as >> DB> per the QEMU driver. This will avoid the need to unsafely re-

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: ... > The following patches make the driver properly integrate with the stateful > driver APIs. It also changes the config files to be named by on VM name > instead of UUID, since this is what the QEMU driver does & its more user > friendly. It also a

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Dan Smith
DB> The patch I posted to make it use the state driver means all LXC DB> driver calls go via the daemon. So nothing happens directly as a DB> child of the calling application - its all in the context of the DB> daemon. Yeah, just saw that. Even better :) It seems to me that always being in the d

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-21 Thread Daniel Veillard
On Fri, Mar 21, 2008 at 10:17:35AM -0700, Dave Leskovec wrote: > Daniel Veillard wrote: > > I will look now at cleaning up the parsing code as explained in my review, > > that I can do easilly, > > Excellent. Thanks! No problem, BTW I'm having a bit of troubles with lxcLoadConfig() it loads

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Daniel P. Berrange
On Fri, Mar 21, 2008 at 10:21:48AM -0700, Dan Smith wrote: > DB> IMHO there's too much forking going on here. With the stateful > DB> driver we should have the daemon be the parent of the forked VM as > DB> per the QEMU driver. This will avoid the need to unsafely re-write > DB> the config files.

Re: [Libvir] [RFC] 2 of 4 Linux Container support - lxc_conf files

2008-03-21 Thread Jim Meyering
Dave Leskovec <[EMAIL PROTECTED]> wrote: > This patch adds the lxc_conf source files. Looks good. Please add lxcError to the err_func_re list in Makefile.maint, so that "make syntax-check" checks all uses for translatable string mark-up. > +#define LXC_MAX_TTY_NAME 32 LXC_MAX_TTY_NAME_LENGTH wo

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Dan Smith
DB> IMHO there's too much forking going on here. With the stateful DB> driver we should have the daemon be the parent of the forked VM as DB> per the QEMU driver. This will avoid the need to unsafely re-write DB> the config files. It will also enable errors during the domain DB> creation process t

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-21 Thread Dave Leskovec
Daniel Veillard wrote: > On Thu, Mar 20, 2008 at 01:25:05PM -0400, Daniel Veillard wrote: >> On Thu, Mar 20, 2008 at 10:20:22AM -0700, Dave Leskovec wrote: >>> Daniel Veillard wrote: I would rather keep the type attribute value small, and if possible the same as the one used for the c

Re: [Libvir] suspended domains

2008-03-21 Thread Vadim Zaliva
On Mar 21, 2008, at 10:00, Dan Smith wrote: This is a known issue with Xen 3.2 and paused domains, but I thought it was fixed by this patch: https://www.redhat.com/archives/libvir-list/2008-February/msg00413.html Looking at the 0.4.1 release notes and the thread, I'm not sure if it actually g

Re: [Libvir] [RFC] 4 of 4 Linux Container support - start container

2008-03-21 Thread Daniel P. Berrange
On Wed, Mar 19, 2008 at 11:16:32PM -0700, Dave Leskovec wrote: > This patch adds the start container support. A couple new source files are > added - lxc_container.h and lxc_container.c These contain the setup code that > runs within the container namespace prior to exec'ing the user specified in

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Daniel P. Berrange
On Thu, Mar 20, 2008 at 02:43:28PM -0700, Dave Leskovec wrote: > Daniel Veillard wrote: > > [...] > >> +static int lxcListDomains(virConnectPtr conn, int *ids, int nids) > >> +{ > >> +lxc_driver_t *driver = (lxc_driver_t *)conn->privateData; > >> +lxc_vm_t *vm; > >> +int numDoms = 0; >

Re: [Libvir] suspended domains

2008-03-21 Thread Dan Smith
VZ> virsh # domstate centos52 VZ> paused VZ> As you can see 'centos52' is not shown, although it is known. This is a known issue with Xen 3.2 and paused domains, but I thought it was fixed by this patch: https://www.redhat.com/archives/libvir-list/2008-February/msg00413.html Looking at the 0.

[Libvir] Re: suspended domains

2008-03-21 Thread Vadim Zaliva
Sorry about torrent of emails. Maybe this is also relevant: virsh # version Compiled against library: libvir 0.4.1 Using library: libvir 0.4.1 Using API: Xen 3.0.1 Running hypervisor: Xen 3.2.0 Note API and hypervisor version discrepancy. Vadim -- Libvir-list mailing list Libvir-list@redhat.co

[Libvir] Re: suspended domains

2008-03-21 Thread Vadim Zaliva
Another this that puzzles me: virsh # list --all Id Name State -- 0 Domain-0 running 6 centos51 blocked virsh # quadro /home/lord# xm list NameID Mem VCPUs State Time(s) D

[Libvir] suspended domains

2008-03-21 Thread Vadim Zaliva
I am using libvir 0.4.1 with Xen 3.2.0. It might be an obvious question, but if there is a way to get list of inactive/suspended domains via C API? virsh # list --all Id Name State -- 0 Domain-0 running 6 centos51 blocked

Re: [Libvir] [RFC] 0 of 4 Linux Container support

2008-03-21 Thread Daniel Veillard
On Thu, Mar 20, 2008 at 01:25:05PM -0400, Daniel Veillard wrote: > On Thu, Mar 20, 2008 at 10:20:22AM -0700, Dave Leskovec wrote: > > Daniel Veillard wrote: > > > I would rather keep the type attribute value small, and if possible > > > the same as the one used for the connection URIs, 'lxr' woul

Re: [Libvir] [RFC] 3 of 4 Linux Container support

2008-03-21 Thread Daniel Veillard
On Thu, Mar 20, 2008 at 02:43:28PM -0700, Dave Leskovec wrote: > Daniel Veillard wrote: > > so it's restricted to root, it's probably fine, as we can go though the > > daemon for normal users, ssuming they get authenticated. > > Yes it's restricted to root. That could be removed if file capabili