versions controller requests with a body log ERRORs

Bug #1306727 reported by Dan Prince
54
This bug affects 26 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Prince
Icehouse
Fix Released
Medium
Mathieu Rohon

Bug Description

Using Nova trunk (Juno). I'm seeing the following nova-api.log errors when unauthenticated /versions controller POST requests are made with a request body:

-----

Apr 11 07:04:06 overcloud-controller0-n2g3h54d6w6u nova-api[27022]: 2014-04-11 07:04:06.235 27044 ERROR nova.api.openstack.wsgi [-] Exception handling resource: index() got an unexpected keyword argument 'body'
Apr 11 07:04:06 overcloud-controller0-n2g3h54d6w6u nova-api[27022]: 2014-04-11 07:04:06.235 27044 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
Apr 11 07:04:06 overcloud-controller0-n2g3h54d6w6u nova-api[27022]: 2014-04-11 07:04:06.235 27044 TRACE nova.api.openstack.wsgi File "/opt/stack/venvs/nova/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 983, in _process_stack
Apr 11 07:04:06 overcloud-controller0-n2g3h54d6w6u nova-api[27022]: 2014-04-11 07:04:06.235 27044 TRACE nova.api.openstack.wsgi action_result = self.dispatch(meth, request, action_args)
Apr 11 07:04:06 overcloud-controller0-n2g3h54d6w6u nova-api[27022]: 2014-04-11 07:04:06.235 27044 TRACE nova.api.openstack.wsgi File "/opt/stack/venvs/nova/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 1070, in dispatch
Apr 11 07:04:06 overcloud-controller0-n2g3h54d6w6u nova-api[27022]: 2014-04-11 07:04:06.235 27044 TRACE nova.api.openstack.wsgi return method(req=request, **action_args)
Apr 11 07:04:06 overcloud-controller0-n2g3h54d6w6u nova-api[27022]: 2014-04-11 07:04:06.235 27044 TRACE nova.api.openstack.wsgi TypeError: index() got an unexpected keyword argument 'body'

-----

Both the index() and multi() actions in the versions controller are susceptible to this behavior. Ideally we wouldn't be logging stack traces when this happens.

Dan Prince (dan-prince)
Changed in nova:
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/86983

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/92379

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/86983
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=aee892e7af2dbe5a600945f98be8f1915e8ac654
Submitter: Jenkins
Branch: master

commit aee892e7af2dbe5a600945f98be8f1915e8ac654
Author: Dan Prince <email address hidden>
Date: Fri Apr 11 14:07:31 2014 -0400

    versions API: ignore request with a body

    Update the OS API versions controller so it ignores requests
    with a body. Previously an incoming (unauthenticated)
    request to the versions API would log a TypeError trace
    in the nova-api.log file with the following message:

    TypeError: index() got an unexpected keyword argument 'body'

    Change-Id: Icc3ccfc537b13627b8d5ba43ae3ba91e34e08c9e
    Closes-bug: #1306727

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Matt Riedemann (mriedem) wrote :

icehouse-backport-potential given bug 1298640 was reported for Icehouse.

tags: added: icehouse-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/92379
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c5450756b6f8a1cae307171c28e99bf15c93b265
Submitter: Jenkins
Branch: stable/icehouse

commit c5450756b6f8a1cae307171c28e99bf15c93b265
Author: Dan Prince <email address hidden>
Date: Fri Apr 11 14:07:31 2014 -0400

    versions API: ignore request with a body

    Update the OS API versions controller so it ignores requests
    with a body. Previously an incoming (unauthenticated)
    request to the versions API would log a TypeError trace
    in the nova-api.log file with the following message:

    TypeError: index() got an unexpected keyword argument 'body'

    Change-Id: Icc3ccfc537b13627b8d5ba43ae3ba91e34e08c9e
    Closes-bug: #1306727

Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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