glance add failed
help:
keystone+glance, glance add failed, who can help me?
linux-rskn:
glance_endpoint = http://
action=
headers=
Failed to add image. Got error:
image
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
linux-rskn:
params={'marker': None, 'sort_key': None, 'limit': 10, 'sort_dir': None}
glance_endpoint = http://
action=
headers=
res=<httplib.
Traceback (most recent call last):
File "/usr/bin/glance", line 1207, in <module>
result = command(options, args)
File "/usr/bin/glance", line 60, in wrapper
ret = func(*args, **kwargs)
File "/usr/bin/glance", line 498, in images_index
print_
File "/usr/bin/glance", line 444, in _images_index
images = client.
File "/usr/lib64/
data = json.loads(
KeyError: 'images'
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Glance Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- chnzzw
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Would you mind paste-binning your glance-api log contents. Please remove any security credentials from the paste!
Thanks!
-jay
Revision history for this message
|
#2 |
1.OK,the glance-api log and glance --debug index result as follow.
2.I fix the bugs of the glance but still have the error.
3.please help me solve the error,thanks all.
2011-11-23 12:24:03 DEBUG [glance-api] *******
2011-11-23 12:24:03 DEBUG [glance-api] Configuration options gathered from config file:
2011-11-23 12:24:03 DEBUG [glance-api] /etc/glance/
2011-11-23 12:24:03 DEBUG [glance-api] =======
2011-11-23 12:24:03 DEBUG [glance-api] bind_host 0.0.0.0
2011-11-23 12:24:03 DEBUG [glance-api] bind_port 9292
2011-11-23 12:24:03 DEBUG [glance-api] debug True
2011-11-23 12:24:03 DEBUG [glance-api] default_store file
2011-11-23 12:24:03 DEBUG [glance-api] delayed_delete False
2011-11-23 12:24:03 DEBUG [glance-api] filesystem_
2011-11-23 12:24:03 DEBUG [glance-api] image_cache_datadir /var/lib/
2011-11-23 12:24:03 DEBUG [glance-api] image_cache_enabled False
2011-11-23 12:24:03 DEBUG [glance-api] image_cache_
2011-11-23 12:24:03 DEBUG [glance-api] log_file /var/log/
2011-11-23 12:24:03 DEBUG [glance-api] notifier_strategy noop
2011-11-23 12:24:03 DEBUG [glance-api] rabbit_host localhost
2011-11-23 12:24:03 DEBUG [glance-api] rabbit_
2011-11-23 12:24:03 DEBUG [glance-api] rabbit_password guest
2011-11-23 12:24:03 DEBUG [glance-api] rabbit_port 5672
2011-11-23 12:24:03 DEBUG [glance-api] rabbit_use_ssl false
2011-11-23 12:24:03 DEBUG [glance-api] rabbit_userid guest
2011-11-23 12:24:03 DEBUG [glance-api] rabbit_virtual_host /
2011-11-23 12:24:03 DEBUG [glance-api] registry_host 0.0.0.0
2011-11-23 12:24:03 DEBUG [glance-api] registry_port 9191
2011-11-23 12:24:03 DEBUG [glance-api] s3_store_access_key <20-char AWS access key>
2011-11-23 12:24:03 DEBUG [glance-api] s3_store_bucket <lowercased 20-char aws access key>glance
2011-11-23 12:24:03 DEBUG [glance-api] s3_store_
2011-11-23 12:24:03 DEBUG [glance-api] s3_store_host 127.0.0.
2011-11-23 12:24:03 DEBUG [glance-api] s3_store_secret_key <40-char AWS secret key>
2011-11-23 12:24:03 DEBUG [glance-api] swift_enable_snet False
2011-11-23 12:24:03 DEBUG [glance-api] swift_store_
2011-11-23 12:24:03 DEBUG [glance-api] swift_store_
2011-11-23 12:24:03 DEBUG [glance-api] swift_store_
2011-11-23 12:24:03 DEBUG [glance-api] swift_store_key a86850deb2742ec
2011-11-23 12:24:03 DEBUG [glance-api] swift_store_
2011-11-23 12:24:03 DEBUG [glance-api] swift_store_
2011-11-23 12:24:03 DEBUG [glance-api] swift_store_user jdoe
2011-11-23 12:24:03 DEBUG [glance-api] use_syslog False
2011-11-23 12:24:03 DEBUG [glance-api] verbose True
2011-11-23 12:24:03 DEBUG [glance-api] *******
2011-11-23 12:24:03 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2011-11-23 12:24:03 DEBUG [eventlet.
2011-11-23 12:24:26 DEBUG [glance.
2011-11-23 12:24:26 DEBUG [glance.
2011-11-23 12:24:27 DEBUG [eventlet.
linux-rskn:
Traceback (most recent call last):
File "/usr/bin/glance", line 1207, in <module>
result = command(options, args)
File "/usr/bin/glance", line 60, in wrapper
ret = func(*args, **kwargs)
File "/usr/bin/glance", line 498, in images_index
print_
File "/usr/bin/glance", line 444, in _images_index
images = client.
File "/usr/lib64/
res = self.do_
File "/usr/lib64/
method, action, body=body, headers=headers, params=params)
File "/usr/lib64/
raise exception.
glance.
The body of response returned:
{"versions": [{"status": "CURRENT", "id": "v1.1", "links": [{"href": "http://
Revision history for this message
|
#3 |
Hi! You need to update your glance client Python library I believe... which version do you have installed?
Revision history for this message
|
#4 |
1. glance version: glance-
2.keystone: keystone-
I use the diablo version of the openstack including the nova,glance and the keystone.
.
I think that the glance is the newest version. what is the reason?
please give the way to solve the error.
Thanks.
Revision history for this message
|
#5 |
The URI that your client is attempting to hit is this:
/v1.1/2/images
That is not a valid Glance images URL. That looks like a Compute API URL (it includes the tenant "2" after a /v1.1/ version identifier.
I have a suspicion that your application pipeline is not set correctly. Could you please pastebin your glance-api.conf and glance-
Thanks!
-jay
Revision history for this message
|
#6 |
1. I use the keystone, so I modify the glance-api.conf and glance-
glance-api.conf :
[DEFAULT]
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = True
# Which backend store should Glance use by default is not specified
# in a request to add a new image to Glance? Default: 'file'
# Available choices are 'file', 'swift', and 's3'
default_store = file
# Address to bind the API server
bind_host = 0.0.0.0
# Port the bind the API server to
bind_port = 9292
# Address to find the registry server
registry_host = 0.0.0.0
# Port the registry server is listening on
registry_port = 9191
# Log to this file. Make sure you do not set the same log
# file for both the API and registry servers!
log_file = /var/log/
# Send logs to syslog (/dev/log) instead of to file specified by `log_file`
use_syslog = False
# ============ Notification System Options =======
# Notifications can be sent when images are create, updated or deleted.
# There are three methods of sending notifications, logging (via the
# log_file directive), rabbit (via a rabbitmq queue) or noop (no
# notifications sent, the default)
notifier_strategy = noop
# Configuration options if sending notifications via rabbitmq (these are
# the defaults)
rabbit_host = localhost
rabbit_port = 5672
rabbit_use_ssl = false
rabbit_userid = guest
rabbit_password = guest
rabbit_virtual_host = /
rabbit_
# ============ Filesystem Store Options =======
# Directory that the Filesystem backend store
# writes image data to
filesystem_
# ============ Swift Store Options =======
# Address where the Swift authentication service lives
swift_store_
# User to authenticate against the Swift authentication service
swift_store_user = jdoe
# Auth key for the user authenticating against the
# Swift authentication service
swift_store_key = a86850deb2742ec
# Container within the account that the account should use
# for storing images in Swift
swift_store_
# Do we create the container if it does not exist?
swift_store_
# What size, in MB, should Glance start chunking image files
# and do a large object manifest in Swift? By default, this is
# the maximum object size in Swift, which is 5GB
swift_store_
# When doing a large object manifest, what size, in MB, should
# Glance write chunks to Swift? This amount of data is written
# to a temporary disk buffer during the process of chunking
# the image file, and the default is 200MB
swift_store_
# Whether to use ServiceNET to communicate with the Swift storage servers.
# (If you aren't RACKSPACE, leave this False!)
#
# To use ServiceNET for authentication, prefix hostname of
# `swift_
# Ex. https:/
swift_enable_snet = False
# ============ S3 Store Options =======
# Address where the S3 authentication service lives
s3_store_host = 127.0.0.
# User to authenticate against the S3 authentication service
s3_store_access_key = <20-char AWS access key>
# Auth key for the user authenticating against the
# S3 authentication service
s3_store_secret_key = <40-char AWS secret key>
# Container within the account that the account should use
# for storing images in S3. Note that S3 has a flat namespace,
# so you need a unique bucket name for your glance images. An
# easy way to do this is append your AWS access key to "glance".
# S3 buckets in AWS *must* be lowercased, so remember to lowercase
# your AWS access key if you use it in your bucket name below!
s3_store_bucket = <lowercased 20-char aws access key>glance
# Do we create the bucket if it does not exist?
s3_store_
# ============ Image Cache Options =======
image_cache_enabled = False
# Directory that the Image Cache writes data to
# Make sure this is also set in glance-pruner.conf
image_cache_datadir = /var/lib/
# Number of seconds after which we should consider an incomplete image to be
# stalled and eligible for reaping
image_cache_
# ============ Delayed Delete Options =======
# Turn on/off delayed delete
delayed_delete = False
[pipeline:
pipeline = versionnegotiation authtoken auth-context apiv1app
# NOTE: use the following pipeline for keystone
# pipeline = versionnegotiation authtoken auth-context apiv1app
# To enable Image Cache Management API replace pipeline with below:
# pipeline = versionnegotiation context imagecache apiv1app
# NOTE: use the following pipeline for keystone auth (with caching)
# pipeline = versionnegotiation authtoken auth-context imagecache apiv1app
[pipeline:versions]
pipeline = versionsapp
[app:versionsapp]
paste.app_factory = glance.
[app:apiv1app]
paste.app_factory = glance.
[filter:
paste.filter_
[filter:imagecache]
paste.filter_
[filter:context]
paste.filter_
[filter:authtoken]
paste.filter_
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://
admin_token = 999888777666
[filter:
paste.filter_
glance-
[DEFAULT]
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = False
# Address to bind the registry server
bind_host = 0.0.0.0
# Port the bind the registry server to
bind_port = 9191
# Log to this file. Make sure you do not set the same log
# file for both the API and registry servers!
log_file = /var/log/
# Send logs to syslog (/dev/log) instead of to file specified by `log_file`
use_syslog = False
# SQLAlchemy connection string for the reference implementation
# registry server. Any valid SQLAlchemy connection string is fine.
# See: http://
sql_connection = sqlite:
# Period in seconds after which SQLAlchemy should reestablish its connection
# to the database.
#
# MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
# idle connections. This can result in 'MySQL Gone Away' exceptions. If you
# notice this, you can lower this value to ensure that SQLAlchemy reconnects
# before MySQL can drop the connection.
sql_idle_timeout = 3600
# Limit the api to return `param_limit_max` items in a call to a container. If
# a larger `limit` query param is provided, it will be reduced to this value.
api_limit_max = 1000
# If a `limit` query param is not provided in an api request, it will
# default to `limit_
limit_param_default = 25
[pipeline:
pipeline = authtoken auth-context registryapp
# NOTE: use the following pipeline for keystone
# pipeline = authtoken auth-context registryapp
[app:registryapp]
paste.app_factory = glance.
[filter:context]
context_class = glance.
paste.filter_
[filter:authtoken]
paste.filter_
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://
admin_token = 999888777666
[filter:
context_class = glance.
paste.filter_
2.when I don't use the keystone, I can glance add successed. the glane-api.conf and glance-
in the glane-api.conf :
modify :
[pipeline:
pipeline = versionnegotiation authtoken auth-context apiv1app
to:
[pipeline:
pipeline = versionnegotiation context apiv1app
in the glance-
modify :
[pipeline:
pipeline = authtoken auth-context registryapp
to:
[pipeline:
pipeline = context registryapp
now I glance add success not using the keystone with the glance-api.conf and glance-
I can browse and lanch the instance using the keystone with the glance-api.conf and glance-
env |grep OS:
OS_AUTH_USER=admin
OS_AUTH_
OS_AUTH_URL=http://
OS_AUTH_TENANT=demo
OS_AUTH_
please help me find the error,thanks.
Revision history for this message
|
#7 |
linux-iop5:~ # keystone-manage user list
id enabled tenant
-------
1 1 None
2 1 None
linux-iop5:~ # keystone-manage role list
id name
-------
1 Admin
2 Member
3 KeystoneAdmin
4 KeystoneService
linux-iop5:~ # keystone-manage tenant list
id name enabled
-------
1 admin 1
2 demo 1
linux-iop5:~ # keystone-manage service list
id name type
-------
1 nova compute
2 glance image
3 keystone identity
linux-iop5:~ # keystone-manage endpointTemplates list
All EndpointTemplates
service region Public URL
-------
nova RegionOne http://
glance RegionOne http://
keystone RegionOne http://
linux-iop5:~ #
Revision history for this message
|
#8 |
sqlite> select * from endpoint_templates;
1|RegionOne|1|http://
2|RegionOne|2|http://
3|RegionOne|3|http://
Revision history for this message
|
#9 |
sqlite> .table
credentials roles token
endpoint_templates services user_roles
endpoints tenants users
sqlite> select * from credentials;
1|1|1|EC2|
2|2|2|EC2|
sqlite> select * from roles;
1|Admin||
2|Member||
3|KeystoneAdmin||
4|KeystoneServi
sqlite> select * from token;
999888777666|
8b623dc5-
7758bee8-
sqlite> select * from endpoint_templates;
1|RegionOne|1|http://
2|RegionOne|2|http://
3|RegionOne|3|http://
sqlite> select * from services;
1|nova|compute|Nova Compute Service
2|glance|
3|keystone|
sqlite> select * from user_roles;
1|1|1|1
2|2|2|2
3|1|1|2
4|1|1|
5|1|3|
6|1|4|
sqlite> select * from endpoints;
sqlite> select * from tenants;
1|admin||1
2|demo||1
sqlite> select * from users;
1|admin|
2|demo|
sqlite>
Revision history for this message
|
#10 |
I suspect your problem is the %tenant_id% in your glance endpoint template. Try updating the template to remove that. (It should be there for nova, but not for glance.)
Revision history for this message
|
#11 |
I delete the date from the table endpoint_templates.
excute this command:
keystone-manage $* endpointTemplates add RegionOne glance http://
But can resolve the problem.
please tell me how to update or removed. which files or tables must be updated or removed.
thanks a lot.
Revision history for this message
|
#12 |
Again, the problem is likely that you have "%tenant_id%" in the URLs you're adding to the endpointTemplate for glance. You should omit "%tenant_id%" from the URLs when adding the endpointTemplate for glance.
Revision history for this message
|
#13 |
I find the problem:
Add -A $TOKEN to the glance add command, excute success.
glance -A $TOKEN add name=haha is_public=true < /opt/natty-
Revision history for this message
|
#14 |
I'm also having the same problem mentioned above:
$ glance add -A $TOKEN name="image test" is_public=true < ~/image_test.iso --host=
Failed to add image. Got error:
The request returned a 302 Multiple Choices. This generally means that you have not included a version indicator in a request URI.
I've tried both removing %tenant_id% from the endpointTemplates for glance and passing the token...still no luck.
Revision history for this message
|
#15 |
Hi! You need to have --host=
Revision history for this message
|
#16 |
Oh doi...yay late nights going into the morning. :)
Thanks for your reply Jay! Well unfortunately the problem is still present.
thingee@nibbler:~$ /opt/stack/
Failed to add image. Got error:
The request returned a 302 Multiple Choices. This generally means that you have not included a version indicator in a request URI.
The body of response returned:
{"versions": [{"status": "CURRENT", "id": "v1.1", "links": [{"href": "http://
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
thingee@nibbler:~$ env | grep OS_AUTH
OS_AUTH_USER=demo
OS_AUTH_
OS_AUTH_URL=http://
OS_AUTH_TENANT=demo
OS_AUTH_KEY=secrete
Revision history for this message
|
#17 |
Heya, what versions of the Glance client package are you using?
Revision history for this message
|
#18 |
I've deployed with devstack so it appears to just being pull from master:
2012.1-dev
Revision history for this message
|
#19 |
Very odd... I'm a little stumped on this one. Usually this happens when there is an old Glance client lib installed. Let me do some investigating and I will get back to you.
Revision history for this message
|
#20 |
Hi, is this resolved? I got same error.
I'm running keystone and glance servers on different nodes. Also I'm using 2012.1-dev version.
On keystone server, OS_AUTH_* is set.
On glance server, OS_AUTH_* is not set. Only glance-
"glance index/add" on glance server
or "euca-run-
They don't have any problems. All images are open to all.
But, I want to add member to each glance image so that image can be managed by specific member.
To do this, I run same openrc (OS_AUTH_*) with keystone server on glance server.
Then "glance index/add" provide the following error.
-------
Failed to show index. Got error:
The request returned a 302 Multiple Choices. This generally means that you have not included a version indicator in a request URI.
The body of response returned:
{"versions": [{"status": "CURRENT", "id": "v1.1", "links": [{"href": "http://
-------
Revision history for this message
|
#21 |
Please paste the output of the glance-api log file. I need to see the request that has been sent to the API server.
Thanks!
-jay
Revision history for this message
|
#22 |
Hello Jay,
This is my glance-api log file. Thanks.
2011-12-13 18:25:57 DEBUG [glance-api] *******
2011-12-13 18:25:57 DEBUG [glance-api] Configuration options gathered from config file:
2011-12-13 18:25:57 DEBUG [glance-api] /etc/glance/
2011-12-13 18:25:57 DEBUG [glance-api] =======
2011-12-13 18:25:57 DEBUG [glance-api] backlog 4096
2011-12-13 18:25:57 DEBUG [glance-api] bind_host 0.0.0.0
2011-12-13 18:25:57 DEBUG [glance-api] bind_port 9292
2011-12-13 18:25:57 DEBUG [glance-api] debug True
2011-12-13 18:25:57 DEBUG [glance-api] default_store file
2011-12-13 18:25:57 DEBUG [glance-api] delayed_delete False
2011-12-13 18:25:57 DEBUG [glance-api] filesystem_
2011-12-13 18:25:57 DEBUG [glance-api] image_cache_dir /var/lib/
2011-12-13 18:25:57 DEBUG [glance-api] log_file /var/log/
2011-12-13 18:25:57 DEBUG [glance-api] notifier_strategy noop
2011-12-13 18:25:57 DEBUG [glance-api] rabbit_host localhost
2011-12-13 18:25:57 DEBUG [glance-api] rabbit_
2011-12-13 18:25:57 DEBUG [glance-api] rabbit_password guest
2011-12-13 18:25:57 DEBUG [glance-api] rabbit_port 5672
2011-12-13 18:25:57 DEBUG [glance-api] rabbit_use_ssl false
2011-12-13 18:25:57 DEBUG [glance-api] rabbit_userid guest
2011-12-13 18:25:57 DEBUG [glance-api] rabbit_virtual_host /
2011-12-13 18:25:57 DEBUG [glance-api] rbd_store_ceph_conf /etc/ceph/ceph.conf
2011-12-13 18:25:57 DEBUG [glance-api] rbd_store_
2011-12-13 18:25:57 DEBUG [glance-api] rbd_store_pool images
2011-12-13 18:25:57 DEBUG [glance-api] rbd_store_user glance
2011-12-13 18:25:57 DEBUG [glance-api] registry_
2011-12-13 18:25:57 DEBUG [glance-api] registry_host 0.0.0.0
2011-12-13 18:25:57 DEBUG [glance-api] registry_port 9191
2011-12-13 18:25:57 DEBUG [glance-api] s3_store_access_key <20-char AWS access key>
2011-12-13 18:25:57 DEBUG [glance-api] s3_store_bucket <lowercased 20-char aws access key>glance
2011-12-13 18:25:57 DEBUG [glance-api] s3_store_
2011-12-13 18:25:57 DEBUG [glance-api] s3_store_host 127.0.0.
2011-12-13 18:25:57 DEBUG [glance-api] s3_store_secret_key <40-char AWS secret key>
2011-12-13 18:25:57 DEBUG [glance-api] scrub_time 43200
2011-12-13 18:25:57 DEBUG [glance-api] scrubber_datadir /var/lib/
2011-12-13 18:25:57 DEBUG [glance-api] swift_enable_snet False
2011-12-13 18:25:57 DEBUG [glance-api] swift_store_
2011-12-13 18:25:57 DEBUG [glance-api] swift_store_
2011-12-13 18:25:57 DEBUG [glance-api] swift_store_
2011-12-13 18:25:57 DEBUG [glance-api] swift_store_key a86850deb2742ec
2011-12-13 18:25:57 DEBUG [glance-api] swift_store_
2011-12-13 18:25:57 DEBUG [glance-api] swift_store_
2011-12-13 18:25:57 DEBUG [glance-api] swift_store_user jdoe
2011-12-13 18:25:57 DEBUG [glance-api] use_syslog False
2011-12-13 18:25:57 DEBUG [glance-api] verbose True
2011-12-13 18:25:57 DEBUG [glance-api] *******
2011-12-13 18:25:57 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True
2011-12-13 18:25:57 DEBUG [eventlet.
2011-12-13 18:26:11 DEBUG [glance.
2011-12-13 18:26:11 DEBUG [glance.
2011-12-13 18:26:11 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:26:11 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:26:11 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:26:11 DEBUG [eventlet.
2011-12-13 18:26:13 DEBUG [glance.
2011-12-13 18:26:13 DEBUG [glance.
2011-12-13 18:26:13 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:26:13 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:26:13 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:26:13 DEBUG [eventlet.
2011-12-13 18:26:13 DEBUG [glance.
2011-12-13 18:26:13 DEBUG [glance.
2011-12-13 18:26:13 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:26:13 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:26:13 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:26:13 DEBUG [eventlet.
2011-12-13 18:28:32 DEBUG [glance.
2011-12-13 18:28:32 DEBUG [glance.
2011-12-13 18:28:32 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:28:32 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:28:32 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:28:32 DEBUG [eventlet.
2011-12-13 18:28:33 DEBUG [glance.
2011-12-13 18:28:33 DEBUG [glance.
2011-12-13 18:28:33 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:28:33 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:28:33 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:28:33 DEBUG [eventlet.
2011-12-13 18:28:33 DEBUG [glance.
2011-12-13 18:28:33 DEBUG [glance.
2011-12-13 18:28:33 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:28:33 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:28:33 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:28:33 DEBUG [eventlet.
2011-12-13 18:28:46 DEBUG [glance.
2011-12-13 18:28:46 DEBUG [glance.
2011-12-13 18:28:46 DEBUG [eventlet.
2011-12-13 18:29:36 DEBUG [glance.
2011-12-13 18:29:36 DEBUG [glance.
2011-12-13 18:29:36 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:29:36 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:29:36 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:29:36 DEBUG [eventlet.
2011-12-13 18:29:36 DEBUG [glance.
2011-12-13 18:29:36 DEBUG [glance.
2011-12-13 18:29:36 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:29:36 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:29:36 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:29:36 DEBUG [eventlet.
2011-12-13 18:29:36 DEBUG [glance.
2011-12-13 18:29:36 DEBUG [glance.
2011-12-13 18:29:36 DEBUG [routes.middleware] Matched GET /images
2011-12-13 18:29:36 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.
2011-12-13 18:29:36 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': <glance.
2011-12-13 18:29:36 DEBUG [eventlet.
Revision history for this message
|
#23 |
Notice in the API log that *some* requests are being received with a request of:
GET /v1/images?limit=10
whereas some requests are being received as:
GET /v1.1//
The former is working just fine, the latter is returning a 302 since it does not understand v1.1.// apparently.
Can you isolate which client is actually issuing the incorrect call vs which clients are issuing the correct (v1/images/) call?
Thanks,
-jay
Revision history for this message
|
#24 |
Hi Jay,
I'm working on same glance server.
A terminal: just run "glance index" --> GET /v1/images?limit=10 (OK)
B terminal: after setting OS_AUTH_*, run "glance index" --> GET /v1.1//
sh-4.1# cat openrc
HOST_IP=**** // our keystone server IP
export NOVA_PROJECT_
export NOVA_USERNAME=demo
export NOVA_PASSWORD=guest
export NOVA_API_
#export NOVA_URL="http://
export NOVA_AUTH_URL=http://
export NOVA_VERSION=1.1
export NOVA_REGION_
export EC2_URL=http://
export EC2_ACCESS_KEY=demo
#export EC2_ACCESS_
export EC2_SECRET_
#export EC2_SECRET_
export OS_AUTH_
export OS_AUTH_
export OS_AUTH_
export OS_AUTH_URL=http://
export OS_AUTH_
If I change NOVA_VERSION to 1,
sh-4.1# source ./openrc
sh-4.1# glance index
Not authorized to make this request. Check your credentials (OS_AUTH_USER, OS_AUTH_KEY, ...).
Thanks,
Mikyung
Revision history for this message
|
#25 |
Hi Mikyung!
I'm going to add this as a bug report and try to get a repeatable test case together. I have a suspicion that it is the endpoint template for the image service that Keystone is returning that is the culprit here.
I'll update you when I have more information.
Thanks!
-jay
Revision history for this message
|
#26 |
To solve the problem:
Change the glance endpointemplate in keystone:
From:
http://
To:
http://