[Openstack] Unable to download images using Glance+Keystone+Swift

Lillie Ross-CDSR11 Ross.Lillie at motorolasolutions.com
Thu Apr 26 15:54:31 UTC 2012


This is probably a configuration bug or a general lack of understanding, but I can't seem to find the problem.  I've installed the latest Essex release (on instances running in Diablo) to verify my upgrade tasks.  However, I'm unable to get Glance to download images (which prevents running instances).  I'm able to upload images into the backend Swift store. I can perform image listings, etc, however when I try to download an image, I receive a 404 error, file not found.

To verify, I've run the following curl commands directly on the glance api service.  To wit:

1. First, obtain a token

curl -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}' -H "Content-type: application/json" http://essex1:35357/v2.0/tokens | python -mjson.tool

and I receive the output (edited)

      }
        ], 
        "token": {
            "expires": "2012-04-27T15:30:45Z", 
            "id": "45d01460a0e04bff967eb954e7f4fee8", 
            "tenant": {
                "description": "All administrative tasks are to be grouped underneath this tenancy.  Users are not to be associated with this tenant unless they have been granted admin roles.", 
                "enabled": true, 
                "id": "1", 
                "name": "admin"
            }
        }, 

2. Next, do a listing as follows:

root at essex1:/etc/keystone# curl -v -H 'X-Auth-Token: 45d01460a0e04bff967eb954e7f4fee8' -H 'Content-type: application/json' http://essex3:9292/v1/images | python -mjson.tool
* About to connect() to essex3 port 9292 (#0)
*   Trying 172.16.1.5...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
> GET /v1/images HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: essex3:9292
> Accept: */*
> X-Auth-Token: 45d01460a0e04bff967eb954e7f4fee8
> Content-type: application/json
> 
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Content-Length: 577
< Date: Thu, 26 Apr 2012 15:34:27 GMT
< 
{ [data not shown]
100   577  100   577    0     0   7753      0 --:--:-- --:--:-- --:--:--  8485
* Connection #0 to host essex3 left intact
* Closing connection #0
{
    "images": [
        {
            "checksum": "10047a119149e08fb206eea89832eee0", 
            "container_format": "ami", 
            "disk_format": "ami", 
            "id": "6720c572-12b7-4cc8-a8c5-95b92998671a", 
            "name": "tty-linux", 
            "size": 25165824
        }, 
        {
            "checksum": "2d222d406f3ed30e03ed44123c33cba6", 
            "container_format": "ari", 
            "disk_format": "ari", 
            "id": "9fe687a4-ccf0-4b69-86b2-a785e04a49b1", 
            "name": "tty-linux-ramdisk", 
            "size": 5882349
        }, 
        {
            "checksum": "3ed2965d3f8d877a3ee3e061fd648e9a", 
            "container_format": "aki", 
            "disk_format": "aki", 
            "id": "423b0ecc-5ca1-44d8-8e85-5a245ce620e2", 
            "name": "tty-linux-kernel", 
            "size": 4404752
        }
    ]
}

3. I can even do a HEAD on a particular image.  For example:

root at essex1:/etc/keystone# curl -v -I -H 'X-Auth-Token: 45d01460a0e04bff967eb954e7f4fee8' -H 'Content-type: application/json' http://essex3:9292/v1/images/6720c572-12b7-4cc8-a8c5-95b92998671a | python -mjson.tool
* About to connect() to essex3 port 9292 (#0)
*   Trying 172.16.1.5...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
> HEAD /v1/images/6720c572-12b7-4cc8-a8c5-95b92998671a HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: essex3:9292
> Accept: */*
> X-Auth-Token: 45d01460a0e04bff967eb954e7f4fee8
> Content-type: application/json
> 
< HTTP/1.1 200 OK
< Content-Type: text/html; charset=UTF-8
< Content-Length: 0
< X-Image-Meta-Property-Ramdisk_id: 9fe687a4-ccf0-4b69-86b2-a785e04a49b1
< X-Image-Meta-Id: 6720c572-12b7-4cc8-a8c5-95b92998671a
< X-Image-Meta-Deleted: False
< X-Image-Meta-Container_format: ami
< X-Image-Meta-Checksum: 10047a119149e08fb206eea89832eee0
< X-Image-Meta-Protected: False
< X-Image-Meta-Min_disk: 0
< X-Image-Meta-Created_at: 2012-04-24T19:39:31
< X-Image-Meta-Size: 25165824
< X-Image-Meta-Status: active
< X-Image-Meta-Is_public: True
< X-Image-Meta-Min_ram: 0
< X-Image-Meta-Property-Kernel_id: 423b0ecc-5ca1-44d8-8e85-5a245ce620e2
< X-Image-Meta-Owner: 1
< X-Image-Meta-Updated_at: 2012-04-24T19:39:33
< X-Image-Meta-Disk_format: ami
< X-Image-Meta-Name: tty-linux
< Location: http://essex3:9292/v1/images/6720c572-12b7-4cc8-a8c5-95b92998671a
< Etag: 10047a119149e08fb206eea89832eee0
< Date: Thu, 26 Apr 2012 15:37:00 GMT
< 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host essex3 left intact
* Closing connection #0

4.  However, when I try to download the same image, I receive the following error:

curl -v -H 'X-Auth-Token: 45d01460a0e04bff967eb954e7f4fee8' -H 'Content-type: application/json' http://essex3:9292/v1/images/6720c572-12b7-4cc8-a8c5-95b92998671a | python -mjson.tool
* About to connect() to essex3 port 9292 (#0)
*   Trying 172.16.1.5...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
> GET /v1/images/6720c572-12b7-4cc8-a8c5-95b92998671a HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: essex3:9292
> Accept: */*
> X-Auth-Token: 45d01460a0e04bff967eb954e7f4fee8
> Content-type: application/json
> 
< HTTP/1.1 404 Not Found
< Content-Length: 315
< Content-Type: text/html; charset=UTF-8
< Date: Thu, 26 Apr 2012 15:38:01 GMT
< 
{ [data not shown]
100   315  100   315    0     0   4291      0 --:--:-- --:--:-- --:--:--  5163
* Connection #0 to host essex3 left intact
* Closing connection #0
No JSON object could be decoded

I first noticed this when trying to instantiate and instance, and it was failing when trying to download the kernel image specified by the kernel_id property of the associated ami image.

Any clues?  My glance-api.conf file is appended at the end of this message.  Thanks for any insights that can be provided.

Regards,
Ross


--
glance-api.conf
--

[DEFAULT]
verbose = True
debug = True

default_store = swift
bind_host = 172.16.1.5

bind_port = 9292

log_file = /var/log/glance/api.log
backlog = 4096

workers = 0
admin_role = admin

use_syslog = False

registry_host = 0.0.0.0
registry_port = 9191
registry_client_protocol = http

rabbit_host = essex1
rabbit_port = 5672
rabbit_use_ssl = false
rabbit_userid = guest
rabbit_password = guest
rabbit_virtual_host = /
rabbit_notification_exchange = glance
rabbit_notification_topic = glance_notifications

# ============ Swift Store Options =============================

swift_store_auth_version = 2
swift_store_auth_address = http://essex1:5000/v2.0/
swift_store_user = service:glance
swift_store_key = glance

swift_store_container = glance

swift_store_create_container_on_put = True

swift_store_large_object_size = 5120
swift_store_large_object_chunk_size = 200

swift_enable_snet = False


delayed_delete = False
scrub_time = 43200
scrubber_datadir = /var/lib/glance/scrubber

image_cache_dir = /var/lib/glance/image-cache/

[paste_deploy]
flavor = keystone








More information about the Openstack mailing list