Re: [libvirt] [PATCH] Quieten virsh schedinfo for shutoff domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx 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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]