client.update_image is broken
Bug #728861 reported by
Vish Ishaya
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
lp:~vishvananda/glance/fix-update
- Jay Pipes (community): Approve
- Devin Carlen (community): Approve
-
Diff: 130 lines (+62/-11)4 files modifiedglance/client.py (+11/-7)
glance/utils.py (+8/-3)
tests/unit/test_api.py (+1/-1)
tests/unit/test_misc.py (+42/-0)
Changed in glance: | |
assignee: | nobody → Vish Ishaya (vishvananda) |
status: | New → In Progress |
Changed in glance: | |
milestone: | none → 2011.2 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Traceback from glance-combined:
Traceback (most recent call last): [152/1937] pymodules/ python2. 6/eventlet/ wsgi.py" , line 336, in handle_one_response n(self. environ, start_response) pymodules/ python2. 6/webob/ dec.py" , line 159, in __call__ pymodules/ python2. 6/routes/ middleware. py", line 131, in __call__ pymodules/ python2. 6/webob/ dec.py" , line 159, in __call__ pymodules/ python2. 6/webob/ dec.py" , line 147, in __call__ pymodules/ python2. 6/webob/ dec.py" , line 208, in call_func vagrant/ glance/ trunk/glance/ common/ wsgi.py" , line 215, in __call__ vagrant/ glance/ trunk/glance/ registry/ server. py", line 148, in update image_update( context, id, image_data) vagrant/ glance/ trunk/glance/ registry/ db/api. py", line 103, in image_update update( context, values, image_id) vagrant/ glance/ trunk/glance/ registry/ db/api. py", line 180, in _image_update image(values) vagrant/ glance/ trunk/glance/ registry/ db/api. py", line 155, in validate_image
File "/usr/lib/
result = self.applicatio
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
response = self.app(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/
return self.func(req, *args, **kwargs)
File "/home/
result = method(**arg_dict)
File "/home/
updated_image = db_api.
File "/home/
return _image_
File "/home/
validate_
File "/home/
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 pymodules/ python2. 6/eventlet/ wsgi.py" , line 336, in handle_one_response n(self. environ, start_response) pymodules/ python2. 6/webob/ dec.py" , line 159, in __call__ pymodules/ python2. 6/routes/ middleware. py", line 131, in __call__ pymodules/ python2. 6/webob/ dec.py" , line 159, in __call__ pymodules/ python2. 6/webob/ dec.py" , line 147, in __call__ pymodules/ python2. 6/webob/ dec.py" , line 208, in call_func vagrant/ glance/ trunk/glance/ common/ wsgi.py" , line 215, in __call__ vagrant/ glance/ trunk/glance/ server. py", line 392, in update vagrant/ glance/ trunk/glance/ registry/ __init_ _.py", line 53, in update_ image_metadata image(image_ id, image_data) vagrant/ glance/ trunk/glance/ registry/ client. py", line 99, in update_image request( "PUT", "/images/%s" % image_id, body) vagrant/ glance/ trunk/glance/ client. py", line 158, in do_request
Traceback (most recent call last):
File "/usr/lib/
result = self.applicatio
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
response = self.app(environ, start_response)
File "/usr/lib/
return resp(environ, start_response)
File "/usr/lib/
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/
return self.func(req, *args, **kwargs)
File "/home/
result = method(**arg_dict)
File "/home/
new_image_meta)
File "/home/
return c.update_
File "/home/
res = self.do_
File "/home/
raise Exception("Unknown error occurred! %s" % res.__dict__)
Exception: U...