Comment 10 for bug 1853009

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/695187
Committed: https://opendev.org/openstack/nova/commit/32676a9f45807ea8770dc7bdff1e859673af1b61
Submitter: "Zuul (22348)"
Branch: master

commit 32676a9f45807ea8770dc7bdff1e859673af1b61
Author: Stephen Finucane <email address hidden>
Date: Wed Apr 28 13:53:39 2021 +0100

    Clear rebalanced compute nodes from resource tracker

    There is a race condition in nova-compute with the ironic virt driver as
    nodes get rebalanced. It can lead to compute nodes being removed in the
    DB and not repopulated. Ultimately this prevents these nodes from being
    scheduled to.

    The issue being addressed here is that if a compute node is deleted by a host
    which thinks it is an orphan, then the compute host that actually owns the node
    might not recreate it if the node is already in its resource tracker cache.

    This change fixes the issue by clearing nodes from the resource tracker cache
    for which a compute node entry does not exist. Then, when the available
    resource for the node is updated, the compute node object is not found in the
    cache and gets recreated.

    Change-Id: I39241223b447fcc671161c370dbf16e1773b684a
    Partial-Bug: #1853009