Creation of QOS policy name with too long name returns "Request Failed: internal server error while processing your request." instead of "Bad Request" error

Bug #1653882 reported by Toni Freger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Undecided
Unassigned

Bug Description

The qos negative test fails [1] on top of Newton release with following error:

"Request Failed: internal server error while processing your request.
Neutron server returns request_ids: ['req-c8fadf15-dce8-4c2f-943a-3cedccccc67f']"

Instead of "Bad Request" error.

[1] neutron.tests.tempest.api.test_qos_negative.QosNegativeTestJSON.test_add_policy_with_too_long_name
from https://github.com/openstack/neutron/blob/master/neutron/tests/tempest/api/test_qos_negative.py

Changed in neutron:
assignee: nobody → Reedip (reedip-banerjee)
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

I tested it with Master and stable/newton but was unable to reproduce the failure.
Funny thing is, if the failure was true, then ideally our Jenkins job would have failed.
Request you to please provide a paste of the logs or the link where you observed the following test case as failed.

Changed in neutron:
status: New → Incomplete
Revision history for this message
Toni Freger (tfreger) wrote :
Download full text (8.2 KiB)

Hi Reedip,

You can find here the debug output, after my manual reproduction, thanks.

$ neutron --debug qos-policy-create zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
DEBUG: stevedore.extension found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1')
DEBUG: stevedore.extension found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG: stevedore.extension found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos')
DEBUG: stevedore.extension found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP')
DEBUG: stevedore.extension found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG: stevedore.extension found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos')
DEBUG: stevedore.extension found extension EntryPoint.parse('token_endpoint = openstackclient.api.auth_plugin:TokenEndpoint')
DEBUG: stevedore.extension found extension EntryPoint.parse('gnocchi-noauth = gnocchiclient.noauth:GnocchiNoAuthLoader')
DEBUG: stevedore.extension found extension EntryPoint.parse('aodh-noauth = aodhclient.noauth:AodhNoAuthLoader')
DEBUG: stevedore.extension found extension EntryPoint.parse('table = cliff.formatters.table...

Read more...

Revision history for this message
Victor Morales (electrocucaracha) wrote :

Hey Toni, can you also provided the logs generated from the server side? More likely they're located in /var/logs/neutron or if you're using devstack they are under /opt/stack/logs folder

Revision history for this message
Toni Freger (tfreger) wrote :
Download full text (15.2 KiB)

Sure, this one from the server side:

2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource Traceback (most recent call last):
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 79, in resource
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource result = method(request=request, **args)
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 430, in create
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource return self._create(request, body, **kwargs)
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 88, in wrapped
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource self.force_reraise()
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 84, in wrapped
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource self.force_reraise()
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource return f(*args, **kwargs)
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 124, in wrapped
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource traceback.format_exc())
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource self.force_reraise()
2017-01-11 09:51:02.091 10748 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-11 09:51:02...

Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Thanks Toni ,
We will look into it :)

Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

I got the same error :

 neutron --debug qos-policy-create zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
.
.
.
snip
.
.
.

BadRequest: Invalid input for name. Reason: 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' exceeds maximum length of 255.

The above has been done with stable/newton.
Not sure why you are getting this issue.

Changed in neutron:
assignee: Reedip (reedip-banerjee) → nobody
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :
Download full text (13.6 KiB)

Ok, Managed to reproduce it

Logs:
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource Traceback (most recent call last):
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 79, in resource
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource result = method(request=request, **args)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 430, in create
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource return self._create(request, body, **kwargs)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 88, in wrapped
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource self.force_reraise()
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 84, in wrapped
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 151, in wrapper
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource ectxt.value = e.inner_exc
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource self.force_reraise()
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 139, in wrapper
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 124, in wrapped
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource traceback.format_exc())
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource self.force_reraise()
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-01-13 01:41:24.177 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 119, in wrapped
2017-01-13 01:41:24.17...

Changed in neutron:
status: Incomplete → Confirmed
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

with the same test on net-create, it shows:
 neutron net-create 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Invalid input for name. Reason: '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' exceeds maximum length of 255.
Neutron server returns request_ids: ['req-22fc1fec-04fa-45f3-811e-35e6cd044e93']

Changed in neutron:
assignee: nobody → Reedip (reedip-banerjee)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/424557

Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/newton)

Reviewed: https://review.openstack.org/424557
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=defdf9c3510bcf9e366d77e6f551699e5a27377e
Submitter: Jenkins
Branch: stable/newton

commit defdf9c3510bcf9e366d77e6f551699e5a27377e
Author: Nam Nguyen Hoai <email address hidden>
Date: Tue Aug 9 09:20:33 2016 +0700

    Disallow specifying too long name and description for qos

    Change-Id: I5c3ed086a7b6ac98186a136a2e449d31e8a93aec
    Closes-Bug: #1610103
    Closes-Bug: #1653882
    (cherry picked from commit 01c4bda9516a0370d7ffc2975a48a1d4d4ed5c2e)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.3.0

This issue was fixed in the openstack/neutron 9.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.