Comment 36 for bug 1383465

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

Reviewed: https://review.openstack.org/173226
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6c4f6fb466cce6b02087418055ff56c41679db79
Submitter: Jenkins
Branch: stable/juno

commit 6c4f6fb466cce6b02087418055ff56c41679db79
Author: Paul Murray <email address hidden>
Date: Tue Aug 26 18:31:30 2014 +0200

    Move ComputeNode creation at init stage in ResourceTracker

    This is the first step in a series refactoring code that uses
    ResourceTracker.compute_node so that it can later be changed
    to be a ComputeNode object. Note that in this patch compute_node
    is still a dict.

    The main refactor in this patch is to move initialization of the
    compute_node property to a new method called _init_compute_node()
    That is called near the beginning of update_available_resource().

    At the moment the update methods use a method parameter called
    resources that is either the resources data structure obtained from
    the virt driver or the compute_node property, depending on how it is
    called. The result is always copied into the compute_node property.
    This change initialises the compute_node property and creates the
    compute node record as an initialisation step.

    Moving the initialization of the compute_node property to the start
    of update_available_resources() paves the way for the next patch in
    this series to use it consistently in the update methods. The
    code will then be ready to introduce the ComputeNode object.

    This patch also fixes bug 1415768

    Co-Authored-By: Sylvain Bauza <email address hidden>
    Co-Authored-By: Ed Leafe <email address hidden>

    (cherry picked from commit c3ffcd18d9fb1d999d6fa360a811b4c7fdcaba13)

    Conflicts:
     nova/compute/resource_tracker.py
     nova/tests/pci/test_pci_manager.py
     nova/tests/unit/compute/test_tracker.py

    Closes-bug #1415768
    Closes-bug #1383465

    Change-Id: Ic04af76c3835a5bf63a42163d0335d6c7e26d68a