When one resizes a pinned instance, the instance claims host CPUs for
pinning purposes on the destination. However, the host CPUs on the
source are not immediately relinquished. Rather, they are held by the
migration record, to handle the event that the resize is reverted. It is
only when one confirms this resize that the old cores are finally
relinquished.
It appears there is a potential race between the resource tracker's
periodic task and the freeing of these resources, resulting in attempts
to unpin host cores that have already been unpinned. This test
highlights that bug pending a fix.
NOTE(stephenfin): We don't yet have the '_create_server' helper or the
more sensible '_wait_for_state_change' behavior on 'stable/train', so we
have to revert to '_build_server' and checking for the state before the
one we want.
Change-Id: Ie092628ac71eb87c9dfa7220255a2953ada9e04d
Signed-off-by: Stephen Finucane <email address hidden>
Related-Bug: #1879878
(cherry picked from commit 10f0a42de162c90c701f70c9c28dc31bfada87db)
(cherry picked from commit 8ffaac493288c73badfa4f1ec6021ecb4f3137b7)
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /751365 /opendev. org/openstack/ nova/commit/ 9f789caded517b5 503e6728c3c5859 fb5525ad39
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/train
commit 9f789caded517b5 503e6728c3c5859 fb5525ad39
Author: Stephen Finucane <email address hidden>
Date: Wed Aug 5 14:11:59 2020 +0100
tests: Add reproducer for bug #1879878
When one resizes a pinned instance, the instance claims host CPUs for
pinning purposes on the destination. However, the host CPUs on the
source are not immediately relinquished. Rather, they are held by the
migration record, to handle the event that the resize is reverted. It is
only when one confirms this resize that the old cores are finally
relinquished.
It appears there is a potential race between the resource tracker's
periodic task and the freeing of these resources, resulting in attempts
to unpin host cores that have already been unpinned. This test
highlights that bug pending a fix.
Changes: tests/functiona l/libvirt/ test_numa_ servers. py
nova/
NOTE( stephenfin) : We don't yet have the '_create_server' helper or the for_state_ change' behavior on 'stable/train', so we
more sensible '_wait_
have to revert to '_build_server' and checking for the state before the
one we want.
Change-Id: Ie092628ac71eb8 7c9dfa7220255a2 953ada9e04d c701f70c9c28dc3 1bfada87db) badfa4f1ec6021e cb4f3137b7)
Signed-off-by: Stephen Finucane <email address hidden>
Related-Bug: #1879878
(cherry picked from commit 10f0a42de162c90
(cherry picked from commit 8ffaac493288c73