update non-existing item with return_values "ALL_OLD" fails with 500

Bug #1416094 reported by Andrii Ostapenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Fix Released
Medium
Andrii Ostapenko

Bug Description

If you update non existing item with return_values "ALL_OLD" you will get 500 error

Server side:
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/common/wsgi.py", line 244, in __call__
    action_result = self.execute_action(action, request, **action_args)
  File "/opt/stack/magnetodb/magnetodb/common/wsgi.py", line 258, in execute_action
    return self.dispatch(self.controller, action, request, **action_args)
  File "/opt/stack/magnetodb/magnetodb/common/wsgi.py", line 267, in dispatch
    return method(*args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/api/__init__.py", line 35, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/common/probe.py", line 94, in wrapper
    return f(*args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/api/openstack/v1/data/update_item.py", line 94, in process_request
    parser.Parser.format_item_attributes(old_item)
  File "/opt/stack/magnetodb/magnetodb/api/openstack/v1/parser.py", line 419, in format_item_attributes
    for (attr_name, attr_value) in item_attributes.iteritems():
AttributeError: 'NoneType' object has no attribute 'iteritems

Changed in magnetodb:
assignee: nobody → Andrei V. Ostapenko (aostapenko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnetodb (master)

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

Changed in magnetodb:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnetodb (master)

Reviewed: https://review.openstack.org/151377
Committed: https://git.openstack.org/cgit/stackforge/magnetodb/commit/?id=fba1e29bca67cc4fe913191e6843a30a4d0bd1a1
Submitter: Jenkins
Branch: master

commit fba1e29bca67cc4fe913191e6843a30a4d0bd1a1
Author: Andrei V. Ostapenko <email address hidden>
Date: Thu Jan 29 22:42:11 2015 +0200

    Fixes bug with update nonexistent item with return values "ALL_OLD"

    Closes-bug: #1416094
    Change-Id: Ic804833e2e7d79803ea9036f1a2b28cbfbc36a71

Changed in magnetodb:
status: In Progress → Fix Committed
Changed in magnetodb:
milestone: none → kilo-2
importance: Undecided → Medium
Changed in magnetodb:
status: Fix Committed → Fix Released
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.