Size of created image is 0 - no image data is sent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm trying to install OpenStack Newton from sources and I'm not able to successfully upload/create Cirros image:
openstack image create --container-format bare --disk-format qcow2 --file /app/cirros.img --public cirros
Everyting looks OK, except the fact that size of image is 0
+------
| Field | Value |
+------
| checksum | d41d8cd98f00b20
| container_format | bare |
| created_at | 2017-02-
| disk_format | qcow2 |
| file | /v2/images/
| id | 0419ce1b-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros3 |
| owner | 457615afdf68479
| protected | False |
| schema | /v2/schemas/image |
| size | 0 |
| status | active |
| tags | |
| updated_at | 2017-02-
| virtual_size | None |
| visibility | public |
+------
When I look into glance filesystem, the file size is 0:
ls -la 0419ce1b-
-rw-r----- 1 root root 0 Feb 21 08:59 0419ce1b-
Version of pakcages:
python-glanceclient (2.6.0)
requests (2.13.0)
I found out that chunking doesn't work for some reason. I fixed the problem by patching /usr/local/ lib/python2. 7/dist- packages/ glanceclient/ common/ http.py
--- a/usr/local/ lib/python2. 7/dist- packages/ glanceclient/ common/ http.py lib/python2. 7/dist- packages/ glanceclient/ common/ http_new. py (object) : body(data)
+++ b/usr/local/
@@ -84,7 +84,7 @@ class _BaseHTTPClient
# Here we assume it's
# a file-like object
# and we'll chunk it
- data = self._chunk_
+ pass