Ask Your Question
0

openstack version 2.3.0: swift and glance

asked 2016-10-07 07:39:50 -0500

Matt303 gravatar image

Hi openstack community!

I intend to use swift as a backend for instances and there images in a test environment for openstack with Debian Jessie 8 but I failed with using swift for images of virtual machines. I assume I need to reconsider keystone but I am not sure and I don't know how. I tried to avoid to add many configuration files but if you need one, please let me know.

For configuring swift I used this manual: http://docs.openstack.org/project-ins...

I was able to verfiy that swift is working, after I used the ubuntu section (http://docs.openstack.org/project-ins...) instead of the debian section (http://docs.openstack.org/project-ins...).

Then I tried to find documentation for using swift as backend for virtual machines but I failed with this documentation: http://www.unixarena.com/2015/10/open...

I tried this to get the image into swift:

 openstack image create "cirros4swift"   --file cirros-0.3.4-x86_64-disk.img   --disk-format qcow2 --container-format bare   --public

And I get the message:

500 Internal Server Error The server has either erred or is incapable of performing the requested operation. (HTTP 500)

This is a part of glance-api.log while I tried to upload image to swift:

2016-10-07 13:42:01.785 29097 ERROR glance.api.v2.image_data   File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 617, in get_auth
2016-10-07 13:42:01.785 29097 ERROR glance.api.v2.image_data     auth_version=auth_version)
2016-10-07 13:42:01.785 29097 ERROR glance.api.v2.image_data   File "/usr/lib/python2.7/dist-packages/swiftclient/client.py", line 543, in get_auth_keystone
2016-10-07 13:42:01.785 29097 ERROR glance.api.v2.image_data     raise ClientException('Authorization Failure. %s' % err)
2016-10-07 13:42:01.785 29097 ERROR glance.api.v2.image_data ClientException: Authorization Failure. Authorization Failed: The resource could not be found. (HTTP 404) (Request-ID: req-cdfbf316-8934-42ee-8429-5ef1ce112f74) (HTTP 404)
2016-10-07 13:42:01.785 29097 ERROR glance.api.v2.image_data 
2016-10-07 13:42:01.869 29097 ERROR glance.common.wsgi [req-86dfcf42-ad48-4e55-b5d2-72489783892c 4bcf960e75944ce6bd1dded437021a8e ca77a1956ef2426195fb3eb73785229e - - -] Caught error: Authorization Failure. Authorization Failed: The resource could not be found. (HTTP 404) (Request-ID: req-cdfbf316-8934-42ee-8429-5ef1ce112f74) (HTTP 404)

The message "The resource could not be found" I tried to understand but I was not able to find out what's the missing resource.

The glance-api.conf on the controller node for swift, where I tried additional configuration lines which contains swift, like swift_store_endpoint for example:

[DEFAULT]
default_store = swift
[cors]
[cors.subdomain]
[database]
connection = mysql+pymysql://glance:reinda@controller/glance
[glance_store]
stores = swift,file,http
default_store = swift
swift_store_auth_address = http://controller:35357/v3
swift_store_user = service:swift
swift_store_key = PASS
swift_store_create_container_on_put = True
swift_store_region = RegionOne
swift_store_endpoint = http://controller:8080/v1
swift_store_container = container1

[image_format]
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = pass

[matchmaker_redis]
[oslo_concurrency]
lock_path = /var/lock/glance

[oslo_messaging_amqp]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
rabbit_host = localhost
rabbit_userid = guest
rabbit_password =

[oslo_policy]
[paste_deploy]
flavor = keystone

[profiler]
[store_type_location_strategy]
[task]
[taskflow_executor]

The message "The resource could not be found" let me conclude that ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-10-07 09:36:23 -0500

Your error message:

Caught error: Authorization Failure. Authorization Failed: The resource could not be found.

...is Glance telling Swift that it can't authorise its request, and is returning the 'could not be found' as saying anything else could reveal potentially insecure information about Glance.

Can both Swift and Glance reach your auth instance as per your configuration files - are there any errors in the Keystone logs?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-10-07 07:39:50 -0500

Seen: 237 times

Last updated: Oct 07 '16