Comment 6 for bug 1822801

Submitter: Zuul
Branch: stable/stein

commit 7cd816f43a9a699ccc5c5826b0904a3414664132
Author: Hamdy Khader <email address hidden>
Date: Tue Apr 2 17:26:14 2019 +0300

    Do not perform port update in case of baremetal instance.

    In case of a baremetal instance, the instance's port binding:host_id
    gets updated during instance reboot to the nova compute host id by
    the periodic task: _heal_instance_info_cache. This regression was
    introduced in commit: I75fd15ac2a29e420c09499f2c41d11259ca811ae

    This is an un-desirable change as ironic virt driver did the original
    port binding, nova should not update the value.
    In case of a baremetal port, the binding:host_id represents the ironic
    node_uuid. In case of a SmartNIC(baremetal) port[1] the binding:host_id
    represent the SmartNIC hostname and it MUST not change since ironic
    relies on that information as well as the Neutron agent that runs on
    the SmartNIC.

    A new API method was added, "manages_port_bindings()", to ComputeDriver
    that defaults to False, and overriden in IronicDriver to True.

    A call to this API method is now made in _heal_instance_info_cache() to
    prevent port update for instance ports in case the underlying
    ComputeDriver manages the port binding.

    [1] I658754f7f8c74087b0aabfdef222a2c0b5698541

    Change-Id: I47d1aba17cd2e9fff67846cc243c8fbd9ac21659
    Closes-Bug: #1822801
    (cherry picked from commit 091aa3289694a27704e48931a579f50a3179b036)