Glance NotAuthorized with keystone on Ubuntu 11.10

Asked by wdhwang

Hi:
  I am a newbie for openstack. Now I am installing glance with keystone.
keystone use ppa:keystone-core/trunk. The keystone version as follows:
 2012.1~e4~20120206.1578-0ubuntu0ppa1~oneiric1 Proposed OpenStack identity service - Daemons

glance use ppa:glance-core/trunk. The glance version as follows (May this is Essex E4 version ??) :
glance 2012.1~e4~20120209.1254-0ubuntu0ppa1~oneiric1 OpenStack Image Registry and Delivery Service - Daemons
 glance-api 2012.1~e4~20120209.1254-0ubuntu0ppa1~oneiric1 OpenStack Image Registry and Delivery Service - API
 glance-common 2012.1~e4~20120209.1254-0ubuntu0ppa1~oneiric1 OpenStack Image Registry and Delivery Service - Common
glance-registry 2012.1~e4~20120209.1254-0ubuntu0ppa1~oneiric1 OpenStack Image Registry and Delivery Service - registry
python-glance 2012.1~e4~20120209.1254-0ubuntu0ppa1~oneiric1 OpenStack Image Registry and Delivery Service - Python library

  After installed the keystone, use the following command to verify the keystone is ok.
curl -d '{"auth": {"tenantName": "novaproj", "passwordCredentials":{"username": "novaadmin", "password": "novaadmin"}}}' -H "Content-type: application/json" http://127.0.0.1:5001/v2.0/tokens

  After installed the glance, and I modified the glance-api.conf / glance-registry.conf / glance-scrubber.conf. I have the following two problems:
(1) If I add the [paste_deploy] section and set "flavor = keystone" into glance-api.conf and glance-registry.conf, then I will see the following error message in the /var/log/syslog file.
Feb 22 13:34:03 ubuntu43 kernel: [66753.705250] init: glance-api main process ended, respawning
Feb 22 13:34:03 ubuntu43 kernel: [66754.034396] init: glance-api main process (18062) terminated with status 1
Feb 22 13:34:03 ubuntu43 kernel: [66754.034451] init: glance-api respawning too fast, stopped

Feb 22 13:35:57 ubuntu43 kernel: [66868.110600] init: glance-registry main process ended, respawning
Feb 22 13:35:57 ubuntu43 kernel: [66868.426263] init: glance-registry main process (18211) terminated with status 1
Feb 22 13:35:57 ubuntu43 kernel: [66868.426333] init: glance-registry respawning too fast, stopped

(2) If I don't add the [paste_deploy] section, the glance-api and glance-registry service will startup normally. But If I issue the
command "glance details -A 999888777666", I will get the following error message:
Failed to show details. Got error:
Internal Server error: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 279, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 276, in __call__
    response = self.process_request(req)
  File "/usr/lib/python2.7/dist-packages/glance/common/context.py", line 115, in process_request
    raise exception.NotAuthorized()
NotAuthorized: You are not authorized to complete this action.

   Is there anybody could give me any suggestion to solve these two problems?
  Thanks in advance!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu glance Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I suggest you contact the PPA maintainer.

Revision history for this message
JJ Asghar (jonathan-asghar) said :
#2

It seems it's due to the wrong version of glance. You need to have essex nova and essex glance.

Revision history for this message
wdhwang (wendwo-hwang) said :
#3

Thanks actionparsnip, that solved my question.

Revision history for this message
wdhwang (wendwo-hwang) said :
#4

Dear actionparsnip:
  How to contact the PPA maintainer ??
  Thanks for your helping!!

Revision history for this message
wdhwang (wendwo-hwang) said :
#5

part of the glance-api.conf
[pipeline:glance-api]
pipeline = versionnegotiation authtoken auth-context apiv1app

[pipeline:versions]
pipeline = versionsapp

[app:versionsapp]
paste.app_factory = glance.api.versions:app_factory

[app:apiv1app]
paste.app_factory = glance.api.v1:app_factory

[filter:versionnegotiation]
paste.filter_factory = glance.api.middleware.version_negotiation:filter_factory

[filter:imagecache]
paste.filter_factory = glance.api.middleware.image_cache:filter_factory

[filter:context]
paste.filter_factory = glance.common.context:filter_factory

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
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://127.0.0.1:5000/
admin_token = 999888777666

[filter:auth-context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = keystone.middleware.glance_auth_token:filter_factory

Revision history for this message
wdhwang (wendwo-hwang) said :
#6

part of glance-registry.conf
[pipeline:glance-registry]
pipeline = authtoken auth-context registryapp

[app:registryapp]
paste.app_factory = glance.registry.server:app_factory

[filter:context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = glance.common.context:filter_factory

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
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://127.0.0.1:5000/
admin_token = 999888777666

[filter:auth-context]
context_class = glance.registry.context.RequestContext
paste.filter_factory = keystone.middleware.glance_auth_token:filter_factory

Revision history for this message
wdhwang (wendwo-hwang) said :
#7

glance-cache.conf
[DEFAULT]
verbose = True
debug = False
log_file = /var/log/glance/image-cache.log
use_syslog = False
image_cache_dir = /var/lib/glance/image-cache/
image_cache_stall_time = 86400
image_cache_invalid_entry_grace_period = 3600
image_cache_max_size = 10737418240
registry_host = 0.0.0.0
registry_port = 9191
admin_token = 999888777666

Revision history for this message
wdhwang (wendwo-hwang) said :
#8

Dear All:
  I am just installing keystone and glance now. And I have tried the following PPA combinations:
(1) ppa:nova-core/milestone

(2) ppa:glance-core/milestone-proposed
      ppa:keystone-core/trunk

(3) ppa:glance-core/milestone
      ppa:keystone-core/trunk

(4) ppa:glance-core/trunk
      ppa:keystone-core/trunk

(5)ppa:managedit/openstack

Only the (5) PPA setting, glance can work with keystone. The others from (1) to (4) settings, I will get the error message
NotAuthorized: You are not authorized to complete this action.

  Thanks in advance!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

The launchpad pages with thos ppas will say their maintainer.
E.g.
https://launchpad.net/~glance-core/+archive/milestone

note the line:
For questions and bugs with software in this PPA please contact Glance Core.

Can you help with this problem?

Provide an answer of your own, or ask wdhwang for more information if necessary.

To post a message you must log in.