]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Log tenant ports if subnet could not be deleted
authorEugene Nikanorov <enikanorov@mirantis.com>
Thu, 29 Jan 2015 21:58:42 +0000 (00:58 +0300)
committerEugene Nikanorov <enikanorov@mirantis.com>
Mon, 2 Feb 2015 15:54:21 +0000 (18:54 +0300)
Change-Id: Icd64cda9de2bb1c3ab090366a7a20cec894dca14
Related-Bug: #1357055

neutron/db/db_base_plugin_v2.py

index 9eb281bfdce816ddc24ff3c95f66e63efbc9df34..3fb63c922e0e5969cfe1e2191925438315b2a822 100644 (file)
@@ -1248,9 +1248,12 @@ class NeutronDbPluginV2(neutron_plugin_base_v2.NeutronPluginBaseV2,
             # the isolation level is set to READ COMMITTED allocations made
             # concurrently will be returned by this query
             if not is_auto_addr_subnet:
-                if self._subnet_check_ip_allocations(context, id):
-                    LOG.debug("Found IP allocations on subnet %s, "
-                              "cannot delete", id)
+                alloc = self._subnet_check_ip_allocations(context, id)
+                if alloc:
+                    LOG.info(_LI("Found IP allocation %(alloc)s on subnet "
+                                 "%(subnet)s, cannot delete"),
+                             {'alloc': alloc,
+                              'subnet': id})
                     raise n_exc.SubnetInUse(subnet_id=id)
 
             context.session.delete(subnet)