metadata server update_all expects body but doesn't get it passed to it

Bug #1242916 reported by David Kranz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
High
Unassigned

Bug Description

This recently started showing up in n-api. Seems like mishandling of invalid client args from a negative test in tempest.
Example: http://logs.openstack.org/03/52803/3/check/check-tempest-devstack-vm-postgres-full/354d7a3/logs/screen-n-api.txt.gz

2013-10-21 20:04:51.724 20923 DEBUG routes.middleware [-] Matched PUT /6fa344aaf3034c4992bc30b3c06ad531/servers/a329912b-7874-4636-a08b-e40362e04ab2/metadata __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2013-10-21 20:04:51.724 20923 DEBUG routes.middleware [-] Route path: '/{project_id}/servers/{server_id}/metadata', defaults: {'action': u'update_all', 'controller': <nova.api.openstack.wsgi.Resource object at 0x48d2bd0>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2013-10-21 20:04:51.724 20923 DEBUG routes.middleware [-] Match dict: {'action': u'update_all', 'server_id': u'a329912b-7874-4636-a08b-e40362e04ab2', 'project_id': u'6fa344aaf3034c4992bc30b3c06ad531', 'controller': <nova.api.openstack.wsgi.Resource object at 0x48d2bd0>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2013-10-21 20:04:51.724 DEBUG nova.api.openstack.wsgi [req-23bdfb52-dae5-42f7-a5b7-17c319ed67ff ServerMetadataTestJSON-tempest-1354548727-user ServerMetadataTestJSON-tempest-1354548727-tenant] Empty body provided in request get_body /opt/stack/new/nova/nova/api/openstack/wsgi.py:839
2013-10-21 20:04:51.724 DEBUG nova.api.openstack.wsgi [req-23bdfb52-dae5-42f7-a5b7-17c319ed67ff ServerMetadataTestJSON-tempest-1354548727-user ServerMetadataTestJSON-tempest-1354548727-tenant] Calling method <bound method Controller.update_all of <nova.api.openstack.compute.server_metadata.Controller object at 0x48d2450>> _process_stack /opt/stack/new/nova/nova/api/openstack/wsgi.py:962
2013-10-21 20:04:51.725 ERROR nova.api.openstack.wsgi [req-23bdfb52-dae5-42f7-a5b7-17c319ed67ff ServerMetadataTestJSON-tempest-1354548727-user ServerMetadataTestJSON-tempest-1354548727-tenant] Exception handling resource: update_all() takes exactly 4 arguments (3 given)
2013-10-21 20:04:51.725 20923 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
2013-10-21 20:04:51.725 20923 TRACE nova.api.openstack.wsgi File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 997, in _process_stack
2013-10-21 20:04:51.725 20923 TRACE nova.api.openstack.wsgi action_result = self.dispatch(meth, request, action_args)
2013-10-21 20:04:51.725 20923 TRACE nova.api.openstack.wsgi File "/opt/stack/new/nova/nova/api/openstack/wsgi.py", line 1078, in dispatch
2013-10-21 20:04:51.725 20923 TRACE nova.api.openstack.wsgi return method(req=request, **action_args)
2013-10-21 20:04:51.725 20923 TRACE nova.api.openstack.wsgi TypeError: update_all() takes exactly 4 arguments (3 given)
2013-10-21 20:04:51.725 20923 TRACE nova.api.openstack.wsgi
2013-10-21 20:04:51.726 DEBUG nova.api.openstack.wsgi [req-23bdfb52-dae5-42f7-a5b7-17c319ed67ff ServerMetadataTestJSON-tempest-1354548727-user ServerMetadataTestJSON-tempest-1354548727-tenant] Returning 400 to user: The server could not comply with the request since it is either malformed or otherwise incorrect. __call__ /opt/stack/new/nova/nova/api/openstack/wsgi.py:1224

tags: added: low-hanging-fruit
Changed in nova:
importance: Undecided → Low
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
Revision history for this message
Sean Dague (sdague) wrote :

Dug into this further, this is definitely not low hanging fruit.

Direct link to this fail: http://logs.openstack.org/66/57066/1/check/check-tempest-dsvm-full/c41f3bd/logs/screen-n-api.txt.gz#_2013-12-04_13_06_16_520

tags: removed: low-hanging-fruit
Changed in nova:
importance: Low → High
Revision history for this message
Sean Dague (sdague) wrote :
Sean Dague (sdague)
summary: - wrong number of arguments error in log after successfull tempest run
+ metadata server update_all expects body but doesn't get it passed to it
Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

The stack trace is being triggered by tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_server_metadata_negative

See https://review.openstack.org/#/c/60922/ comments for the gory details.

Sean Dague (sdague)
no longer affects: tempest
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Changed in nova:
status: Confirmed → Invalid
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.