DELETE existing image fails if location attribute is None
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Medium
|
Jay Pipes |
Bug Description
Tested on revision No 100.
I was trying to add machine type image using glance-upload and for some reasons I terminated the command while uploading the image.
$./glance-upload --type=machine /home/tpatil/
$./glance index
list the registered images as:-
root@ubuntu-
Found 4 public images...
ID Name Disk Format Container Format Size
---------------- -------
1 ipv6-kernel None None 3522336
2 ipv6-ramdisk None None 8679404
3 ipv6-image None None 1049624576
4 ipv6-image-test None None 0
Note: Id 4, size of the image is 0 bytes.
Now if I try to delete the image of Id 4, it gives me following error:-
root@ubuntu-
Traceback (most recent call last):
File "./glance", line 566, in <module>
result = command(options, args)
File "./glance", line 318, in image_delete
c.delete_
File "/home/
self.
File "/home/
raise Exception("Internal Server error: %s" % res.read())
Exception: Internal Server error: 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/
delete_
File "/home/
parsed_uri = urlparse.
File "/usr/lib/
tuple = urlsplit(url, scheme, allow_fragments)
File "/usr/lib/
i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'
Related branches
- Rick Harris (community): Approve
- Tushar Patil (community): Approve
-
Diff: 69 lines (+39/-1)3 files modifiedglance/server.py (+6/-1)
tests/stubs.py (+1/-0)
tests/unit/test_api.py (+32/-0)
Changed in glance: | |
status: | In Progress → Fix Committed |
Changed in glance: | |
milestone: | cactus-2011-04-07 → 2011.2 |
status: | Fix Committed → Fix Released |
This has to do with the location attribute of the image not being set, not the size being 0. Changing bug description accordingly.