Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2009-01-12 Thread Daniel P. Berrange
On Mon, Jan 12, 2009 at 04:37:50PM +0100, Guido G?nther wrote: > On Mon, Jan 12, 2009 at 11:30:19AM +, Daniel P. Berrange wrote: > > There's different needs for each file descriptor > > > > - stdin_fd - this is only ever used for incoming migration data > >all other times it is hooked up

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2009-01-12 Thread Guido Günther
On Mon, Jan 12, 2009 at 11:30:19AM +, Daniel P. Berrange wrote: > There's different needs for each file descriptor > > - stdin_fd - this is only ever used for incoming migration data >all other times it is hooked up to /dev/null. So we don't need >to keep this FD around at all Agreed

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2009-01-12 Thread Daniel P. Berrange
On Sun, Jan 11, 2009 at 02:09:26PM +0100, Guido G?nther wrote: > On Mon, Dec 15, 2008 at 11:27:27AM +, Daniel P. Berrange wrote: > [..snip..] > > > +vm->stdin_fd = qemudGetProcFD(vm->pid, 0); > > > +vm->stdout_fd = qemudGetProcFD(vm->pid, 1); > > > +vm->stderr_fd = qem

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2009-01-11 Thread Guido Günther
On Mon, Dec 15, 2008 at 11:27:27AM +, Daniel P. Berrange wrote: [..snip..] > > +vm->stdin_fd = qemudGetProcFD(vm->pid, 0); > > +vm->stdout_fd = qemudGetProcFD(vm->pid, 1); > > +vm->stderr_fd = qemudGetProcFD(vm->pid, 2); > > NACK, to these 3 lines - since we go to tro

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-18 Thread Guido Günther
On Mon, Dec 15, 2008 at 11:27:27AM +, Daniel P. Berrange wrote: > NACK, to these 3 lines - since we go to trouble of creating the statefile, > we should store the FD numbers in the statefile too, instead of relying > in the linux specific /proc code. This patch actually monitors things in /proc

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-15 Thread Guido Günther
On Mon, Dec 15, 2008 at 11:23:15AM +, Daniel P. Berrange wrote: > On Fri, Dec 12, 2008 at 11:21:09PM +0100, Guido G?nther wrote: > > On Fri, Dec 12, 2008 at 08:30:26PM +, Daniel P. Berrange wrote: > > > This is crying out for us to write a virASprintf() that explicitly > > > always sets pat

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-15 Thread Daniel P. Berrange
On Fri, Dec 12, 2008 at 07:27:55PM +0100, Guido G?nther wrote: > The earlier patches didn't change libvirtd behaviour (except for > kvm/qemu not being teared down on an unexpected daemon crash), all vms > were still being shutoff at daemon shutdown. This patch now adds the > code to read back the v

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-15 Thread Daniel P. Berrange
On Fri, Dec 12, 2008 at 11:21:09PM +0100, Guido G?nther wrote: > On Fri, Dec 12, 2008 at 08:30:26PM +, Daniel P. Berrange wrote: > > This is crying out for us to write a virASprintf() that explicitly > > always sets path = NULL upon failure. And then blacklist 'asprintf' > > in make syntax-chec

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-15 Thread Daniel Veillard
On Fri, Dec 12, 2008 at 11:21:09PM +0100, Guido Günther wrote: > On Fri, Dec 12, 2008 at 08:30:26PM +, Daniel P. Berrange wrote: > > This is crying out for us to write a virASprintf() that explicitly > > always sets path = NULL upon failure. And then blacklist 'asprintf' > > in make syntax-chec

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-12 Thread David Lutterkort
On Fri, 2008-12-12 at 23:21 +0100, Guido Günther wrote: > On Fri, Dec 12, 2008 at 08:30:26PM +, Daniel P. Berrange wrote: > > This is crying out for us to write a virASprintf() that explicitly > > always sets path = NULL upon failure. And then blacklist 'asprintf' > > in make syntax-check. > Po

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-12 Thread Guido Günther
On Fri, Dec 12, 2008 at 08:30:26PM +, Daniel P. Berrange wrote: > This is crying out for us to write a virASprintf() that explicitly > always sets path = NULL upon failure. And then blacklist 'asprintf' > in make syntax-check. Possible virAsprintf attached. I've already moved the posted patch s

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-12 Thread Daniel P. Berrange
On Fri, Dec 12, 2008 at 11:38:59AM -0800, David Lutterkort wrote: > On Fri, 2008-12-12 at 19:27 +0100, Guido Günther wrote: > > diff --git a/src/qemu_driver.c b/src/qemu_driver.c > > index d8b87e4..57a396c 100644 > > --- a/src/qemu_driver.c > > +++ b/src/qemu_driver.c > > @@ -183,6 +183,46 @@ qemud

Re: [libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-12 Thread David Lutterkort
On Fri, 2008-12-12 at 19:27 +0100, Guido Günther wrote: > diff --git a/src/qemu_driver.c b/src/qemu_driver.c > index d8b87e4..57a396c 100644 > --- a/src/qemu_driver.c > +++ b/src/qemu_driver.c > @@ -183,6 +183,46 @@ qemudAutostartConfigs(struct qemud_driver *driver) { > } > > > +static int > +q

[libvirt] [PATCH 5/5] read saved vm status on libvirtd startup

2008-12-12 Thread Guido Günther
The earlier patches didn't change libvirtd behaviour (except for kvm/qemu not being teared down on an unexpected daemon crash), all vms were still being shutoff at daemon shutdown. This patch now adds the code to read back the vm status after on daemon startup and reconnects all running vms found i