*** This bug is a duplicate of bug 1057322 ***
    https://bugs.launchpad.net/bugs/1057322

** This bug has been marked a duplicate of bug 1057322
   Image fails to upload to swift: TypeError: object of type 
'CooperativeReader' has no len(

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1099451

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

Status in OpenStack Image Registry and Delivery Service (Glance):
  Incomplete

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 |
  
+--------------------------------------+-----------------------------------------+-------------+------------------+----------+--------+

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1099451/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to