Ask Your Question
0

Error when sync glance database

asked 2012-04-20 02:04:30 -0500

tungns-inf gravatar image

Hi all,

I'm following the documents from Openstack to install Essex on Ubuntu server 12.04 beta2.

Everything is okay with Keystone, but with Glance, when I run the command:

glance-manage version_control 0

ERROR: There was an error migrating the database. Details: database 'mysql://glance:glance@172.17.2.203/glance_db' is already under migration control

I don't know but is it a problem with mysql-server 5.5? Because from the beginning when I grant the permission on glance_db for 'glance'@'%' it didn't work with @'localhost' like in this describe: http://tech.zhenhua.info/2009/01/mysql-error-104528000-access-denied-for.html (http://tech.zhenhua.info/2009/01/mysq...)

How can I fix this problem? Thank you!

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2012-04-20 06:54:01 -0500

tungns-inf gravatar image

Thank you smallma. My problem was fixed.

edit flag offensive delete link more
0

answered 2012-04-20 02:51:48 -0500

tungns-inf gravatar image

@smallma I checked but there is no /var/lib/glance/glance.sqlite in my server. This command return the same error. I don't know but maybe problem from mysql-server.

edit flag offensive delete link more
0

answered 2012-04-20 02:44:47 -0500

s-rain gravatar image

I saw the following script in glance-registry.postinst. FYI~

if [ ! -e /var/lib/glance/glance.sqlite ] ; then su -s /bin/sh -c 'glance-manage version_control 0' glance fi

edit flag offensive delete link more
0

answered 2012-09-28 06:49:39 -0500

hello neO0 how to slove it ? My problem is the same with you, can you give me any suggestion? Details pls see the below.

OS: RHEL6.2 single node openstack

[root@openstack ~]# glance-manage version_control 0 ERROR: There was an error migrating the database. Details: database 'mysql://glance:glance@192.168.206.130/glance' is already under migration control [root@openstack ~]#

[root@openstack ~]# glance index Failed to show index. Got error: The request returned 500 Internal Server Error

The response body: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 382, in handle_one_response result = self.application(self.environ, start_response) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, self.kwargs) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 208, in call_func return self.func(req, *args, *kwargs) File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 284, in __call__ response = req.get_response(self.application) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1053, in get_response application, catch_exc_info=False) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1022, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/python2.6/site-packages/keystone/middleware/auth_token.py", line 176, in __call__ return self.app(env, start_response) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 284, in __call__ response = req.get_response(self.application) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1053, in get_response application, catch_exc_info=False) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1022, in call_application app_iter = application(self.environ, start_response) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__ return resp(environ, start_response) File "/usr/lib/python2.6/site-packages/Routes-1.12.3-py2.6.egg/routes/middleware.py", line 131, in __call__ response = self.app(environ, start_response) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__ return resp(environ, start_response) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 147, in __call__ resp = self.call_func(req, args, *self.kwargs) File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 208, in call_func return self.func(req, args, *kwargs) File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 482, in __call__ request, *action_args) File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 499, in dispatch return method(args, *kwargs) File "/usr/lib ... (more)

edit flag offensive delete link more
0

answered 2012-04-20 06:17:15 -0500

s-rain gravatar image

Hello neo0, Please refer the following steps to set up glance.

  1. stop glance-api
  2. stop glance-registry
  3. remove tables from db
  4. su -s /bin/sh -c 'glance-manage version_control 0' glance
  5. su -s /bin/sh -c 'glance-manage db_sync' glance 6 start glance-api
  6. start glance-registry

Regards,

Rain.

edit flag offensive delete link more

Comments

During 5th step, iam getting this error. TypeError: __init__() got an unexpected keyword argument 'assert_unicode' Specs:

Ubuntu-12.04

OpenStack Havana.

Any help would be appreciated.

harshagelivi gravatar imageharshagelivi ( 2014-04-10 15:12:00 -0500 )edit

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-04-20 02:04:30 -0500

Seen: 538 times

Last updated: Sep 28 '12