Re: crash on domain shutdown (via ruby)

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

 



On Fri, Apr 11, 2008 at 05:16:03AM +0000, David Lutterkort wrote:
> The way virResetError was used was incorrect: it can only be called if
> virConnCopyLastError returned a positive result. For some reason, in
> your example virDomainShutdown fails, but the error status on the
> connection seems to still be VIR_ERR_OK.

You have to be careful because some libvirt calls return error
indications without first setting up any virterror.  These cases are
bugs in libvirt of course, but wearisome to find.  (Well, I suggested
a method using static analysis to find them, but don't have the time
to implement it right now).

In any case you have to be prepared for this situation.  The OCaml
bindings turn these cases into a "fake" VIR_ERR_INTERNAL_ERROR /
VIR_FROM_NONE / VIR_ERR_ERROR.

http://hg.et.redhat.com/applications/virt/applications/virt-top--devel?f=6fe1e50a49db;file=libvirt/libvirt_c_epilogue.c
(line 68)

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

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