From a94016c8bc60f5f121d34db0588870aff9071876 Mon Sep 17 00:00:00 2001 From: silvacarloss Date: Wed, 8 Sep 2021 19:24:41 -0300 Subject: [PATCH] Follow up for share server migration enhancements Adds a note to the code explaining the need to create new network allocations when a share back end supports reusing the share server. Change-Id: Ic373f7643f7435ecef40e6b5494498ab8967b2ff --- manila/share/manager.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manila/share/manager.py b/manila/share/manager.py index 89ee64046e..684dc92d0f 100644 --- a/manila/share/manager.py +++ b/manila/share/manager.py @@ -5063,6 +5063,14 @@ class ShareManager(manager.SchedulerDependentManager): for key in ['neutron_net_id', 'neutron_subnet_id']: if current_subnet.get(key) != old_subnet.get(key): net_changes_identified = True + + # NOTE(carloss): Even though the share back end won't need to + # create a share server, if a network change was identified, + # there is need to allocate new interfaces to the share server, + # so the back end can set up the new ips considering + # the new networking parameters when completing the migration. + # In such case, the migration will be disruptive, since the old + # allocations will be replaced by the new ones. if net_changes_identified: share_network_subnet = self.db.share_network_subnet_get( context, dest_share_server['share_network_subnet_id'])