Re: PATCH: Report errors against virConnectPtr object

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

 



On Wed, Jul 11, 2007 at 04:19:13PM -0400, Daniel Veillard wrote:
> On Wed, Jul 11, 2007 at 08:55:35PM +0100, Daniel P. Berrange wrote:
> > The QEMU driver is not passing in a virConnectPtr object for many of the
> > places it calls virRaiseError. This means the errors aren't getting  fed
> > back to the client correctly - particularly when starting a VM / network.
> > 
> > This patch passes around a virConnectPtr object so errors get reported
> > correctly
> > 
> > Instead of:
> > 
> > $ ~/usr/bin/virsh  --connect  qemu://celery.virt.boston.redhat.com/system start demo
> > error: Failed to start domain demo
> > 
> > It now gives
> > 
> > $ ~/usr/bin/virsh  --connect  qemu://celery.virt.boston.redhat.com/system start demo
> > libvir: QEMU error : QEMU quit during console startup
> > qemu: could not open hard disk image '/root/demo.img'
> > error: Failed to start domain demo
> 
>   Hum, sounds great, the patch is a bit invasive but I don't see how
> to really avoid this with the current data structures.

Yeah, its a huge PITA that we have two different places for storing
errors - one global, one per virConnectPtr object. It would be much
easier if there was just the global one, stored in a thread local,
but we can't easily change the semantics now.

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  -=| 

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