Re: Record an error when refusing a read-only operation

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

 



On Wed, Aug 16, 2006 at 10:57:16AM -0400, Daniel Veillard wrote:
> On Wed, Aug 16, 2006 at 03:30:30PM +0100, Daniel P. Berrange wrote:
> > The libvirt.c front-end can be compiled in 'pedantic' mode in which case it
> > explicitly refuses operations with side-effects in read-only connections. 
> > When doing so, however, it was not recording any error message so feedback
> > to the user was misleading / obsure. This patch adds an extra error code
> > VIR_ERR_READ_ONLY which is used when an operation is denied due to a read
> > only connection.
> 
>   argh, I developped a similar patch independantly, using 
> "VIR_ERR_OPERATION_DENIED" instead, it also reports the operation name
> and drop the #ifdef PEDANTIC , making it the default behaviour.

Resolving my changes with the ones you committed was pretty trivial so its
committed now.

> > This patch also passes 'VIR_DRV_OPEN_QUIET' to the 'open' method so tell
> > the XenD driver not complain if it fails to open a HV connection. This is
> > because it was complaining whenever trying to open a test:///default 
> > connection.
> 
>   That should not conflict, yeah it's probably better to have the libvirt
> front-end function report the connection error than letting the drivers
> emit errors themselves. The only problem is that you won't detect hypervisor
> connection failure say if you manage to connect with xend, because at least
> one access method succeeded ...

Ok, this is committed.

Dan,
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


[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]