[libvirt] virsh list shows first domain twice

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 2 mobile-sensing laufend 3 related-work laufend 4 elisa laufend 5 lehre1 laufend 7 carina laufend VirtManager for instance does not show the dom twice, but i encounter that several stopped machines, especially if they are newly cloned, are not shown in the VirtManager application. A restart/reload of libvirt-bin does not change this issue. Checking with 'ps aux | grep essir' shows that the dom is only running one time. #ps aux | grep essir 104 2156 0.4 5.6 2741560 926164 ? Sl Jun29 293:58 /usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name essir -uuid e5abcb27-eab5-b271-3476-0c9c29eb005c -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/essir.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -drive file=/lvm-volumes/vms-sas/essir.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=18,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:2a:24:65,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 root 9840 0.0 0.0 10912 928 pts/0 S+ 10:53 0:00 grep --color=auto essir 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. Stefan Scheglmann WeST Research Group University of Koblenz-Landau Universitaetsstrasse 1 D-56070 Koblenz Tel.: + 49 261 287 2718 Fax: + 49 261 287 100 2718 schegi@uni-koblenz.de http://west.uni-koblenz.de

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
participants (2)
-
Eric Blake
-
Stefan Scheglmann