Comment 5 for bug 1710141

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

Reviewed: https://review.openstack.org/492964
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9ed692bf8c84e0a702536101cd6cb084d33e1c26
Submitter: Jenkins
Branch: master

commit 9ed692bf8c84e0a702536101cd6cb084d33e1c26
Author: Dmitry Tantsur <email address hidden>
Date: Fri Aug 11 13:52:02 2017 +0200

    Fix reporting inventory for provisioned nodes in the Ironic driver

    Currently we report the full inventory for available nodes, and an empty
    inventory for nodes that are deployed to or otherwise unavailable.

    Reporting an empty inventory for deployed nodes has 2 bad consequences:
    1. Nova tries deleting the inventory for Placement, which fails, because
       the resources are still in use. This results in nasty warnings.
    2. When adding a resource class to a deployed node, it does not get into
       inventory, and thus does not get to Placement. It results in an error
       later on, when the custom resource class is not found.

    This patch fixes the latter problem by
    1. Always reporting the custom resource class for deployed nodes, if present.
    2. Reporting VCPUS/memory/disk in exactly the same amount, as it is configured
       in the ironic node's properties.

    As a side effect, the warnings are no longer shown for deployed nodes.
    They still appear, however, for nodes during cleaning.

    Partial-Bug: #1710141
    Change-Id: I2fd1e4a95f000da19864e75299afa51527697101