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.
Reviewed: https:/ /review. opendev. org/649345 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=091aa328969 4a27704e48931a5 79f50a3179b036
Committed: https:/
Submitter: Zuul
Branch: master
commit 091aa3289694a27 704e48931a579f5 0a3179b036
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 info_cache. This regression was 20c09499f2c41d1 1259ca811ae
gets updated during instance reboot to the nova compute host id by
the periodic task: _heal_instance_
introduced in commit: I75fd15ac2a29e4
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] I658754f7f8c740 87b0aabfdef222a 2c0b5698541
Change-Id: I47d1aba17cd2e9 fff67846cc243c8 fbd9ac21659
Closes-Bug: #1822801