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
This commit is contained in:
silvacarloss 2021-09-08 19:24:41 -03:00
parent 65f3967efa
commit a94016c8bc
1 changed files with 8 additions and 0 deletions

View File

@ -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'])