Comment 22 for bug 1651678

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

Reviewed: https://review.openstack.org/416762
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d9b74f230c9c5233f9ccea74a61b051d618061a3
Submitter: Jenkins
Branch: stable/newton

commit d9b74f230c9c5233f9ccea74a61b051d618061a3
Author: Jay Pipes <email address hidden>
Date: Thu Dec 22 11:09:15 2016 -0500

    placement: Do not save 0-valued inventory

    Ironic nodes that are not available or operable have 0 values for vcpus,
    memory_mb, and local_gb in the returned dict from the Ironic virt driver's
    get_available_resource() call. Don't try to save these 0 values in the
    placement API inventory records, since the placement REST API will return an
    error. Instead, attempt to delete any inventory records for that Ironic node
    resource provider by PUT'ing an empty set of inventory records to the placement
    API.

    Closes-bug: #1651678

    Conflicts:
            nova/scheduler/client/report.py
            nova/tests/unit/scheduler/client/test_report.py

    NOTE(mriedem): The test conflict is due to refacoring change
    1870c75c45a99f879ac7dc0ab5e5b30ad82880cb not being in
    stable/newton. The report.py conflict is due to change
    13ba33a57488f5e553dcca7162cc35b58ff0e7f8 coming before this.

    Change-Id: I10b22606f704abcb970939fb2cd77f026d4d6322
    (cherry picked from commit 3c217acb9c55d647ca362320d697e80d7cfa5ceb)