[Openstack] Glance (Kilo) BadStatusLine: ''

Roel de Rooy RdeRooy at motto.nl
Mon Nov 9 22:24:03 UTC 2015


Hi all,

Wanted to ask if perhaps some of you have encountered the same issue in the past.
I just created an Kilo Openstack environment and used Ceph as backend for Cinder/Glance.

Whenever I try to upload an image, I always receive a BadStatusLine error when trying to upload through the cli
The image itself keep stuck at 'SAVING' within the gui and when looking in Ceph, it appears that the image is created in the glance pool.

In the traceback it's visible that the Statusline it doesn't like  (as response if I see it correctly) consists of ''.
So this would mean that the response it receives is empty?

I also tried though the GUI and the same issue will appear; it remains stuck at SAVING.

The full debug of the upload command:

glance --debug --os-image-api-version 2 image-create --file /tmp/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --progress
curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}46395b6452a9c7a945bb668585dc78280c471346' http://192.168.142.202:9292/v2/schemas/image

HTTP/1.1 200 OK
date: Mon, 09 Nov 2015 22:05:24 GMT
content-length: 3899
content-type: application/json; charset=UTF-8
x-openstack-request-id: req-c37b50e0-ebdd-4127-be33-1225370044de

{"additionalProperties": {"type": "string"}, "name": "image", "links": [{"href": "{self}", "rel": "self"}, {"href": "{file}", "rel": "enclosure"}, {"href": "{schema}", "rel": "describedby"}], "properties": {"status": {"enum": ["queued", "saving", "active", "killed", "deleted", "pending_delete"], "type": "string", "description": "Status of the image (READ-ONLY)"}, "tags": {"items": {"type": "string", "maxLength": 255}, "type": "array", "description": "List of strings related to the image"}, "kernel_id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": ["null", "string"], "description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image.", "is_base": false}, "container_format": {"enum": [null, "ami", "ari", "aki", "bare", "ovf", "ova"], "type": ["null", "string"], "description": "Format of the container"}, "min_ram": {"type": "integer", "description": "Amount of ram (in MB) required to boot image."}, "ramdisk_id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": ["null", "string"], "description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.", "is_base": false}, "locations": {"items": {"required": ["url", "metadata"], "type": "object", "properties": {"url": {"type": "string", "maxLength": 255}, "metadata": {"type": "object"}}}, "type": "array", "description": "A set of URLs to access the image file kept in external store"}, "visibility": {"enum": ["public", "private"], "type": "string", "description": "Scope of image accessibility"}, "updated_at": {"type": "string", "description": "Date and time of the last image modification (READ-ONLY)"}, "owner": {"type": ["null", "string"], "description": "Owner of the image", "maxLength": 255}, "file": {"type": "string", "description": "(READ-ONLY)"}, "min_disk": {"type": "integer", "description": "Amount of disk space (in GB) required to boot image."}, "virtual_size": {"type": ["null", "integer"], "description": "Virtual size of image in bytes (READ-ONLY)"}, "id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": "string", "description": "An identifier for the image"}, "size": {"type": ["null", "integer"], "description": "Size of image file in bytes (READ-ONLY)"}, "instance_uuid": {"type": "string", "description": "ID of instance used to create this image.", "is_base": false}, "os_distro": {"type": "string", "description": "Common name of operating system distribution as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html", "is_base": false}, "name": {"type": ["null", "string"], "description": "Descriptive name for the image", "maxLength": 255}, "checksum": {"type": ["null", "string"], "description": "md5 hash of image contents. (READ-ONLY)", "maxLength": 32}, "created_at": {"type": "string", "description": "Date and time of image registration (READ-ONLY)"}, "disk_format": {"enum": [null, "ami", "ari", "aki", "vhd", "vmdk", "raw", "qcow2", "vdi", "iso", "root-tar"], "type": ["null", "string"], "description": "Format of the disk"}, "os_version": {"type": "string", "description": "Operating system version as specified by the distributor", "is_base": false}, "protected": {"type": "boolean", "description": "If true, image will not be deletable."}, "architecture": {"type": "string", "description": "Operating system architecture as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html", "is_base": false}, "direct_url": {"type": "string", "description": "URL to access the image file kept in external store (READ-ONLY)"}, "self": {"type": "string", "description": "(READ-ONLY)"}, "schema": {"type": "string", "description": "(READ-ONLY)"}}}

curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}46395b6452a9c7a945bb668585dc78280c471346' http://192.168.142.202:9292/v2/schemas/image

HTTP/1.1 200 OK
date: Mon, 09 Nov 2015 22:05:24 GMT
content-length: 3899
content-type: application/json; charset=UTF-8
x-openstack-request-id: req-8e62c5ad-5b39-47ae-b3a5-cf7bd201a48f

{"additionalProperties": {"type": "string"}, "name": "image", "links": [{"href": "{self}", "rel": "self"}, {"href": "{file}", "rel": "enclosure"}, {"href": "{schema}", "rel": "describedby"}], "properties": {"status": {"enum": ["queued", "saving", "active", "killed", "deleted", "pending_delete"], "type": "string", "description": "Status of the image (READ-ONLY)"}, "tags": {"items": {"type": "string", "maxLength": 255}, "type": "array", "description": "List of strings related to the image"}, "kernel_id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": ["null", "string"], "description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image.", "is_base": false}, "container_format": {"enum": [null, "ami", "ari", "aki", "bare", "ovf", "ova"], "type": ["null", "string"], "description": "Format of the container"}, "min_ram": {"type": "integer", "description": "Amount of ram (in MB) required to boot image."}, "ramdisk_id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": ["null", "string"], "description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.", "is_base": false}, "locations": {"items": {"required": ["url", "metadata"], "type": "object", "properties": {"url": {"type": "string", "maxLength": 255}, "metadata": {"type": "object"}}}, "type": "array", "description": "A set of URLs to access the image file kept in external store"}, "visibility": {"enum": ["public", "private"], "type": "string", "description": "Scope of image accessibility"}, "updated_at": {"type": "string", "description": "Date and time of the last image modification (READ-ONLY)"}, "owner": {"type": ["null", "string"], "description": "Owner of the image", "maxLength": 255}, "file": {"type": "string", "description": "(READ-ONLY)"}, "min_disk": {"type": "integer", "description": "Amount of disk space (in GB) required to boot image."}, "virtual_size": {"type": ["null", "integer"], "description": "Virtual size of image in bytes (READ-ONLY)"}, "id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "type": "string", "description": "An identifier for the image"}, "size": {"type": ["null", "integer"], "description": "Size of image file in bytes (READ-ONLY)"}, "instance_uuid": {"type": "string", "description": "ID of instance used to create this image.", "is_base": false}, "os_distro": {"type": "string", "description": "Common name of operating system distribution as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html", "is_base": false}, "name": {"type": ["null", "string"], "description": "Descriptive name for the image", "maxLength": 255}, "checksum": {"type": ["null", "string"], "description": "md5 hash of image contents. (READ-ONLY)", "maxLength": 32}, "created_at": {"type": "string", "description": "Date and time of image registration (READ-ONLY)"}, "disk_format": {"enum": [null, "ami", "ari", "aki", "vhd", "vmdk", "raw", "qcow2", "vdi", "iso", "root-tar"], "type": ["null", "string"], "description": "Format of the disk"}, "os_version": {"type": "string", "description": "Operating system version as specified by the distributor", "is_base": false}, "protected": {"type": "boolean", "description": "If true, image will not be deletable."}, "architecture": {"type": "string", "description": "Operating system architecture as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html", "is_base": false}, "direct_url": {"type": "string", "description": "URL to access the image file kept in external store (READ-ONLY)"}, "self": {"type": "string", "description": "(READ-ONLY)"}, "schema": {"type": "string", "description": "(READ-ONLY)"}}}

curl -i -X POST -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/json' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}46395b6452a9c7a945bb668585dc78280c471346' -d '{"container_format": "bare", "disk_format": "qcow2"}' http://192.168.142.202:9292/v2/images

HTTP/1.1 201 Created
date: Mon, 09 Nov 2015 22:05:24 GMT
content-length: 547
content-type: application/json; charset=UTF-8
location: http://192.168.142.202:9292/v2/images/d96e7fb5-d7d6-495d-9ab7-a2a48d14cc24
x-openstack-request-id: req-7a2705d7-82ac-4a73-94c5-7ab2d9cec6ea

{"status": "queued", "name": null, "tags": [], "container_format": "bare", "created_at": "2015-11-09T22:05:24Z", "size": null, "disk_format": "qcow2", "updated_at": "2015-11-09T22:05:24Z", "visibility": "private", "self": "/v2/images/d96e7fb5-d7d6-495d-9ab7-a2a48d14cc24", "min_disk": 0, "protected": false, "id": "d96e7fb5-d7d6-495d-9ab7-a2a48d14cc24", "file": "/v2/images/d96e7fb5-d7d6-495d-9ab7-a2a48d14cc24/file", "checksum": null, "owner": "5936d97757564d6182f31afb09cd125d", "virtual_size": null, "min_ram": 0, "schema": "/v2/schemas/image"}

curl -i -X PUT -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}46395b6452a9c7a945bb668585dc78280c471346' http://192.168.142.202:9292/v2/images/d96e7fb5-d7d6-495d-9ab7-a2a48d14cc24/file
[=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | None                                 |
| container_format | bare                                 |
| created_at       | 2015-11-09T22:05:24Z                 |
| disk_format      | qcow2                                |
| id               | d96e7fb5-d7d6-495d-9ab7-a2a48d14cc24 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | None                                 |
| owner            | 5936d97757564d6182f31afb09cd125d     |
| protected        | False                                |
| size             | None                                 |
| status           | queued                               |
| tags             | []                                   |
| updated_at       | 2015-11-09T22:05:24Z                 |
| virtual_size     | None                                 |
| visibility       | private                              |
+------------------+--------------------------------------+
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/glanceclient/shell.py", line 637, in main
    args.func(client, args)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 73, in do_image_create
    do_image_upload(gc, args)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 258, in do_image_upload
    gc.images.upload(args.id, image_data, args.size)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/images.py", line 138, in upload
    self.http_client.put(url, headers=hdrs, data=body)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 265, in put
    return self._request('PUT', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 206, in _request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 357, in send
    r = low_conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1051, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 415, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 379, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''
''

PS: using api version 1 will result in the same traceback at the end.


Thanks in advance!

Kind Regards,
Roel de Rooy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20151109/47248647/attachment.html>


More information about the Openstack mailing list