yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #57727
[Bug 1633066] [NEW] Input int value into service_type list hit internal error
Public bug reported:
I use REST api to create/update subnet with serive_types. I use some int
type values in the list.
The creation body is:
{
"subnet": {
"network_id": "0d04102a-ba15-4d6c-94ee-8ac480cbb1ba",
"name": "hellowor",
"cidr": "99.99.99.99/24",
"service_types" : ["network:1",2,3],
"ip_version": 4
}
}
neutron server hit internal error.
2016-10-13 17:44:27.842 ERROR neutron.api.v2.resource [req-b9846c07-3574-4094-b6fe-ca978c1d31ce admin 488da3aab0ff45df9e85e17e7f89fedd] create failed: No details.
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource Traceback (most recent call last):
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 79, in resource
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource result = method(request=request, **args)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 430, in create
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return self._create(request, body, **kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 88, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource self.force_reraise()
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 84, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource ectxt.value = e.inner_exc
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource self.force_reraise()
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 124, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource traceback.format_exc())
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource self.force_reraise()
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 119, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 439, in _create
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource allow_bulk=self._allow_bulk)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 719, in prepare_request_body
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource attributes.convert_value(attr_info, res_dict, webob.exc.HTTPBadRequest)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/attributes.py", line 431, in convert_value
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource res = validator(res_dict[attr], attr_vals['validate'][rule])
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/extensions/subnet_service_types.py", line 47, in _validate_subnet_service_types
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource not service_type.startswith(tuple(prefixes))):
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource AttributeError: 'int' object has no attribute 'startswith'
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource
** Affects: neutron
Importance: Undecided
Assignee: zhaobo (zhaobo6)
Status: New
** Changed in: neutron
Assignee: (unassigned) => zhaobo (zhaobo6)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1633066
Title:
Input int value into service_type list hit internal error
Status in neutron:
New
Bug description:
I use REST api to create/update subnet with serive_types. I use some
int type values in the list.
The creation body is:
{
"subnet": {
"network_id": "0d04102a-ba15-4d6c-94ee-8ac480cbb1ba",
"name": "hellowor",
"cidr": "99.99.99.99/24",
"service_types" : ["network:1",2,3],
"ip_version": 4
}
}
neutron server hit internal error.
2016-10-13 17:44:27.842 ERROR neutron.api.v2.resource [req-b9846c07-3574-4094-b6fe-ca978c1d31ce admin 488da3aab0ff45df9e85e17e7f89fedd] create failed: No details.
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource Traceback (most recent call last):
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 79, in resource
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource result = method(request=request, **args)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 430, in create
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return self._create(request, body, **kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 88, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource self.force_reraise()
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 84, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource ectxt.value = e.inner_exc
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource self.force_reraise()
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 124, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource traceback.format_exc())
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource self.force_reraise()
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 119, in wrapped
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 439, in _create
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource allow_bulk=self._allow_bulk)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 719, in prepare_request_body
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource attributes.convert_value(attr_info, res_dict, webob.exc.HTTPBadRequest)
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/attributes.py", line 431, in convert_value
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource res = validator(res_dict[attr], attr_vals['validate'][rule])
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/extensions/subnet_service_types.py", line 47, in _validate_subnet_service_types
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource not service_type.startswith(tuple(prefixes))):
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource AttributeError: 'int' object has no attribute 'startswith'
2016-10-13 17:44:27.842 TRACE neutron.api.v2.resource
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1633066/+subscriptions
Follow ups