Ask Your Question
0

2011.3 upgrade to 2012.1~e3

asked 2012-02-20 07:54:18 -0600

s-rain gravatar image

Hello all, I stored some images in the glance 2011.3 and I wanna upgrade to glance 2012.1~e3. How could I keep these images after upgraded? Thanks.

Rain

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2012-02-20 16:00:12 -0600

jaypipes gravatar image

Well, to be safe, you will want to back up your image files and Glance registry database before doing anything.

After that, you should just be able to do a standard upgrade (whatever method you use in your operating system) and then do a glance-manage db_sync

Best,

-jay

edit flag offensive delete link more
0

answered 2012-02-21 01:59:36 -0600

s-rain gravatar image

Jay, Thanks.

When I upgraded to glance 2012.1~e3 and executed glance-manage db_sync, it occurred a error below. Please help me out. Thanks.

root@ubuntu:/mnt# glance-manage db_sync Traceback (most recent call last): File "/usr/bin/glance-manage", line 128, in <module> main() File "/usr/bin/glance-manage", line 124, in main dispatch_cmd(conf, args) File "/usr/bin/glance-manage", line 99, in dispatch_cmd cmd_func(conf, args) File "/usr/bin/glance-manage", line 87, in do_db_sync glance.registry.db.migration.db_sync(conf, version=db_version) File "/usr/lib/pymodules/python2.7/glance/registry/db/migration.py", line 123, in db_sync upgrade(conf, version=version) File "/usr/lib/pymodules/python2.7/glance/registry/db/migration.py", line 66, in upgrade return versioning_api.upgrade(sql_connection, repo_path, version) File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade return _migrate(url, repository, version, upgrade=True, err=err, *opts) File "<string>", line 2, in _migrate File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine return f(a, *kw) File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 365, in _migrate schema.runchange(ver, change, changeset.step) File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange change.run(self.engine, step) File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run script_func(engine) File "/usr/lib/pymodules/python2.7/glance/registry/db/migrate_repo/versions/001_add_images_table.py", line 49, in upgrade create_tables(tables) File "/usr/lib/pymodules/python2.7/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 477, in create bind.create(self, checkfirst=checkfirst) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in create connection=connection, *kwargs) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1740, in _run_visitor *kwargs).traverse_single(element) File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 86, 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 1191, in execute params) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1244, in _execute_ddl return self.__execute_context(context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1302, in __execute_context context.parameters[0], context=context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1401, in _cursor_execute context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1394, in _cursor_execute context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 299, in do_execute cursor.execute(statement, parameters) File "/usr/lib/pymodules/python2.7/MySQLdb/cursors.py", line 174, in execute self.errorhandler(self, exc, value) File "/usr/lib/pymodules/python2.7/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue sqlalchemy.exc.OperationalError: (OperationalError) (1050, "Table 'images' already exists") '\nCREATE TABLE images (\n ... (more)

edit flag offensive delete link more
0

answered 2012-02-21 03:54:02 -0600

s-rain gravatar image

I know where the problem is.

We should execute "glance-manage db_sync" before setting up glance 2011.3 for the first time.

After that, we can upgrade to glance 2012.1~e3 and execute glance-manage db_sync again. The metadata can be shared with the latest glance.

Jay, Thanks.

Rain

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-02-20 07:54:18 -0600

Seen: 26 times

Last updated: Feb 21 '12