← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1361197] Re: Glance image-upload truncates the image.

 

@Arnaud, mind looking at this? I think you know the vmware driver better
than anyone else here :D

** Project changed: nova => glance

** Changed in: glance
     Assignee: (unassigned) => Arnaud Legendre (arnaudleg)

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

Title:
  Glance image-upload truncates the image.

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

Bug description:
  This may be a DUP of #1240355 but I am not sure.

  I have three hosts which all are connected to the same shared NFS
  datastore and glance configured to use it. I am uploading the an and
  then try to download, but download returns empty string and there is
  an ERROR in the glance/api.log:


  2014-08-25 09:11:01.438 2724 ERROR glance.api.common
  [893f9ace-0176-42b1-947f-21b8875547be cffc8c555ebe44bb97b48baabd92e606
  94a68b099a674d55986f4ce15fbb946b - - -] Backend storage for image
  46b9b487-9c49-47a4-87aa-a11d0b17b6ff disconnected after writing only 0
  bytes

  
  The reproducer:

  # echo 123456 | glance -d image-create --name foo --disk-format raw --container-format bare
  curl -i -X POST -H 'x-image-meta-container_format: bare' -H 'Transfer-Encoding: chunked' -H 'User-Agent: python-glanceclient' -H 'x-image-meta-is_public: False' -H 'X-Auth-Token: ***' -H 'Content-Type: application/octet-stream' -H 'x-image-meta-disk_format: raw' -H 'x-image-meta-name: foo' -d '<open file '<stdin>', mode 'r' at 0x7f38eea620c0>' http://172.16.40.19:9292/v1/images

  HTTP/1.1 201 Created
  content-length: 467
  etag: f447b20a7fcbf53a5d5be013ea0b15af
  location: http://172.16.40.19:9292/v1/images/46b9b487-9c49-47a4-87aa-a11d0b17b6ff
  date: Mon, 25 Aug 2014 13:10:38 GMT
  content-type: application/json
  x-openstack-request-id: req-c63d01a6-6c84-4867-8944-f9113497546c

  {"image": {"status": "active", "deleted": false, "container_format":
  "bare", "min_ram": 0, "updated_at": "2014-08-25T13:10:30", "owner":
  "94a68b099a674d55986f4ce15fbb946b", "min_disk": 0, "is_public": false,
  "deleted_at": null, "id": "46b9b487-9c49-47a4-87aa-a11d0b17b6ff",
  "size": 7, "virtual_size": null, "name": "foo", "checksum":
  "f447b20a7fcbf53a5d5be013ea0b15af", "created_at":
  "2014-08-25T13:10:20", "disk_format": "raw", "properties": {},
  "protected": false}}

  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | f447b20a7fcbf53a5d5be013ea0b15af     |
  | container_format | bare                                 |
  | created_at       | 2014-08-25T13:10:20                  |
  | deleted          | False                                |
  | deleted_at       | None                                 |
  | disk_format      | raw                                  |
  | id               | 46b9b487-9c49-47a4-87aa-a11d0b17b6ff |
  | is_public        | False                                |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | foo                                  |
  | owner            | 94a68b099a674d55986f4ce15fbb946b     |
  | protected        | False                                |
  | size             | 7                                    |
  | status           | active                               |
  | updated_at       | 2014-08-25T13:10:30                  |
  | virtual_size     | None                                 |
  +------------------+--------------------------------------+
  [root@incomplete-read ~(keystone_admin)]# glance -d image-download foo
  curl -i -X GET -H 'X-Auth-Token: ***' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://172.16.40.19:9292/v1/images/detail?limit=20&name=foo

  HTTP/1.1 200 OK
  date: Mon, 25 Aug 2014 13:10:52 GMT
  content-length: 470
  content-type: application/json; charset=UTF-8
  x-openstack-request-id: req-b8f1c595-baf4-4a15-b9ae-407e7db3899a

  {"images": [{"status": "active", "deleted_at": null, "name": "foo",
  "deleted": false, "container_format": "bare", "created_at":
  "2014-08-25T13:10:20", "disk_format": "raw", "updated_at":
  "2014-08-25T13:10:30", "min_disk": 0, "protected": false, "id":
  "46b9b487-9c49-47a4-87aa-a11d0b17b6ff", "min_ram": 0, "checksum":
  "f447b20a7fcbf53a5d5be013ea0b15af", "owner":
  "94a68b099a674d55986f4ce15fbb946b", "is_public": false,
  "virtual_size": null, "properties": {}, "size": 7}]}

  curl -i -X GET -H 'X-Auth-Token: ***' -H 'Content-Type: application/octet-stream' -H 'User-Agent: python-glanceclient' http://172.16.40.19:9292/v1/images/46b9b487-9c49-47a4-87aa-a11d0b17b6ff
  ''

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


References