Fix for 1694897 broke existing agent function
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Unassigned |
Bug Description
Due to change made for 1694897 - (https:/
From neutron server log :
2017-07-26 08:17:35.737 4946 INFO neutron.wsgi [req-13b37d24-
2017-07-26 08:17:46.385 4949 ERROR neutron.
2017-07-26 08:17:46.385 4949 ERROR neutron.
2017-07-26 08:17:46.385 4949 ERROR neutron.
2017-07-26 08:17:46.385 4949 ERROR neutron.
2017-07-26 08:17:46.385 4949 ERROR neutron.
2017-07-26 08:17:46.385 4949 ERROR neutron.
args variable is empty dictionary : {}
It is due to this code in the same resource.py resource method:
route_args = request.
if route_args:
args = route_args[
else:
args = {}
args can be empty dictionary. args['id'] will be invalid.
This problem is found in ocata release of OpenStack.
Changed in neutron: | |
milestone: | none → pike-rc1 |
Changed in neutron: | |
assignee: | Ihar Hrachyshka (ihar-hrachyshka) → nobody |
Did more analysis using pdb. In failing environment seeing this : python2. 7/site- packages/ neutron/ api/v2/ resource. py(93)resource( ) [args[' id'], fmt]) request= request, **args) python2. 7/site- packages/ neutron/ api/v2/ resource. py(94)resource( ) [args[' id'], fmt])
> /usr/lib/
-> if fmt is not None and fmt not in format_types:
(Pdb) l
88 # to tackle it without breaking API backwards compatibility.
89 import pdb; pdb.set_trace()
90 print args
91 print fmt
92 print format_types
93 -> if fmt is not None and fmt not in format_types:
94 args['id'] = '.'.join(
95
96 method = getattr(controller, action)
97 result = method(
98 except Exception as e:
(Pdb) n
> /usr/lib/
-> args['id'] = '.'.join(
(Pdb) p fmt
u'json.json'
(Pdb) p format_types
{'json': 'application/json'}
Since json.json is not in format_types, args['id'] is expected and it fails.