nova-manage, nova, glance and keystone

Asked by Armando Migliaccio

Hello,

this may sound a rather generic question, but I wonder how one would be able to use nova-manage when Keystone is present in an OpenStack deployment. I got Keystone, Glance and Nova all set up and configured to talk to each other, however when I try to register images:

nova-manage image image_register gold-image --owner=admin --name=test_image

(admin is a super user created with keystone-manage) I get the following:

Failed to register gold-image: 403 Forbidden
Access was denied to this resource.
Read-only access

I have noticed that the auth_token needed by Glance isn't passed through in a few places (both in nova/context.py and nova/image/glance.py).

Any hint?

Many thanks,
Armando

Question information

Language:
English Edit question
Status:
Expired
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Nicolas d (nicolas2b) said :
#1

Hi,

I got the same error.
Some logs, maybe it can be helpful
glance-api.log :
2011-09-02 22:22:32 DEBUG [glance.api.middleware.version_negotiation] Processing request: POST /v1/images Accept:
2011-09-02 22:22:32 DEBUG [glance.api.middleware.version_negotiation] Matched versioned URI. Version: 1.0
2011-09-02 22:22:32 DEBUG [routes.middleware] Matched POST /images
2011-09-02 22:22:32 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'create', 'controller': <glance.common.wsgi.Resource object at 0x2a70110>}
2011-09-02 22:22:32 DEBUG [routes.middleware] Match dict: {'action': u'create', 'controller': <glance.common.wsgi.Resource object at 0x2a70110>}
2011-09-02 22:22:32 DEBUG [glance.api.v1.images] Read-only access
2011-09-02 22:22:32 DEBUG [eventlet.wsgi.server] 192.168.23.5 - - [02/Sep/2011 22:22:32] "POST /v1/images HTTP/1.1" 403 195 0.078477

terminal :
[22:22:18] ~/openstack/uec-tar/ttylinux-uec-amd64-12.1_2.6.35-22_1
> nova-manage image all_register ttylinux-uec-amd64-12.1_2.6.35-22_1.img ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz ttylinux-uec-amd64-12.1_2.6.35-22_1-initrd --owner=test --name=ttylinux
/usr/local/bin/nova-manage:4: UserWarning: Module paste was already imported from None, but /usr/lib/python2.6/dist-packages is being added to sys.path
  import pkg_resources
2011-09-02 22:22:32,295 DEBUG nova.image.glance [-] Creating image in Glance. Metadata passed in {'is_public': True, 'properties': {'image_location': 'local', 'image_state': 'available', 'project_id': 'test', 'architecture': 'x86_64'}, 'disk_format': 'aki', 'name': None, 'container_format': 'aki'} from (pid=16737) create /usr/local/lib/python2.6/dist-packages/nova-2011.3-py2.6.egg/nova/image/glance.py:216
2011-09-02 22:22:32,296 DEBUG nova.image.glance [-] Metadata after formatting for Glance {'container_format': 'aki', 'disk_format': 'aki', 'properties': {'image_location': 'local', 'image_state': 'available', 'project_id': 'test', 'architecture': 'x86_64'}, 'is_public': True, 'name': None} from (pid=16737) create /usr/local/lib/python2.6/dist-packages/nova-2011.3-py2.6.egg/nova/image/glance.py:219
Failed to register ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz: 403 Forbidden

Access was denied to this resource.

 Read-only access
2011-09-02 22:22:32,308 DEBUG nova.image.glance [-] Creating image in Glance. Metadata passed in {'is_public': True, 'properties': {'image_location': 'local', 'image_state': 'available', 'project_id': 'test', 'architecture': 'x86_64'}, 'disk_format': 'ari', 'name': None, 'container_format': 'ari'} from (pid=16737) create /usr/local/lib/python2.6/dist-packages/nova-2011.3-py2.6.egg/nova/image/glance.py:216
2011-09-02 22:22:32,308 DEBUG nova.image.glance [-] Metadata after formatting for Glance {'container_format': 'ari', 'disk_format': 'ari', 'properties': {'image_location': 'local', 'image_state': 'available', 'project_id': 'test', 'architecture': 'x86_64'}, 'is_public': True, 'name': None} from (pid=16737) create /usr/local/lib/python2.6/dist-packages/nova-2011.3-py2.6.egg/nova/image/glance.py:219
Failed to register ttylinux-uec-amd64-12.1_2.6.35-22_1-initrd: 403 Forbidden

Access was denied to this resource.

 Read-only access
2011-09-02 22:22:32,327 DEBUG nova.image.glance [-] Creating image in Glance. Metadata passed in {'is_public': True, 'properties': {'image_location': 'local', 'image_state': 'available', 'project_id': 'test', 'architecture': 'x86_64'}, 'disk_format': 'ami', 'name': 'ttylinux', 'container_format': 'ami'} from (pid=16737) create /usr/local/lib/python2.6/dist-packages/nova-2011.3-py2.6.egg/nova/image/glance.py:216
2011-09-02 22:22:32,327 DEBUG nova.image.glance [-] Metadata after formatting for Glance {'container_format': 'ami', 'disk_format': 'ami', 'properties': {'image_location': 'local', 'image_state': 'available', 'project_id': 'test', 'architecture': 'x86_64'}, 'is_public': True, 'name': 'ttylinux'} from (pid=16737) create /usr/local/lib/python2.6/dist-packages/nova-2011.3-py2.6.egg/nova/image/glance.py:219
Failed to register ttylinux-uec-amd64-12.1_2.6.35-22_1.img: 403 Forbidden

Access was denied to this resource.

 Read-only access

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.