Glance installation fails

Asked by Steve Jacobs on 2011-10-05

Hi

I am trying to set up one controller and two compute nodes on Ubuntu 11.04, following the instructions at:
http://docs.openstack.org/diablo/openst ... oller.html
but at the step:
sudo apt-get install glance
it is returning an error. Output follows - any idea what is causing this?
#sudo apt-get install glance
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
glance
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/23.7 kB of archives.
After this operation, 229 kB of additional disk space will be used.
Selecting previously deselected package glance.
(Reading database ... 73552 files and directories currently installed.)
Unpacking glance (from .../glance_2012.1~e1~20111001.1037-0ubuntu0ppa1~natty1_all.deb) ...
Processing triggers for ureadahead ...
Setting up glance (2012.1~e1~20111001.1037-0ubuntu0ppa1~natty1) ...
Traceback (most recent call last):
File "/usr/bin/glance-manage", line 144, in <module>
main()
File "/usr/bin/glance-manage", line 140, in main
dispatch_cmd(options, args)
File "/usr/bin/glance-manage", line 112, in dispatch_cmd
cmd_func(options, args)
File "/usr/bin/glance-manage", line 100, in do_db_sync
glance.registry.db.migration.db_sync(options, version=db_version)
File "/usr/lib/python2.7/dist-packages/glance/registry/db/migration.py", line 123, in db_sync
upgrade(options, version=version)
File "/usr/lib/python2.7/dist-packages/glance/registry/db/migration.py", line 66, in upgrade
return versioning_api.upgrade(sql_connection, repo_path, version)
File "/usr/lib/pymodules/python2.7/migrate/versioning/api.py", line 185, in upgrade
return _migrate(url, repository, version, upgrade=True, err=err, **opts)
File "<string>", line 2, in _migrate
File "/usr/lib/pymodules/python2.7/migrate/versioning/util/__init__.py", line 160, in with_engine
return f(*a, **kw)
File "/usr/lib/pymodules/python2.7/migrate/versioning/api.py", line 364, in _migrate
schema.runchange(ver, change, changeset.step)
File "/usr/lib/pymodules/python2.7/migrate/versioning/schema.py", line 83, in runchange
change.run(self.engine, step)
File "/usr/lib/pymodules/python2.7/migrate/versioning/script/py.py", line 140, in run
script_func(engine)
File "/usr/lib/python2.7/dist-packages/glance/registry/db/migrate_repo/versions/001_add_images_table.py", line 49, in upgrade
create_tables(tables)
File "/usr/lib/python2.7/dist-packages/glance/registry/db/migrate_repo/schema.py", line 97, in create_tables
table.create()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 439, in create
bind.create(self, checkfirst=checkfirst)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1701, in create
connection=connection, **kwargs)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1743, in _run_visitor
**kwargs).traverse_single(element)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 77, in traverse_single
return meth(obj, **kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 58, in visit_table
self.connection.execute(schema.CreateTable(table))
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1194, in execute
params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1247, in _execute_ddl
return self.__execute_context(context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1305, in __execute_context
context.parameters[0], context=context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1404, in _cursor_execute
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1397, in _cursor_execute
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 299, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (OperationalError) table images already exists u'\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tname VARCHAR(255), \n\ttype VARCHAR(30), \n\tsize INTEGER, \n\tstatus VARCHAR(30) NOT NULL, \n\tis_public BOOLEAN NOT NULL, \n\tlocation TEXT, \n\tcreated_at DATETIME NOT NULL, \n\tupdated_at DATETIME, \n\tdeleted_at DATETIME, \n\tdeleted BOOLEAN NOT NULL, \n\tPRIMARY KEY (id), \n\tCHECK (deleted IN (0, 1)), \n\tCHECK (is_public IN (0, 1))\n)\n\n' ()
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)

Any help or advice appreciated
Steve

Question information

Language:
English Edit question
Status:
Solved
For:
Glance Edit question
Assignee:
No assignee Edit question
Solved by:
Steve Jacobs
Solved:
2011-10-05
Last query:
2011-10-05
Last reply:
Steve Jacobs (stevej) said : #1

Hi,
I found bug report 779311 which was related to my problem and was able to get glance installed properly due to information I found in this report.