[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Quieten virsh schedinfo for shutoff domain
- From: John Levon <john levon sun com>
- To: "Richard W.M. Jones" <rjones redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Quieten virsh schedinfo for shutoff domain
- Date: Mon, 26 Jan 2009 11:27:22 +0000
On Mon, Jan 26, 2009 at 10:54:23AM +0000, Richard W.M. Jones wrote:
> On Thu, Jan 22, 2009 at 05:49:12PM -0800, john levon sun com wrote:
> > + /*
> > + * If it's not running, we can't help.
> > + */
> > + if (domain->id < 0)
> > + return NULL;
>
> NACK. Unfortunately you shouldn't return from a function without
> setting an error (and you have to set an error exactly once otherwise
> earlier errors get overwritten).
>
> Perhaps if you want to silence the error, you can silence it in the
> calling code, eg. in virsh, by matching on the appropriate virterror
> fields, eg error->code ?
The calling code isn't in virsh, it's in xen_unified. The XenStore
driver indeed cannot deal with non-running domains. I maintain this is
the correct behaviour for a sub-driver (a driver should certainly set an
error). We already have enough problems with overly eager error
reporting (try a virsh start non-existent-dom !), let's not make it
worse.
regards
john
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]