glance index fails after following os compute starter guide

Bug #1012701 reported by Sebastien
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Book
Invalid
Undecided
koolhead17

Bug Description

Hello,

I've been following the attached documentation "OpenStack Compute Starter Guide - May 4, 2012 - essex" to setup an openstack demo, up to page 17 when endpoinds have been configured.

* The error message printed by 'glance index' is:
$ glance index
Failed to show index. Got error:
An object with the specified identifier was not found.
Details: 404 Not Found

The resource could not be found.

* Open ports on the server are:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:9292 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:35357 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:9191 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -

I suspect a wrong url or port number when configuring endpoints with admin and internal urls, but didn't found anything wrong yet. The error message didn't tell which identifier it was looking for.

Revision history for this message
Sebastien (tuzisan) wrote :
Revision history for this message
Sebastien (tuzisan) wrote :

The keystone configuration is:

$ keystone service-list
+----------------------------------+--------------+--------------+----------------------------+
| id | name | type | description |
+----------------------------------+--------------+--------------+----------------------------+
| 2c8e94af7a29422980e96e70344708b9 | glance | image | OpenStack Image Service |
| 2eef3074b9294a59ab201428e4671466 | nova | compute | OpenStack Compute Service |
| 31cc0289a2bc44308814ef4cb107ac87 | ec2 | ec2 | EC2 Service |
| 86d0b5e219b74e25b7e3305bd5cc2fb0 | service_name | service_type | description of the service |
| 90d6cb2b8f094113a263b42b4aa41309 | volume | volume | OpenStack Volume Service |
| d2890106abc543fbb5ddcee544295860 | keystone | identity | OpenStack Identity Service |
| deff7038d6eb4177a4b235a4b27b77b1 | swift | object-store | OpenStack Storage Service |
+----------------------------------+--------------+--------------+----------------------------+

$ keystone endpoint-list
+----------------------------------+----------+------------------------------------------------+------------------------------------------------+-------------------------------------------+
| id | region | publicurl | internalurl | adminurl |
+----------------------------------+----------+------------------------------------------------+------------------------------------------------+-------------------------------------------+
| 50bbf522b97846c5ae2af6f2b9fe0ce6 | myregion | http://192.168.1.25:8773/services/Cloud | http://192.168.1.25:8773/services/Cloud | http://192.168.1.25:8773/services/Admin |
| 6183219c9e6b47faa4011d99d2c07886 | myregion | http://192.168.1.25:8774/v2/$(tenant_id)s | http://192.168.1.25:8774/v2/$(tenant_id)s | http://192.168.1.25:8774/v2/$(tenant_id)s |
| 6cfbc85c70474c0dbc94e12bee591b8d | myregion | http://192.168.1.25:9292/v1/$(tenant_id)s | http://192.168.1.25:9292/v1 | http://192.168.1.25:9292/v1 |
| 834bc39f2edd4c1eb4af5b5d64ad545c | myregion | http://192.168.1.25:5000/v2.0 | http://192.168.1.25:5000/v2.0 | http://192.168.1.25:35357/v2.0 |
| f7d02209fe5f4812a73240bc44088de8 | myregion | http://192.168.1.25:8776/v1/$(tenant_id)s | http://192.168.1.25:8776/v1/$(tenant_id)s | http://192.168.1.25:8776/v1/$(tenant_id)s |
| f8f04a355af842319ed4741c43950425 | myregion | http://192.168.1.25:8080/v1/AUTH_$(tenant_id)s | http://192.168.1.25:8080/v1/AUTH_$(tenant_id)s | http://192.168.1.25:8080/v1 |
+----------------------------------+----------+------------------------------------------------+------------------------------------------------+-------------------------------------------+

Anne Gentle (annegentle)
no longer affects: openstack-manuals
Kiran Murari (kiranm)
Changed in openstackbook:
assignee: nobody → koolhead17 (koolhead17)
Revision history for this message
koolhead17 (koolhead17) wrote :

Sebastien,

I would request you to check few more parameters.

1. Is keystone middleware, correctly configuerd 4 glance with corrrect user/password/tenant, the paste.ini files inside /etc/glance
2.Is user glance member of service tenant with admin privileges.
3.Is database correctly configured.

cheers!!

Revision history for this message
Sebastien (tuzisan) wrote :

1. As you can see, I configured glance as described in the documentation on p17:
root@server1:/etc/glance# tail *paste.ini
==> glance-api-paste.ini <==
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_tenant_name = service
admin_user = glance
admin_password = glance

==> glance-cache-paste.ini <==
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.image_cache.prefetcher:Prefetcher

[app:glance-cleaner]
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.image_cache.cleaner:Cleaner

[app:glance-queue-image]
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.image_cache.queue_image:Queuer

==> glance-registry-paste.ini <==
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_tenant_name = service
admin_user = glance
admin_password = glance

==> glance-scrubber-paste.ini <==
[app:glance-scrubber]
paste.app_factory = glance.common.wsgi:app_factory
glance.app_factory = glance.store.scrubber:Scrubber

2. Mmh, I don't know how to check that. Advices are welcome :)

3. I suppose yes, please tell me if you want me to execute a specific command:
root@server1:/etc/glance# mysql -uroot -pmygreatsecret -e 'show databases;'
+--------------------+
| Database |
+--------------------+
| information_schema |
| glance |
| keystone |
| mysql |
| nova |
| performance_schema |
| test |
+--------------------+
root@server1:/etc/glance# mysql -uroot -pmygreatsecret -e 'select User, Password from mysql.user;'
+------------------+-------------------------------------------+
| User | Password |
+------------------+-------------------------------------------+
| root | *E67DDBD37B2B45555861783E23C21DC736C63FD5 |
| root | *E67DDBD37B2B45555861783E23C21DC736C63FD5 |
| root | *E67DDBD37B2B45555861783E23C21DC736C63FD5 |
| root | *E67DDBD37B2B45555861783E23C21DC736C63FD5 |
| | |
| | |
| debian-sys-maint | *A9B28A3D7BA6A16677D93C547D3CA223CA0BA946 |
| novadbadmin | *AD8C383FA181D43FFC5FE73B98678C532C3BE96A |
| glancedbadmin | *F1A83760CFF10DFB22F3B93A2B677CB899A86135 |
| keystonedbadmin | *319C1F352905233A80094D932EAD426F98B3C50B |
+------------------+-------------------------------------------+

Cheers ~

Revision history for this message
Sebastien (tuzisan) wrote :

Hello,

Since last time, I restarted the configuration from the very beginning and posted some shell commands I used to automate the most error-prone parts on the documentation website.

I think I made a mistake when creating endpoints but don't know where. This time I've created endpoints with this code and it works:
keystone service-list \
 | perl -aF'\s*\|\s*' -ne '
  my $hd = "http://192.168.1.25";
  # service -> [ public, admin, internal ] url tails
  my %tl = (
   nova => [ ":8774/v2/\$(tenant_id)s", ":8774/v2/\$(tenant_id)s", ":8774/v2/\$(tenant_id)s" ],
   volume => [ ":8776/v1/\$(tenant_id)s", ":8776/v1/\$(tenant_id)s", ":8776/v1/\$(tenant_id)s" ],
   glance => [ ":9292/v1", ":9292/v1", ":9292/v1" ],
   swift => [ ":8080/v1/AUTH_\$(tenant_id)s", ":8080/v1", ":8080/v1/AUTH_\$(tenant_id)s" ],
   keystone => [ ":5000/v2.0", ":35357/v2.0", ":5000/v2.0" ],
   ec2 => [ ":8773/services/Cloud", ":8773/services/Admin", ":8773/services/Cloud" ],
  );
  next if scalar @F < 4 or $. < 3 or not $tl{$F[2]};
  system "keystone", "endpoint-create", "--region", "myregion", "--service_id", $F[1], "--publicurl", "$hd$tl{$F[2]}[0]", "--adminurl", "$hd$tl{$F[2]}[1]", "--internalurl", "$hd$tl{$F[2]}[2]";

The problem is fixed for me :)

Maybe an extra package "openstack-starterguide-toolkit" with few scripts would be usefull to ease configuration?

Regards,

Revision history for this message
koolhead17 (koolhead17) wrote :

Sebastien,

I am closing this bug. I will see if we can come up with "openstack-starterguide-toolkit" for folsom release of our book. :)

Cheers!!

Changed in openstackbook:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.