Comment 5 for bug 1408480

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

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

commit cfce73b36a3afe4e8be889faf3f5ec78bd19c0c7
Author: EdLeafe <email address hidden>
Date: Mon Jan 12 15:56:21 2015 +0000

    Pass correct context to get_by_compute_node()

    A recent change to the PciDevTracker class allowed for the passing of
    the compute node ID to the __init__() method, where
    PciDevsList.get_by_compute_node() was called with a 'context' parameter,
    which wasn't defined, resulting in the imported context module being
    passed instead.

    This change requires that the context be passed in to the __init__() for
    the PciDevTracker class, and that that be used to create the
    PciDevsList. The existing import of the context module is no longer
    needed in the pci/manager.py file, so the conflict is no longer a
    problem. The only place in the code that currently instantiates a
    PciDevTracker object is in the ResourceTracker, so that has been updated
    to pass in the context. A unit test to check for context has also been
    added.

    (cherry picked from commit 50ee9dd76e8955dd57e5a7318be023c76c462f67)

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

    Closes-Bug: #1408480
    Change-Id: Id136eabacb00e4381c03f12d8484fc90a5eb48b1