Re: virsh list shows first domain twice

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

 



On 08/12/2013 03:11 AM, Stefan Scheglmann wrote:
> Hi,
> 
> do not know since when but i recently realized that the 'virsh list' command shows me the first dom (the one with id 1) twice in the output List, e.g.
> 
> virsh # list
>  Id Name                 Status
> ----------------------------------
>   1 essir                laufend
>   1 essir                laufend

> Not a serious issue but i encounter it on several hypervisors. All hypervisors running  3.2.0-40-generic with libvirt version 0.9.8. 

There is a known race in the design of the API used in older libvirt.
Anything older than 0.9.13 lacks the virConnectListAllDomains, so virsh
has to fall back to calling virConnectListDomains and
virConnectListDefinedDomains and piece the two lists together, plus lots
of calls to virDomainLookupBy* to learn what state each domain is in.
With the older style, the list can change contents in between the two
list-collection calls, and domains can change state between when the
list was collected and when virsh does the lookup to learn the state.
The race-free version of virConnectListAllDomains was added precisely to
avoid these sorts of races.  As such, the only thing I can suggest is to
upgrade to a newer version of libvirt.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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