Fix update of trunk subports during live migration
During the live migration trunk subports where updated only based
on the "host_id" field. But when rpc message to update subports
is send trunk's port is still bound to the old host and has
"migrating_to" field in binding:profile set to the new host.
Because of that binding:host_id for the subport's port wasn't updated
proberly and port was set to DOWN on the new host.
That could even cause connectivity break if L2population is used in the
cloud.
This patch fixes that by updating subport's binding:host_id field based
on the migrating_to field if that is available and not empty.
Closes-Bug: #1914747
Change-Id: I98e55242d381ada642ca0729e9aefdea7628c945
(cherry picked from commit e05101c8ac953cc2823b35aaed3d499afc101988)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/775103 /opendev. org/openstack/ neutron/ commit/ d570871e57f6d65 c1eedad902754aa 098a942829
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/rocky
commit d570871e57f6d65 c1eedad902754aa 098a942829
Author: Slawek Kaplonski <email address hidden>
Date: Fri Feb 5 13:32:23 2021 +0100
Fix update of trunk subports during live migration
During the live migration trunk subports where updated only based
on the "host_id" field. But when rpc message to update subports
is send trunk's port is still bound to the old host and has
"migrating_to" field in binding:profile set to the new host.
Because of that binding:host_id for the subport's port wasn't updated
proberly and port was set to DOWN on the new host.
That could even cause connectivity break if L2population is used in the
cloud.
This patch fixes that by updating subport's binding:host_id field based
on the migrating_to field if that is available and not empty.
Closes-Bug: #1914747 a642ca0729e9aef dea7628c945 2823b35aaed3d49 9afc101988)
Change-Id: I98e55242d381ad
(cherry picked from commit e05101c8ac953cc