This work follows up PR #60, #146 and #152. In previous PR's, we used a trick to save new segment id associated with target host in the network_allocations table. Since we only extend network allocations during server migration, there is actually no new network allocations created. Therefore it's complicated to implement and difficult to read the code. More importantly, it introduces non-trivial side effect. In cutover stage, the driver tries to delete the ports and create them again. Only part of them are re-created when migrating a 4-lif share server, leading to losts of network interface. In this PR, we save the segment id in the backend details of the destination share server instead. The port-lost problem is avoided without the need of modifying driver.
146 contains fixes to getting the correct ipspace name. Note the convention of ipspace name has changed to using neutron subnet id in upstream https://review.opendev.org/c/openstack/manila/+/885978. It may happen that new ipspace is created using the new convention while ipspace with old convention still exist. Alternative is to use logics in #195, it seems to fit better for the changes of conventions.
This work follows up PR #60, #146 and #152. In previous PR's, we used a trick to save new segment id associated with target host in the network_allocations table. Since we only extend network allocations during server migration, there is actually no new network allocations created. Therefore it's complicated to implement and difficult to read the code. More importantly, it introduces non-trivial side effect. In cutover stage, the driver tries to delete the ports and create them again. Only part of them are re-created when migrating a 4-lif share server, leading to losts of network interface. In this PR, we save the segment id in the backend details of the destination share server instead. The port-lost problem is avoided without the need of modifying driver.
Change-Id: Ifb492e3f832ac2598078082ad53150050a4f7616