Upgrading to Diablo - glance install fails

Asked by Steve Jacobs

Still trying to install Diablo - this time following instructions in Openstack admin manual:
http://docs.openstack.org/diablo/openstack-compute/admin/content/installing-the-cloud-controller.html
After command 'sudo apt-get install glance' I am getting this error:
Unpacking glance (from .../glance_2012.1~e1~20111006.1039-0ubuntu0ppa1~natty1_all.deb) ...
Processing triggers for ureadahead ...
Setting up glance (2012.1~e1~20111006.1039-0ubuntu0ppa1~natty1) ...
ERROR: Error trying to load config /etc/glance/glance-registry.conf: No module named api.v1
dpkg: error processing glance (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 glance
E: Sub-process /usr/bin/dpkg returned an error code (1)

I looked at the /etc/glance/glance-regisry.conf and saw no reference to api.v1

Any ideas of what could be wrong?

Question information

Language:
English Edit question
Status:
Answered
For:
Glance Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Brian Waldon (bcwaldon) said :
#1

Can you post your /etc/glance/glance-registry.conf file?

Revision history for this message
Steve Jacobs (stevej) said :
#2

Hi Brian
Haven't changed much. Here it is:
Hi Brian
Here it is. About the only thing I changed was the sql connection, but I was getting the error before I did that.
root@222-200:/etc/glance# cat glance-registry.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 = 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/glance/registry.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://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
#sql_connection = sqlite:////var/lib/glance/glance.sqlite
sql_connection=mysql://root:nova@78.153.222.200/glance
# 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_param_default`
limit_param_default = 25

[pipeline:glance-registry]
pipeline = context registryapp
# NOTE: use the following pipeline for keystone
# pipeline = authtoken keystone_shim context registryapp

[app:registryapp]
paste.app_factory = glance.registry.api.v1: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 = 5001
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_token = 999888777666

[filter:keystone_shim]
paste.filter_factory = keystone.middleware.glance_auth_token:filter_factory

Revision history for this message
Brian Waldon (bcwaldon) said :
#3

I'm confused by what you said. I definitely see api.v1 in the [app:registryapp] section in the config file you pasted.

Revision history for this message
Somik Behera (somikbehera) said :
#4

I tried to install glance from source, checking out diablo branch from git, and I am running into the same issue.

Revision history for this message
Jay Pipes (jaypipes) said :
#5

The original poster was installing from packages (sudo apt-get install glance) and the error was a packaging error. How are you getting a packaging error if you are installing from a source repository?

Revision history for this message
Somik Behera (somikbehera) said :
#6

Instead of post-install script, I am manually running db sync, and thats when I run into this error.

sudo glance-manage db_sync --config-file=/etc/glance-registry.conf

Revision history for this message
Jay Pipes (jaypipes) said :
#7

What specifically is the error, though? Is there any output in the glance-registry log?

Revision history for this message
Somik Behera (somikbehera) said :
#8

Didn't generate any log in /var/log/glance , just the error message on command line.

Revision history for this message
Jay Pipes (jaypipes) said :
#9

On Tue, Oct 18, 2011 at 3:10 PM, Somik Behera
<email address hidden> wrote:
> Question #173644 on Glance changed:
> https://answers.launchpad.net/glance/+question/173644
>
> Somik Behera requested more information:
> Didn't generate any log in /var/log/glance , just the error message on
> command line.

What IS the error message on the command line?!
-jay

Revision history for this message
Somik Behera (somikbehera) said :
#10

My bad, its the same error as the reporter of this question was experiencing.

>> ERROR: Error trying to load config /etc/glance/glance-registry.conf: No module named api.v1

I did check my glance-registry, and its looking for api.v1

>>[app:registryapp]
>>paste.app_factory = glance.registry.api.v1:app_factory

Revision history for this message
Jay Pipes (jaypipes) said :
#11

Somik, I'm having troubling understanding how running the glance-manage db_sync command produces the error you are showing... that error comes up during the startup of the registry server daemon if the configuration file for the registry does not match the actual source code package for the Glance servers...

Can you help with this problem?

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

To post a message you must log in.