Comment 16 for bug 1729621

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

Reviewed: https://review.openstack.org/612294
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=36d93675d9a6bf903ed64c216243c74a639a2087
Submitter: Zuul
Branch: stable/queens

commit 36d93675d9a6bf903ed64c216243c74a639a2087
Author: Maciej Józefczyk <email address hidden>
Date: Thu Nov 16 14:49:42 2017 +0100

    Update resources once in update_available_resource

    This change ensures that resources are updated only once per
    update_available_resource() call.

    Compute resources were previously updated during host
    object initialization and at the end of
    update_available_resource(). It could cause inconsistencies
    in resource tracking between compute host and DB for couple
    of second when final _update() at the end of
    update_available_resource() is being called.

    For example: nova-api shows that host uses 10GB of RAM, but
    in fact its 12GB because DB doesn't have resources that belongs
    to shutdown instance.

    Because of that fact nova-scheduler (CachingScheduler) could
    choose (based on imcomplete information) host which is already full.

    For more informations please see realted bug: #1729621

    Change-Id: I120a98cc4c11772f24099081ef3ac44a50daf71d
    Closes-Bug: #1729621
    (cherry picked from commit c9b74bcfa09d11c2046ce1bfb6dd8463b3a2f3b0)