i have resloved this bug, actually, maybe not a bug. It was my fault
when merge codes into my ocata release, sorry!

** Changed in: neutron
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1731250

Title:
  Neutron Exceptions when get neutron detailed quotas

Status in neutron:
  Invalid

Bug description:
  The bug(1599488) was fixed on Jul 18, 2017, so i want to cherry-pick the 
commit into my stable/ocata neutron branch,
  and test the function using neutronclient with '--detail' param, but 
exception was occured like this: 

  2017-11-09 20:16:36.357 20897 ERROR neutron.db.quota.driver 
[req-0ad2b739-1e95-41b7-ab28-69a7081fdb5b - - - - -] SML key: firewall_policy
  2017-11-09 20:16:36.357 20897 ERROR neutron.db.quota.driver 
[req-0ad2b739-1e95-41b7-ab28-69a7081fdb5b - - - - -] SML plugins: {'FLAVORS': 
<weakproxy at 0x5b8cfc8 to FlavorsPlugin at 0x14a6cbd0>, 'CORE': <weakproxy at 
0x5b8ce68 to Ml2Plugin at 0x3dc2a90>, 'network-ip-availability': <weakproxy at 
0x5b8cf70 to NetworkIPAvailabilityPlugin at 0x14a82fd0>, 'FIREWALL': <weakproxy 
at 0x5b8cf18 to FirewallPlugin at 0x14a69ed0>, 'timestamp': <weakproxy at 
0x5b8cec0 to TimeStampPlugin at 0x14a7de10>, 'auto-allocated-topology': 
<weakproxy at 0x14a715d0 to Plugin at 0x14a73690>, 'revision_plugin': 
<weakproxy at 0x5b85100 to RevisionPlugin at 0x14a89550>, 'TAG': <weakproxy at 
0x5b850a8 to TagPlugin at 0x14a892d0>, 'trunk': <weakproxy at 0x5b85050 to 
TrunkPlugin at 0x1499dc10>, 'L3_ROUTER_NAT': <weakproxy at 0x5b85158 to 
L3RouterPlugin at 0x148dd450>}
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource 
[req-0ad2b739-1e95-41b7-ab28-69a7081fdb5b - - - - -] details failed: No details.
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource Traceback (most 
recent call last):
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 79, in 
resource
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     result = 
method(request=request, **args)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/extensions/quotasv2_detail.py", line 
56, in details
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
self._get_detailed_quotas(request, id)}
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/extensions/quotasv2_detail.py", line 
46, in _get_detailed_quotas
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
resource_registry.get_all_resources(), tenant_id)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/db/api.py", line 166, in wrapped
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     return 
method(*args, **kwargs)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/db/api.py", line 95, in wrapped
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     setattr(e, 
'_RETRY_EXCEEDED', True)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
self.force_reraise()
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in 
force_reraise
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
six.reraise(self.type_, self.value, self.tb)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/db/api.py", line 91, in wrapped
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     return 
f(*args, **kwargs)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     ectxt.value = 
e.inner_exc
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
self.force_reraise()
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in 
force_reraise
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
six.reraise(self.type_, self.value, self.tb)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     return 
f(*args, **kwargs)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/db/api.py", line 131, in wrapped
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
traceback.format_exc())
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
self.force_reraise()
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in 
force_reraise
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     
six.reraise(self.type_, self.value, self.tb)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/db/api.py", line 126, in wrapped
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     return 
f(*dup_args, **dup_kwargs)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/db/quota/driver.py", line 99, in 
get_detailed_tenant_quotas
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     used = 
resource.count(context, plugin, tenant_id)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/quota/resource.py", line 133, in count
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     return 
self._count_func(context, plugin, self.plural_name, tenant_id)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource   File 
"/usr/lib/python2.7/site-packages/neutron/quota/resource.py", line 39, in 
_count_resource
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource     obj_getter = 
getattr(plugin, "get_%s" % collection_name)
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource AttributeError: 
'Ml2Plugin' object has no attribute 'get_firewall_policies'
  2017-11-09 20:16:36.359 20897 ERROR neutron.api.v2.resource 

  
  so i checked codes, and found locations of exception in 
neutron/db/quota/driver.py:
      plugins = directory.get_plugins()
      plugin = plugins.get(key, plugins[constants.CORE])
      used = resource.count(context, plugin, tenant_id)
  and plugin was always ML2Plugin.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1731250/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to