Image fails to upload via dashboard, works via command-line client

Bug #1099451 reported by Andreas Hasenack
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Incomplete
Undecided
Unassigned

Bug Description

When trying to upload an image via the dashboard, I get this backtrace in glance's api log:

2013-01-14 14:10:22 1035 ERROR glance.api.v1.images [-] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 437, in _upload
    image_meta['size'])
  File "/usr/lib/python2.7/dist-packages/glance/store/rbd.py", line 242, in add
    data = image_file.read(length)
AttributeError: 'CooperativeReader' object has no attribute 'read'

This looks very similar to bug #1039212, except I'm using the rbd store from what I can tell (I deployed this using a charm):

/etc/glance/glance-api.conf:default_store = rbd

I'm using glance 2012.2-0ubuntu2.3~cloud0 from UCA:

 *** 2012.2-0ubuntu2.3~cloud0 0
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ precise-updates/folsom/main amd64 Packages

This was deployed using the charm lp:~charmers/charms/precise/glance/trunk

I can upload the same image via the command line tool (note: I used the wrong --name, but the upload worked):
$ time glance image-create --name precise-server-cloudimg-amd64-disk1.img --container-format bare --file cirros-0.3.1~pre
4-x86_64-disk.img --disk-format qcow2 --is-public True
+------------------+-----------------------------------------+
| Property | Value |
+------------------+-----------------------------------------+
| checksum | c32b60592301c1cf714a93fea0a25352 |
| container_format | bare |
| created_at | 2013-01-14T15:28:34 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | 9a940793-947a-4d2b-9dc6-38f284bfe643 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | precise-server-cloudimg-amd64-disk1.img |
| owner | None |
| protected | False |
| size | 13118976 |
| status | active |
| updated_at | 2013-01-14T15:28:35 |
+------------------+-----------------------------------------+

real 0m1.237s
(...)
$ glance image-list
+--------------------------------------+-----------------------------------------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+-----------------------------------------+-------------+------------------+----------+--------+
| 5b147254-57f8-4c95-85a1-ecb499e932c1 | cirros-0.3.1~pre3-i386.img | qcow2 | bare | 12287488 | active |
| 9a940793-947a-4d2b-9dc6-38f284bfe643 | precise-server-cloudimg-amd64-disk1.img | qcow2 | bare | 13118976 | active |
+--------------------------------------+-----------------------------------------+-------------+------------------+----------+--------+

description: updated
Revision history for this message
Brian Waldon (bcwaldon) wrote :

I believe this is fixed in stable/folsom by commit 91aaa487. Can you verify this?

Changed in glance:
status: New → Incomplete
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I'm using grizzly, but it's indeed fixed in the latest grizzly packages.

Revision history for this message
Erno Kuvaja (jokke) wrote :

As this is confirmed fixed and getting pretty old, could we perhaps go and close it?

Erno Kuvaja (jokke)
tags: added: propose-close
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.