Milan Zamazal has uploaded a new change for review. Change subject: numa: Don't crash on hotplugged CPUs when retrieving NUMA info ......................................................................
numa: Don't crash on hotplugged CPUs when retrieving NUMA info getVmNumaNodeRuntimeInfo maps virtual (from Engine) nodes to physical nodes by matching nodes and CPUs from the libvirt runtime and from the Engine NUMA mapping. CPUs that are not pinned to any node in the Engine NUMA mapping (such as hotplugged CPUs) are irrelevant. However the matching cycle still looks for them in the Engine NUMA mapping dictionary, resulting in KeyError. This patch fixes the KeyError by simply skipping the CPUs not present in the Engine NUMA mapping. Change-Id: If7d00b897e430d9c4e8a23cb1451209b6f00e688 Signed-off-by: Milan Zamazal <mzama...@redhat.com> --- M lib/vdsm/numa.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/65562/1 diff --git a/lib/vdsm/numa.py b/lib/vdsm/numa.py index 7a31a99..15a8c73 100644 --- a/lib/vdsm/numa.py +++ b/lib/vdsm/numa.py @@ -260,7 +260,10 @@ vcpu_to_vnode = _get_mapping_vcpu_to_vnode(vm) for vcpu_id, pcpu_id in vcpu_to_pcpu.iteritems(): - vnode_index = str(vcpu_to_vnode[vcpu_id]) + try: + vnode_index = str(vcpu_to_vnode[vcpu_id]) + except KeyError: # hotplugged CPU + continue vm_numa_placement[vnode_index].add(pcpu_to_pnode[pcpu_id]) vm_numa_placement[vnode_index].update( vcpu_to_pnode.get(vcpu_id, ())) -- To view, visit https://gerrit.ovirt.org/65562 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7d00b897e430d9c4e8a23cb1451209b6f00e688 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Milan Zamazal <mzama...@redhat.com> _______________________________________________ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org