On Sat, Oct 17, 2009 at 09:30:12AM +0900, Ryota Ozaki wrote:
Ooop! The patch lost the last modification...so please use the new
one, sorry.
On Fri, Oct 16, 2009 at 9:45 PM, Daniel P. Berrange <berrange(a)redhat.com> wrote:
> On Fri, Oct 16, 2009 at 05:05:27PM +0900, Ryota Ozaki wrote:
>> BTW, by the defect I first got the following error and it made me confused.
>>
>> # virsh -c lxc:/// dominfo 4930
>> Id: 4930
>> Name: lxc
>> UUID: 084369a0-956a-3010-fc37-ddeb4d627e69
>> OS Type: exe
>> Autostart: disable
>> error: this function is not supported by the hypervisor:
virNodeGetSecurityModel
>>
>> The really error happens in lxcDomainGetInfo, so I guess something is wrong
>> with internal error propagation. Anyone know this unexpected behavior?
>
> This looks rather odd - I can't think of anything which could cause this
> to happen - virsh is supposed to be filtering out that error message
OK, I've looked into a bit deep and found the following sequence happens.
In cmdDominfo (virsh.c), if virDomainGetInfo fails, 'ret' is set with FALSE.
Even so, further virNodeGetSecurityModel is called too. And if it also fails
then VIR_ERR_NO_SUPPORT is set. Normally, VIR_ERR_NO_SUPPORT does not lead
cmdDominfo failed, however, 'ret' is previously set with FALSE, then virsh
fails.
Okidoc, I applied the last patch. Thanks !
I wonder if we also need to fix the logic in virsh.c:cmdDominfo() ,
maybe by making:
if (last_error->code != VIR_ERR_NO_SUPPORT) {
into
if ((last_error->code != VIR_ERR_NO_SUPPORT) && (ret != FALSE)) {
or by resetting last_error as well as setting ret to false when
virDomainGetInfo() fails.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/