sapcc / manila

Shared filesystem management project for OpenStack.
http://openstack.org
Apache License 2.0
0 stars 2 forks source link

simplify 'Delete queried ports from neutron during share server delete' #185

Closed Carthaca closed 2 months ago

Carthaca commented 3 months ago

followup to 72f01f143f7f532ab51ca7c3ec6fb0f4368746e6

share network is not used, it may even be already deleted

Change-Id: I84cc70064a33d790db519acdabcff29e74770f98

kpawar-sap commented 3 months ago

can you please not change the definition of function and instead handle share_network_not found exception ?

upstream code as below

                share_net = None
                share_net_subnet = None
                if subnet_id:
                    try:
                        share_net_subnet = self.db.share_network_subnet_get(
                            context, subnet_id)
                        share_net = self.db.share_network_get(
                            context, share_net_subnet['share_network_id'])
                    except Exception:
                        LOG.warning('Share network subnet not found during '
                                    'deletion of share server.')
                self.driver.deallocate_network(context, share_server['id'],
                                               share_net,
                                               share_net_subnet)
Carthaca commented 3 months ago

But upstream also isn't using the share_network variable. What is the use case for sending this share network data around if it is not used later?

Loading share_net_subnet makes sense, yes.

kpawar-sap commented 3 months ago

But upstream also isn't using the share_network variable. What is the use case for sending this share network data around if it is not used later?

Loading share_net_subnet makes sense, yes.

share network was added to align with definition of allocate_network. Yes, its not used though.

Carthaca commented 2 months ago

Keeping it close to upstream makes it easier in the future