client.update_image is broken

Bug #728861 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Vish Ishaya

Bug Description

Ran into a bug with update_image when working on nova code. It seems that update_image is using some old untested code.

Related branches

Changed in glance:
assignee: nobody → Vish Ishaya (vishvananda)
status: New → In Progress
Revision history for this message
Vish Ishaya (vishvananda) wrote :
Download full text (3.4 KiB)

Traceback from glance-combined:

Traceback (most recent call last): [152/1937]
  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/vagrant/glance/trunk/glance/common/wsgi.py", line 215, in __call__
    result = method(**arg_dict)
  File "/home/vagrant/glance/trunk/glance/registry/server.py", line 148, in update
    updated_image = db_api.image_update(context, id, image_data)
  File "/home/vagrant/glance/trunk/glance/registry/db/api.py", line 103, in image_update
    return _image_update(context, values, image_id)
  File "/home/vagrant/glance/trunk/glance/registry/db/api.py", line 180, in _image_update
    validate_image(values)
  File "/home/vagrant/glance/trunk/glance/registry/db/api.py", line 155, in validate_image
    image_type = values.get('type', None)
AttributeError: 'unicode' object has no attribute 'get'

127.0.0.1 - - [04/Mar/2011 18:28:39] "PUT /images/1 HTTP/1.1" 500 1640 0.000645
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/vagrant/glance/trunk/glance/common/wsgi.py", line 215, in __call__
    result = method(**arg_dict)
  File "/home/vagrant/glance/trunk/glance/server.py", line 392, in update
    new_image_meta)
  File "/home/vagrant/glance/trunk/glance/registry/__init__.py", line 53, in update_image_metadata
    return c.update_image(image_id, image_data)
  File "/home/vagrant/glance/trunk/glance/registry/client.py", line 99, in update_image
    res = self.do_request("PUT", "/images/%s" % image_id, body)
  File "/home/vagrant/glance/trunk/glance/client.py", line 158, in do_request
    raise Exception("Unknown error occurred! %s" % res.__dict__)
Exception: U...

Read more...

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hmm, what version of Glance is this? Is this Bexar code?

Revision history for this message
Jay Pipes (jaypipes) wrote :

The reason I ask is that glance-combined is to be removed (since glance-control all start now starts all the servers..)

Revision history for this message
Jay Pipes (jaypipes) wrote :

Vishy, I believe this bug has already been fixed in the branches that are currently under code review. I'm going to push to get these branches into trunk and then ask you to re-test to see if the issue has gone away. Thanks for your patience.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Vishy, could you verify this bug is still valid? Thanks!

Changed in glance:
status: In Progress → Incomplete
Revision history for this message
Vish Ishaya (vishvananda) wrote :

This has been working for me since the related branch merged, I think it should be Fix Committed

Changed in glance:
status: Incomplete → Fix Committed
Revision history for this message
Jay Pipes (jaypipes) wrote :

cheers, Vish. thx for checking.

Thierry Carrez (ttx)
Changed in glance:
milestone: none → 2011.2
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.