Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

Openstack Folsom-3 Glance Installation DB error

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


trinath.somanchi at gmail

Aug 29, 2012, 3:18 AM

Post #1 of 8 (664 views)
Permalink
Openstack Folsom-3 Glance Installation DB error

Hi-

I have installed Openstack Folsom-3 Glance for my testing and found this
error while db sync.

/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8:
UserWarning: Module glance was already imported from
/opt/stack/glance/glance/__init__.pyc, but
/usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
added to sys.path
import pkg_resources
Traceback (most recent call last):
File "./bin/glance-manage", line 131, in <module>
main()
File "./bin/glance-manage", line 127, in main
dispatch_cmd(args)
File "./bin/glance-manage", line 103, in dispatch_cmd
cmd_func(args)
File "./bin/glance-manage", line 91, in do_db_sync
glance.db.sqlalchemy.migration.db_sync(version, current_version)
File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 124, in
db_sync
upgrade(version=version)
File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 67, in
upgrade
return versioning_api.upgrade(sql_connection, repo_path, version)
File "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py",
line 159, in with_engine
return f(*a, **kw)
File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py",
line 366, in _migrate
schema.runchange(ver, change, changeset.step)
File
"/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line
91, in runchange
change.run(self.engine, step)
File
"/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py",
line 145, in run
script_func(engine)
File
"/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py",
line 49, in upgrade
create_tables(tables)
File "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py",
line 96, in create_tables
table.create()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py", line
594, in create
checkfirst=checkfirst)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 2303, in _run_visitor
conn._run_visitor(visitorcallable, element, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1973, in _run_visitor
**kwargs).traverse_single(element)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py",
line 106, in traverse_single
return meth(obj, **kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py",
line 86, in visit_table
self.connection.execute(schema.CreateTable(table))
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1449, in execute
params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1542, in _execute_ddl
compiled
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1698, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1691, in _execute_context
context)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
331, 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
(is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()

Can any one help me on troubleshooting the same.




--
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130


bcwaldon at gmail

Aug 29, 2012, 7:42 AM

Post #2 of 8 (633 views)
Permalink
Re: Openstack Folsom-3 Glance Installation DB error [In reply to]

Can you share the sequence of commands you used during the install process?


On Aug 29, 2012, at 3:18 AM, Trinath Somanchi wrote:

> Hi-
>
> I have installed Openstack Folsom-3 Glance for my testing and found this error while db sync.
>
> /usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8: UserWarning: Module glance was already imported from /opt/stack/glance/glance/__init__.pyc, but /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being added to sys.path
> import pkg_resources
> Traceback (most recent call last):
> File "./bin/glance-manage", line 131, in <module>
> main()
> File "./bin/glance-manage", line 127, in main
> dispatch_cmd(args)
> File "./bin/glance-manage", line 103, in dispatch_cmd
> cmd_func(args)
> File "./bin/glance-manage", line 91, in do_db_sync
> glance.db.sqlalchemy.migration.db_sync(version, current_version)
> File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 124, in db_sync
> upgrade(version=version)
> File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 67, in upgrade
> return versioning_api.upgrade(sql_connection, repo_path, version)
> File "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
> return f(*a, **kw)
> File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
> schema.runchange(ver, change, changeset.step)
> File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange
> change.run(self.engine, step)
> File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run
> script_func(engine)
> File "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py", line 49, in upgrade
> create_tables(tables)
> File "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py", line 96, in create_tables
> table.create()
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 594, in create
> checkfirst=checkfirst)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2303, in _run_visitor
> conn._run_visitor(visitorcallable, element, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1973, in _run_visitor
> **kwargs).traverse_single(element)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 106, in traverse_single
> return meth(obj, **kw)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86, in visit_table
> self.connection.execute(schema.CreateTable(table))
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
> params)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1542, in _execute_ddl
> compiled
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
> context)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
> context)
> File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, 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 (is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()
>
> Can any one help me on troubleshooting the same.
>
>
>
>
> --
> Regards,
> ----------------------------------------------
> Trinath Somanchi,
> +91 9866 235 130
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp


trinath.somanchi at gmail

Aug 29, 2012, 9:55 AM

Post #3 of 8 (643 views)
Permalink
Re: Openstack Folsom-3 Glance Installation DB error [In reply to]

Hi-
here are my steps:

[1] I have just downloaded the tar.gz file of glance
[2] untar and run the following commands, python setup.py build , python
setup.py install
[3] create the galnce db in mysql manually.
[4] previously done with keystone work as specified in the ESSESX release,
since I dont have folsom-3 specific document to go with,
[5] updated glance-registry.conf, glance-api-paste.ini,
glance-registry-api.ini (some difference in file name, as I did not
remember them) with SQL information.
[6] run command ' glance-manage versiont_control 0'
[7] run command 'glance-manage db_sync'

This is the complete set of order of steps I have used, and at the end of
the 7th step, I got the below error.

Can you please guide me on troubleshooting the issue.

Thanking you the reply.

-
TNS.

On Wed, Aug 29, 2012 at 8:12 PM, Brian Waldon <bcwaldon [at] gmail> wrote:

> Can you share the sequence of commands you used during the install process?
>
>
> On Aug 29, 2012, at 3:18 AM, Trinath Somanchi wrote:
>
> > Hi-
> >
> > I have installed Openstack Folsom-3 Glance for my testing and found this
> error while db sync.
> >
> > /usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8:
> UserWarning: Module glance was already imported from
> /opt/stack/glance/glance/__init__.pyc, but
> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
> added to sys.path
> > import pkg_resources
> > Traceback (most recent call last):
> > File "./bin/glance-manage", line 131, in <module>
> > main()
> > File "./bin/glance-manage", line 127, in main
> > dispatch_cmd(args)
> > File "./bin/glance-manage", line 103, in dispatch_cmd
> > cmd_func(args)
> > File "./bin/glance-manage", line 91, in do_db_sync
> > glance.db.sqlalchemy.migration.db_sync(version, current_version)
> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 124,
> in db_sync
> > upgrade(version=version)
> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 67,
> in upgrade
> > return versioning_api.upgrade(sql_connection, repo_path, version)
> > File
> "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py",
> line 159, in with_engine
> > return f(*a, **kw)
> > File
> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line
> 366, in _migrate
> > schema.runchange(ver, change, changeset.step)
> > File
> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line
> 91, in runchange
> > change.run(self.engine, step)
> > File
> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py",
> line 145, in run
> > script_func(engine)
> > File
> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py",
> line 49, in upgrade
> > create_tables(tables)
> > File "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py",
> line 96, in create_tables
> > table.create()
> > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py",
> line 594, in create
> > checkfirst=checkfirst)
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
> 2303, in _run_visitor
> > conn._run_visitor(visitorcallable, element, **kwargs)
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
> 1973, in _run_visitor
> > **kwargs).traverse_single(element)
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line
> 106, in traverse_single
> > return meth(obj, **kw)
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86,
> in visit_table
> > self.connection.execute(schema.CreateTable(table))
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
> 1449, in execute
> > params)
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
> 1542, in _execute_ddl
> > compiled
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
> 1698, in _execute_context
> > context)
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
> 1691, in _execute_context
> > context)
> > File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
> 331, 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
> (is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()
> >
> > Can any one help me on troubleshooting the same.
> >
> >
> >
> >
> > --
> > Regards,
> > ----------------------------------------------
> > Trinath Somanchi,
> > +91 9866 235 130
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~openstack
> > Post to : openstack [at] lists
> > Unsubscribe : https://launchpad.net/~openstack
> > More help : https://help.launchpad.net/ListHelp
>
>


--
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130


trinath.somanchi at gmail

Aug 30, 2012, 2:42 AM

Post #4 of 8 (632 views)
Permalink
Re: Openstack Folsom-3 Glance Installation DB error [In reply to]

Hi-

This issue is resolved, reset the mysql passcode for glance.

But struck with another issue, 'glance index' command.

I have issued 'glance index' command to check the accuracy of my glance
installations.

But I got the following error

/opt/stack/glance/glance/openstack/common/version.py:22: UserWarning:
Module glance was already imported from
/opt/stack/glance/glance/__init__.pyc, but
/usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
added to sys.path
import pkg_resources
WARNING! This tool is deprecated in favor of python-glanceclient (see
http://github.com/openstack/python-glanceclient).
Failed to show index. Got error:
[Errno 111] Connection refused


Can any one help me on solving this issue.

-
TNS




On Wed, Aug 29, 2012 at 10:25 PM, Trinath Somanchi <
trinath.somanchi [at] gmail> wrote:

> Hi-
> here are my steps:
>
> [1] I have just downloaded the tar.gz file of glance
> [2] untar and run the following commands, python setup.py build , python
> setup.py install
> [3] create the galnce db in mysql manually.
> [4] previously done with keystone work as specified in the ESSESX release,
> since I dont have folsom-3 specific document to go with,
> [5] updated glance-registry.conf, glance-api-paste.ini,
> glance-registry-api.ini (some difference in file name, as I did not
> remember them) with SQL information.
> [6] run command ' glance-manage versiont_control 0'
> [7] run command 'glance-manage db_sync'
>
> This is the complete set of order of steps I have used, and at the end of
> the 7th step, I got the below error.
>
> Can you please guide me on troubleshooting the issue.
>
> Thanking you the reply.
>
> -
> TNS.
>
>
> On Wed, Aug 29, 2012 at 8:12 PM, Brian Waldon <bcwaldon [at] gmail> wrote:
>
>> Can you share the sequence of commands you used during the install
>> process?
>>
>>
>> On Aug 29, 2012, at 3:18 AM, Trinath Somanchi wrote:
>>
>> > Hi-
>> >
>> > I have installed Openstack Folsom-3 Glance for my testing and found
>> this error while db sync.
>> >
>> > /usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8:
>> UserWarning: Module glance was already imported from
>> /opt/stack/glance/glance/__init__.pyc, but
>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>> added to sys.path
>> > import pkg_resources
>> > Traceback (most recent call last):
>> > File "./bin/glance-manage", line 131, in <module>
>> > main()
>> > File "./bin/glance-manage", line 127, in main
>> > dispatch_cmd(args)
>> > File "./bin/glance-manage", line 103, in dispatch_cmd
>> > cmd_func(args)
>> > File "./bin/glance-manage", line 91, in do_db_sync
>> > glance.db.sqlalchemy.migration.db_sync(version, current_version)
>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 124,
>> in db_sync
>> > upgrade(version=version)
>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 67,
>> in upgrade
>> > return versioning_api.upgrade(sql_connection, repo_path, version)
>> > File
>> "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py",
>> line 159, in with_engine
>> > return f(*a, **kw)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line
>> 366, in _migrate
>> > schema.runchange(ver, change, changeset.step)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line
>> 91, in runchange
>> > change.run(self.engine, step)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py",
>> line 145, in run
>> > script_func(engine)
>> > File
>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py",
>> line 49, in upgrade
>> > create_tables(tables)
>> > File "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py",
>> line 96, in create_tables
>> > table.create()
>> > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py",
>> line 594, in create
>> > checkfirst=checkfirst)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>> 2303, in _run_visitor
>> > conn._run_visitor(visitorcallable, element, **kwargs)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>> 1973, in _run_visitor
>> > **kwargs).traverse_single(element)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line
>> 106, in traverse_single
>> > return meth(obj, **kw)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86,
>> in visit_table
>> > self.connection.execute(schema.CreateTable(table))
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>> 1449, in execute
>> > params)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>> 1542, in _execute_ddl
>> > compiled
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>> 1698, in _execute_context
>> > context)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>> 1691, in _execute_context
>> > context)
>> > File
>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
>> 331, 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
>> (is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()
>> >
>> > Can any one help me on troubleshooting the same.
>> >
>> >
>> >
>> >
>> > --
>> > Regards,
>> > ----------------------------------------------
>> > Trinath Somanchi,
>> > +91 9866 235 130
>> >
>> > _______________________________________________
>> > Mailing list: https://launchpad.net/~openstack
>> > Post to : openstack [at] lists
>> > Unsubscribe : https://launchpad.net/~openstack
>> > More help : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Regards,
> ----------------------------------------------
> Trinath Somanchi,
> +91 9866 235 130
>
>


--
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130


unicell at gmail

Aug 30, 2012, 8:17 AM

Post #5 of 8 (647 views)
Permalink
Re: Openstack Folsom-3 Glance Installation DB error [In reply to]

Hi Trinath,

For the first db_sync issue you mentioned, it seems to be caused by Folsom
version of glance-manage db_sync, which is caused "glance-manage db_sync"
followed by "glance version_control 0". And I can duplicate it at my side.

Brian is working on another issue (
https://bugs.launchpad.net/glance/+bug/1042925 ), the proposed solution
might be helpful for this issue, I think.

For now, as a workaround, you can simply run "glance-manage db_sync", and
no need for "glance-manage version_control 0". "glance-manage db_sync"
command alone is enough to create the database model.

For the second issue you mentioned, "glance index" is deprecated in Folsom.
You can now refer to "glance image-list" and "glance --help" for more
information.

Best Regards,
--
Qiu Yu
http://www.unicell.info


On Thu, Aug 30, 2012 at 5:42 PM, Trinath Somanchi <
trinath.somanchi [at] gmail> wrote:

> Hi-
>
> This issue is resolved, reset the mysql passcode for glance.
>
> But struck with another issue, 'glance index' command.
>
> I have issued 'glance index' command to check the accuracy of my glance
> installations.
>
> But I got the following error
>
> /opt/stack/glance/glance/openstack/common/version.py:22: UserWarning:
> Module glance was already imported from
> /opt/stack/glance/glance/__init__.pyc, but
> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
> added to sys.path
> import pkg_resources
> WARNING! This tool is deprecated in favor of python-glanceclient (see
> http://github.com/openstack/python-glanceclient).
> Failed to show index. Got error:
> [Errno 111] Connection refused
>
>
> Can any one help me on solving this issue.
>
> -
> TNS
>
>
>
>
> On Wed, Aug 29, 2012 at 10:25 PM, Trinath Somanchi <
> trinath.somanchi [at] gmail> wrote:
>
>> Hi-
>> here are my steps:
>>
>> [1] I have just downloaded the tar.gz file of glance
>> [2] untar and run the following commands, python setup.py build , python
>> setup.py install
>> [3] create the galnce db in mysql manually.
>> [4] previously done with keystone work as specified in the ESSESX
>> release, since I dont have folsom-3 specific document to go with,
>> [5] updated glance-registry.conf, glance-api-paste.ini,
>> glance-registry-api.ini (some difference in file name, as I did not
>> remember them) with SQL information.
>> [6] run command ' glance-manage versiont_control 0'
>> [7] run command 'glance-manage db_sync'
>>
>> This is the complete set of order of steps I have used, and at the end of
>> the 7th step, I got the below error.
>>
>> Can you please guide me on troubleshooting the issue.
>>
>> Thanking you the reply.
>>
>> -
>> TNS.
>>
>>
>> On Wed, Aug 29, 2012 at 8:12 PM, Brian Waldon <bcwaldon [at] gmail> wrote:
>>
>>> Can you share the sequence of commands you used during the install
>>> process?
>>>
>>>
>>> On Aug 29, 2012, at 3:18 AM, Trinath Somanchi wrote:
>>>
>>> > Hi-
>>> >
>>> > I have installed Openstack Folsom-3 Glance for my testing and found
>>> this error while db sync.
>>> >
>>> > /usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8:
>>> UserWarning: Module glance was already imported from
>>> /opt/stack/glance/glance/__init__.pyc, but
>>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>>> added to sys.path
>>> > import pkg_resources
>>> > Traceback (most recent call last):
>>> > File "./bin/glance-manage", line 131, in <module>
>>> > main()
>>> > File "./bin/glance-manage", line 127, in main
>>> > dispatch_cmd(args)
>>> > File "./bin/glance-manage", line 103, in dispatch_cmd
>>> > cmd_func(args)
>>> > File "./bin/glance-manage", line 91, in do_db_sync
>>> > glance.db.sqlalchemy.migration.db_sync(version, current_version)
>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line
>>> 124, in db_sync
>>> > upgrade(version=version)
>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line 67,
>>> in upgrade
>>> > return versioning_api.upgrade(sql_connection, repo_path, version)
>>> > File
>>> "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py",
>>> line 159, in with_engine
>>> > return f(*a, **kw)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line
>>> 366, in _migrate
>>> > schema.runchange(ver, change, changeset.step)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line
>>> 91, in runchange
>>> > change.run(self.engine, step)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py",
>>> line 145, in run
>>> > script_func(engine)
>>> > File
>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py",
>>> line 49, in upgrade
>>> > create_tables(tables)
>>> > File
>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py", line 96,
>>> in create_tables
>>> > table.create()
>>> > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py",
>>> line 594, in create
>>> > checkfirst=checkfirst)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>> 2303, in _run_visitor
>>> > conn._run_visitor(visitorcallable, element, **kwargs)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>> 1973, in _run_visitor
>>> > **kwargs).traverse_single(element)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line
>>> 106, in traverse_single
>>> > return meth(obj, **kw)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86,
>>> in visit_table
>>> > self.connection.execute(schema.CreateTable(table))
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>> 1449, in execute
>>> > params)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>> 1542, in _execute_ddl
>>> > compiled
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>> 1698, in _execute_context
>>> > context)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>> 1691, in _execute_context
>>> > context)
>>> > File
>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
>>> 331, 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
>>> (is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()
>>> >
>>> > Can any one help me on troubleshooting the same.
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Regards,
>>> > ----------------------------------------------
>>> > Trinath Somanchi,
>>> > +91 9866 235 130
>>> >
>>> > _______________________________________________
>>> > Mailing list: https://launchpad.net/~openstack
>>> > Post to : openstack [at] lists
>>> > Unsubscribe : https://launchpad.net/~openstack
>>> > More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Regards,
>> ----------------------------------------------
>> Trinath Somanchi,
>> +91 9866 235 130
>>
>>
>
>
> --
> Regards,
> ----------------------------------------------
> Trinath Somanchi,
> +91 9866 235 130
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack [at] lists
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>


trinath.somanchi at gmail

Aug 31, 2012, 12:54 AM

Post #6 of 8 (622 views)
Permalink
Re: Openstack Folsom-3 Glance Installation DB error [In reply to]

Hi Unicell-'

But still I get the same error.

When I issue the glance command, the following warning is issued.

"WARNING! This tool is deprecated in favor of python-glanceclient..."

Can any one help me on how to resolve the issue.

-
TNS

On Thu, Aug 30, 2012 at 8:47 PM, unicell <unicell [at] gmail> wrote:

> Hi Trinath,
>
> For the first db_sync issue you mentioned, it seems to be caused by Folsom
> version of glance-manage db_sync, which is caused "glance-manage db_sync"
> followed by "glance version_control 0". And I can duplicate it at my side.
>
> Brian is working on another issue (
> https://bugs.launchpad.net/glance/+bug/1042925 ), the proposed solution
> might be helpful for this issue, I think.
>
> For now, as a workaround, you can simply run "glance-manage db_sync", and
> no need for "glance-manage version_control 0". "glance-manage db_sync"
> command alone is enough to create the database model.
>
> For the second issue you mentioned, "glance index" is deprecated in
> Folsom. You can now refer to "glance image-list" and "glance --help" for
> more information.
>
> Best Regards,
> --
> Qiu Yu
> http://www.unicell.info
>
>
>
> On Thu, Aug 30, 2012 at 5:42 PM, Trinath Somanchi <
> trinath.somanchi [at] gmail> wrote:
>
>> Hi-
>>
>> This issue is resolved, reset the mysql passcode for glance.
>>
>> But struck with another issue, 'glance index' command.
>>
>> I have issued 'glance index' command to check the accuracy of my glance
>> installations.
>>
>> But I got the following error
>>
>> /opt/stack/glance/glance/openstack/common/version.py:22: UserWarning:
>> Module glance was already imported from
>> /opt/stack/glance/glance/__init__.pyc, but
>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>> added to sys.path
>> import pkg_resources
>> WARNING! This tool is deprecated in favor of python-glanceclient (see
>> http://github.com/openstack/python-glanceclient).
>> Failed to show index. Got error:
>> [Errno 111] Connection refused
>>
>>
>> Can any one help me on solving this issue.
>>
>> -
>> TNS
>>
>>
>>
>>
>> On Wed, Aug 29, 2012 at 10:25 PM, Trinath Somanchi <
>> trinath.somanchi [at] gmail> wrote:
>>
>>> Hi-
>>> here are my steps:
>>>
>>> [1] I have just downloaded the tar.gz file of glance
>>> [2] untar and run the following commands, python setup.py build , python
>>> setup.py install
>>> [3] create the galnce db in mysql manually.
>>> [4] previously done with keystone work as specified in the ESSESX
>>> release, since I dont have folsom-3 specific document to go with,
>>> [5] updated glance-registry.conf, glance-api-paste.ini,
>>> glance-registry-api.ini (some difference in file name, as I did not
>>> remember them) with SQL information.
>>> [6] run command ' glance-manage versiont_control 0'
>>> [7] run command 'glance-manage db_sync'
>>>
>>> This is the complete set of order of steps I have used, and at the end
>>> of the 7th step, I got the below error.
>>>
>>> Can you please guide me on troubleshooting the issue.
>>>
>>> Thanking you the reply.
>>>
>>> -
>>> TNS.
>>>
>>>
>>> On Wed, Aug 29, 2012 at 8:12 PM, Brian Waldon <bcwaldon [at] gmail>wrote:
>>>
>>>> Can you share the sequence of commands you used during the install
>>>> process?
>>>>
>>>>
>>>> On Aug 29, 2012, at 3:18 AM, Trinath Somanchi wrote:
>>>>
>>>> > Hi-
>>>> >
>>>> > I have installed Openstack Folsom-3 Glance for my testing and found
>>>> this error while db sync.
>>>> >
>>>> > /usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8:
>>>> UserWarning: Module glance was already imported from
>>>> /opt/stack/glance/glance/__init__.pyc, but
>>>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>>>> added to sys.path
>>>> > import pkg_resources
>>>> > Traceback (most recent call last):
>>>> > File "./bin/glance-manage", line 131, in <module>
>>>> > main()
>>>> > File "./bin/glance-manage", line 127, in main
>>>> > dispatch_cmd(args)
>>>> > File "./bin/glance-manage", line 103, in dispatch_cmd
>>>> > cmd_func(args)
>>>> > File "./bin/glance-manage", line 91, in do_db_sync
>>>> > glance.db.sqlalchemy.migration.db_sync(version, current_version)
>>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line
>>>> 124, in db_sync
>>>> > upgrade(version=version)
>>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line
>>>> 67, in upgrade
>>>> > return versioning_api.upgrade(sql_connection, repo_path, version)
>>>> > File
>>>> "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py",
>>>> line 159, in with_engine
>>>> > return f(*a, **kw)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line
>>>> 366, in _migrate
>>>> > schema.runchange(ver, change, changeset.step)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line
>>>> 91, in runchange
>>>> > change.run(self.engine, step)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py",
>>>> line 145, in run
>>>> > script_func(engine)
>>>> > File
>>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py",
>>>> line 49, in upgrade
>>>> > create_tables(tables)
>>>> > File
>>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py", line 96,
>>>> in create_tables
>>>> > table.create()
>>>> > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py",
>>>> line 594, in create
>>>> > checkfirst=checkfirst)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>> 2303, in _run_visitor
>>>> > conn._run_visitor(visitorcallable, element, **kwargs)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>> 1973, in _run_visitor
>>>> > **kwargs).traverse_single(element)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line
>>>> 106, in traverse_single
>>>> > return meth(obj, **kw)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86,
>>>> in visit_table
>>>> > self.connection.execute(schema.CreateTable(table))
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>> 1449, in execute
>>>> > params)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>> 1542, in _execute_ddl
>>>> > compiled
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>> 1698, in _execute_context
>>>> > context)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>> 1691, in _execute_context
>>>> > context)
>>>> > File
>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
>>>> 331, 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
>>>> (is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()
>>>> >
>>>> > Can any one help me on troubleshooting the same.
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Regards,
>>>> > ----------------------------------------------
>>>> > Trinath Somanchi,
>>>> > +91 9866 235 130
>>>> >
>>>> > _______________________________________________
>>>> > Mailing list: https://launchpad.net/~openstack
>>>> > Post to : openstack [at] lists
>>>> > Unsubscribe : https://launchpad.net/~openstack
>>>> > More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> ----------------------------------------------
>>> Trinath Somanchi,
>>> +91 9866 235 130
>>>
>>>
>>
>>
>> --
>> Regards,
>> ----------------------------------------------
>> Trinath Somanchi,
>> +91 9866 235 130
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack [at] lists
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>


--
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130


unicell at gmail

Aug 31, 2012, 4:03 AM

Post #7 of 8 (626 views)
Permalink
Re: Openstack Folsom-3 Glance Installation DB error [In reply to]

Make sure you used "glance" command from python-glanceclient project,
instead of the command shipped with "glance" project.

More information here
http://bcwaldon.cc/2012/08/20/openstack-folsom-glance-overview

Best Regards,
--
Qiu Yu
http://www.unicell.info


On Fri, Aug 31, 2012 at 3:54 PM, Trinath Somanchi <
trinath.somanchi [at] gmail> wrote:

> Hi Unicell-'
>
> But still I get the same error.
>
> When I issue the glance command, the following warning is issued.
>
> "WARNING! This tool is deprecated in favor of python-glanceclient..."
>
> Can any one help me on how to resolve the issue.
>
> -
> TNS
>
> On Thu, Aug 30, 2012 at 8:47 PM, unicell <unicell [at] gmail> wrote:
>
>> Hi Trinath,
>>
>> For the first db_sync issue you mentioned, it seems to be caused by
>> Folsom version of glance-manage db_sync, which is caused "glance-manage
>> db_sync" followed by "glance version_control 0". And I can duplicate it at
>> my side.
>>
>> Brian is working on another issue (
>> https://bugs.launchpad.net/glance/+bug/1042925 ), the proposed solution
>> might be helpful for this issue, I think.
>>
>> For now, as a workaround, you can simply run "glance-manage db_sync", and
>> no need for "glance-manage version_control 0". "glance-manage db_sync"
>> command alone is enough to create the database model.
>>
>> For the second issue you mentioned, "glance index" is deprecated in
>> Folsom. You can now refer to "glance image-list" and "glance --help" for
>> more information.
>>
>> Best Regards,
>> --
>> Qiu Yu
>> http://www.unicell.info
>>
>>
>>
>> On Thu, Aug 30, 2012 at 5:42 PM, Trinath Somanchi <
>> trinath.somanchi [at] gmail> wrote:
>>
>>> Hi-
>>>
>>> This issue is resolved, reset the mysql passcode for glance.
>>>
>>> But struck with another issue, 'glance index' command.
>>>
>>> I have issued 'glance index' command to check the accuracy of my glance
>>> installations.
>>>
>>> But I got the following error
>>>
>>> /opt/stack/glance/glance/openstack/common/version.py:22: UserWarning:
>>> Module glance was already imported from
>>> /opt/stack/glance/glance/__init__.pyc, but
>>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>>> added to sys.path
>>> import pkg_resources
>>> WARNING! This tool is deprecated in favor of python-glanceclient (see
>>> http://github.com/openstack/python-glanceclient).
>>> Failed to show index. Got error:
>>> [Errno 111] Connection refused
>>>
>>>
>>> Can any one help me on solving this issue.
>>>
>>> -
>>> TNS
>>>
>>>
>>>
>>>
>>> On Wed, Aug 29, 2012 at 10:25 PM, Trinath Somanchi <
>>> trinath.somanchi [at] gmail> wrote:
>>>
>>>> Hi-
>>>> here are my steps:
>>>>
>>>> [1] I have just downloaded the tar.gz file of glance
>>>> [2] untar and run the following commands, python setup.py build ,
>>>> python setup.py install
>>>> [3] create the galnce db in mysql manually.
>>>> [4] previously done with keystone work as specified in the ESSESX
>>>> release, since I dont have folsom-3 specific document to go with,
>>>> [5] updated glance-registry.conf, glance-api-paste.ini,
>>>> glance-registry-api.ini (some difference in file name, as I did not
>>>> remember them) with SQL information.
>>>> [6] run command ' glance-manage versiont_control 0'
>>>> [7] run command 'glance-manage db_sync'
>>>>
>>>> This is the complete set of order of steps I have used, and at the end
>>>> of the 7th step, I got the below error.
>>>>
>>>> Can you please guide me on troubleshooting the issue.
>>>>
>>>> Thanking you the reply.
>>>>
>>>> -
>>>> TNS.
>>>>
>>>>
>>>> On Wed, Aug 29, 2012 at 8:12 PM, Brian Waldon <bcwaldon [at] gmail>wrote:
>>>>
>>>>> Can you share the sequence of commands you used during the install
>>>>> process?
>>>>>
>>>>>
>>>>> On Aug 29, 2012, at 3:18 AM, Trinath Somanchi wrote:
>>>>>
>>>>> > Hi-
>>>>> >
>>>>> > I have installed Openstack Folsom-3 Glance for my testing and found
>>>>> this error while db sync.
>>>>> >
>>>>> > /usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8:
>>>>> UserWarning: Module glance was already imported from
>>>>> /opt/stack/glance/glance/__init__.pyc, but
>>>>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>>>>> added to sys.path
>>>>> > import pkg_resources
>>>>> > Traceback (most recent call last):
>>>>> > File "./bin/glance-manage", line 131, in <module>
>>>>> > main()
>>>>> > File "./bin/glance-manage", line 127, in main
>>>>> > dispatch_cmd(args)
>>>>> > File "./bin/glance-manage", line 103, in dispatch_cmd
>>>>> > cmd_func(args)
>>>>> > File "./bin/glance-manage", line 91, in do_db_sync
>>>>> > glance.db.sqlalchemy.migration.db_sync(version, current_version)
>>>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line
>>>>> 124, in db_sync
>>>>> > upgrade(version=version)
>>>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line
>>>>> 67, in upgrade
>>>>> > return versioning_api.upgrade(sql_connection, repo_path, version)
>>>>> > File
>>>>> "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py",
>>>>> line 159, in with_engine
>>>>> > return f(*a, **kw)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line
>>>>> 366, in _migrate
>>>>> > schema.runchange(ver, change, changeset.step)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line
>>>>> 91, in runchange
>>>>> > change.run(self.engine, step)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py",
>>>>> line 145, in run
>>>>> > script_func(engine)
>>>>> > File
>>>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py",
>>>>> line 49, in upgrade
>>>>> > create_tables(tables)
>>>>> > File
>>>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py", line 96,
>>>>> in create_tables
>>>>> > table.create()
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 594, in
>>>>> create
>>>>> > checkfirst=checkfirst)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>> 2303, in _run_visitor
>>>>> > conn._run_visitor(visitorcallable, element, **kwargs)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>> 1973, in _run_visitor
>>>>> > **kwargs).traverse_single(element)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line
>>>>> 106, in traverse_single
>>>>> > return meth(obj, **kw)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86,
>>>>> in visit_table
>>>>> > self.connection.execute(schema.CreateTable(table))
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>> 1449, in execute
>>>>> > params)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>> 1542, in _execute_ddl
>>>>> > compiled
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>> 1698, in _execute_context
>>>>> > context)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>> 1691, in _execute_context
>>>>> > context)
>>>>> > File
>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
>>>>> 331, 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
>>>>> (is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()
>>>>> >
>>>>> > Can any one help me on troubleshooting the same.
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Regards,
>>>>> > ----------------------------------------------
>>>>> > Trinath Somanchi,
>>>>> > +91 9866 235 130
>>>>> >
>>>>> > _______________________________________________
>>>>> > Mailing list: https://launchpad.net/~openstack
>>>>> > Post to : openstack [at] lists
>>>>> > Unsubscribe : https://launchpad.net/~openstack
>>>>> > More help : https://help.launchpad.net/ListHelp
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> ----------------------------------------------
>>>> Trinath Somanchi,
>>>> +91 9866 235 130
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> ----------------------------------------------
>>> Trinath Somanchi,
>>> +91 9866 235 130
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack [at] lists
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
>
> --
> Regards,
> ----------------------------------------------
> Trinath Somanchi,
> +91 9866 235 130
>
>


trinath.somanchi at gmail

Aug 31, 2012, 4:13 AM

Post #8 of 8 (628 views)
Permalink
Re: Openstack Folsom-3 Glance Installation DB error [In reply to]

Hi Unicell-

Thanks fro the reply,

Can u guide me on what exact command I need to use to get the list of
images present with glance. I Essex release I used, 'glance index' to get
the list of Images.


Hi All-

It could be helpful, though Folsom-3 is a milestone for Folsom release, to
have web page or a document listing all the changes that are in place with
respect to the particular milestone and the differences in execution of
basic commands that are modified or deprecated from Essex release.

Thanking you all. this kind of document/draft can be a real helping hand.

-
TNS


On Fri, Aug 31, 2012 at 4:33 PM, unicell <unicell [at] gmail> wrote:

> Make sure you used "glance" command from python-glanceclient project,
> instead of the command shipped with "glance" project.
>
> More information here
> http://bcwaldon.cc/2012/08/20/openstack-folsom-glance-overview
>
> Best Regards,
> --
> Qiu Yu
> http://www.unicell.info
>
>
> On Fri, Aug 31, 2012 at 3:54 PM, Trinath Somanchi <
> trinath.somanchi [at] gmail> wrote:
>
>> Hi Unicell-'
>>
>> But still I get the same error.
>>
>> When I issue the glance command, the following warning is issued.
>>
>> "WARNING! This tool is deprecated in favor of python-glanceclient..."
>>
>> Can any one help me on how to resolve the issue.
>>
>> -
>> TNS
>>
>> On Thu, Aug 30, 2012 at 8:47 PM, unicell <unicell [at] gmail> wrote:
>>
>>> Hi Trinath,
>>>
>>> For the first db_sync issue you mentioned, it seems to be caused by
>>> Folsom version of glance-manage db_sync, which is caused "glance-manage
>>> db_sync" followed by "glance version_control 0". And I can duplicate it at
>>> my side.
>>>
>>> Brian is working on another issue (
>>> https://bugs.launchpad.net/glance/+bug/1042925 ), the proposed solution
>>> might be helpful for this issue, I think.
>>>
>>> For now, as a workaround, you can simply run "glance-manage db_sync",
>>> and no need for "glance-manage version_control 0". "glance-manage db_sync"
>>> command alone is enough to create the database model.
>>>
>>> For the second issue you mentioned, "glance index" is deprecated in
>>> Folsom. You can now refer to "glance image-list" and "glance --help" for
>>> more information.
>>>
>>> Best Regards,
>>> --
>>> Qiu Yu
>>> http://www.unicell.info
>>>
>>>
>>>
>>> On Thu, Aug 30, 2012 at 5:42 PM, Trinath Somanchi <
>>> trinath.somanchi [at] gmail> wrote:
>>>
>>>> Hi-
>>>>
>>>> This issue is resolved, reset the mysql passcode for glance.
>>>>
>>>> But struck with another issue, 'glance index' command.
>>>>
>>>> I have issued 'glance index' command to check the accuracy of my glance
>>>> installations.
>>>>
>>>> But I got the following error
>>>>
>>>> /opt/stack/glance/glance/openstack/common/version.py:22: UserWarning:
>>>> Module glance was already imported from
>>>> /opt/stack/glance/glance/__init__.pyc, but
>>>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>>>> added to sys.path
>>>> import pkg_resources
>>>> WARNING! This tool is deprecated in favor of python-glanceclient (see
>>>> http://github.com/openstack/python-glanceclient).
>>>> Failed to show index. Got error:
>>>> [Errno 111] Connection refused
>>>>
>>>>
>>>> Can any one help me on solving this issue.
>>>>
>>>> -
>>>> TNS
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Aug 29, 2012 at 10:25 PM, Trinath Somanchi <
>>>> trinath.somanchi [at] gmail> wrote:
>>>>
>>>>> Hi-
>>>>> here are my steps:
>>>>>
>>>>> [1] I have just downloaded the tar.gz file of glance
>>>>> [2] untar and run the following commands, python setup.py build ,
>>>>> python setup.py install
>>>>> [3] create the galnce db in mysql manually.
>>>>> [4] previously done with keystone work as specified in the ESSESX
>>>>> release, since I dont have folsom-3 specific document to go with,
>>>>> [5] updated glance-registry.conf, glance-api-paste.ini,
>>>>> glance-registry-api.ini (some difference in file name, as I did not
>>>>> remember them) with SQL information.
>>>>> [6] run command ' glance-manage versiont_control 0'
>>>>> [7] run command 'glance-manage db_sync'
>>>>>
>>>>> This is the complete set of order of steps I have used, and at the end
>>>>> of the 7th step, I got the below error.
>>>>>
>>>>> Can you please guide me on troubleshooting the issue.
>>>>>
>>>>> Thanking you the reply.
>>>>>
>>>>> -
>>>>> TNS.
>>>>>
>>>>>
>>>>> On Wed, Aug 29, 2012 at 8:12 PM, Brian Waldon <bcwaldon [at] gmail>wrote:
>>>>>
>>>>>> Can you share the sequence of commands you used during the install
>>>>>> process?
>>>>>>
>>>>>>
>>>>>> On Aug 29, 2012, at 3:18 AM, Trinath Somanchi wrote:
>>>>>>
>>>>>> > Hi-
>>>>>> >
>>>>>> > I have installed Openstack Folsom-3 Glance for my testing and found
>>>>>> this error while db sync.
>>>>>> >
>>>>>> > /usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py:8:
>>>>>> UserWarning: Module glance was already imported from
>>>>>> /opt/stack/glance/glance/__init__.pyc, but
>>>>>> /usr/local/lib/python2.7/dist-packages/glance-2012.2-py2.7.egg is being
>>>>>> added to sys.path
>>>>>> > import pkg_resources
>>>>>> > Traceback (most recent call last):
>>>>>> > File "./bin/glance-manage", line 131, in <module>
>>>>>> > main()
>>>>>> > File "./bin/glance-manage", line 127, in main
>>>>>> > dispatch_cmd(args)
>>>>>> > File "./bin/glance-manage", line 103, in dispatch_cmd
>>>>>> > cmd_func(args)
>>>>>> > File "./bin/glance-manage", line 91, in do_db_sync
>>>>>> > glance.db.sqlalchemy.migration.db_sync(version, current_version)
>>>>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line
>>>>>> 124, in db_sync
>>>>>> > upgrade(version=version)
>>>>>> > File "/opt/stack/glance/glance/db/sqlalchemy/migration.py", line
>>>>>> 67, in upgrade
>>>>>> > return versioning_api.upgrade(sql_connection, repo_path,
>>>>>> version)
>>>>>> > File
>>>>>> "/usr/local/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/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py",
>>>>>> line 159, in with_engine
>>>>>> > return f(*a, **kw)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line
>>>>>> 366, in _migrate
>>>>>> > schema.runchange(ver, change, changeset.step)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line
>>>>>> 91, in runchange
>>>>>> > change.run(self.engine, step)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py",
>>>>>> line 145, in run
>>>>>> > script_func(engine)
>>>>>> > File
>>>>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/versions/001_add_images_table.py",
>>>>>> line 49, in upgrade
>>>>>> > create_tables(tables)
>>>>>> > File
>>>>>> "/opt/stack/glance/glance/db/sqlalchemy/migrate_repo/schema.py", line 96,
>>>>>> in create_tables
>>>>>> > table.create()
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 594, in
>>>>>> create
>>>>>> > checkfirst=checkfirst)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>>> 2303, in _run_visitor
>>>>>> > conn._run_visitor(visitorcallable, element, **kwargs)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>>> 1973, in _run_visitor
>>>>>> > **kwargs).traverse_single(element)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line
>>>>>> 106, in traverse_single
>>>>>> > return meth(obj, **kw)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86,
>>>>>> in visit_table
>>>>>> > self.connection.execute(schema.CreateTable(table))
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>>> 1449, in execute
>>>>>> > params)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>>> 1542, in _execute_ddl
>>>>>> > compiled
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>>> 1698, in _execute_context
>>>>>> > context)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
>>>>>> 1691, in _execute_context
>>>>>> > context)
>>>>>> > File
>>>>>> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
>>>>>> 331, 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
>>>>>> (is_public IN (0, 1)), \n\tCHECK (deleted IN (0, 1))\n)\n\n' ()
>>>>>> >
>>>>>> > Can any one help me on troubleshooting the same.
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > --
>>>>>> > Regards,
>>>>>> > ----------------------------------------------
>>>>>> > Trinath Somanchi,
>>>>>> > +91 9866 235 130
>>>>>> >
>>>>>> > _______________________________________________
>>>>>> > Mailing list: https://launchpad.net/~openstack
>>>>>> > Post to : openstack [at] lists
>>>>>> > Unsubscribe : https://launchpad.net/~openstack
>>>>>> > More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> ----------------------------------------------
>>>>> Trinath Somanchi,
>>>>> +91 9866 235 130
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> ----------------------------------------------
>>>> Trinath Somanchi,
>>>> +91 9866 235 130
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~openstack
>>>> Post to : openstack [at] lists
>>>> Unsubscribe : https://launchpad.net/~openstack
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>
>>
>> --
>> Regards,
>> ----------------------------------------------
>> Trinath Somanchi,
>> +91 9866 235 130
>>
>>
>


--
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.