Comment 8 for bug 1729621

Reviewed: https://review.openstack.org/520024
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c9b74bcfa09d11c2046ce1bfb6dd8463b3a2f3b0
Submitter: Zuul
Branch: master

commit c9b74bcfa09d11c2046ce1bfb6dd8463b3a2f3b0
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