[libvirt] [bug] python-libvirt vcpus mismatch

I've got a libvirt-created instance where I've been messing with affinity, and now something is strange. I did the following in python:
import libvirt conn=libvirt.open("qemu:///system") dom = conn.lookupByName('instance-00000027') dom.vcpus() ([(0, 1, 528150000000L, 2), (1, 1, 548070000000L, 3)], [(False, False, True, False), (False, False, True, False)])
I'm totally confused by that "3". It's supposed to represent the physical cpu that virtual cpu 1 is running on. But cpu 3 isn't even in the allowable affinity map for vcpu 1. If I query the data other ways, I get both cpus running on physical cpu 2: root@compute-0:~# virsh vcpupin instance-00000027 VCPU: CPU Affinity ---------------------------------- 0: 2 1: 2 root@compute-0:~# virsh emulatorpin instance-00000027 emulator: CPU Affinity ---------------------------------- *: 2 root@compute-0:~# taskset -pac 15072 pid 15072's current affinity list: 2 pid 15073's current affinity list: 1-3 pid 15075's current affinity list: 2 pid 15076's current affinity list: 0 So I'm left with the conclusion that there is something strange going on with libvirt-python. Anyone got any ideas? Chris

On 05/28/2014 02:13 AM, Chris Friesen wrote:
I've got a libvirt-created instance where I've been messing with affinity, and now something is strange.
I did the following in python:
import libvirt conn=libvirt.open("qemu:///system") dom = conn.lookupByName('instance-00000027') dom.vcpus() ([(0, 1, 528150000000L, 2), (1, 1, 548070000000L, 3)], [(False, False, True, False), (False, False, True, False)])
I'm totally confused by that "3". It's supposed to represent the physical cpu that virtual cpu 1 is running on. But cpu 3 isn't even in the allowable affinity map for vcpu 1.
Do you get the same value via 'virsh vcpuinfo'? It's the virsh command that uses the same API (virDomainGetVcpus). Jan
participants (2)
-
Chris Friesen
-
Ján Tomko