keystone-manage db_sync command failed

Bug #1378270 reported by Swami Reddy
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned

Bug Description

When I ran stack.sh from the latest devstack, the below error shown:
==
2014-10-07 09:21:50.826 | + mysql -uroot -pcloud -h127.0.0.1 -e 'CREATE DATABASE keystone CHARACTER SET utf8;'
2014-10-07 09:21:50.831 | + /opt/stack/keystone/bin/keystone-manage db_sync
2014-10-07 09:21:51.435 | Traceback (most recent call last):
2014-10-07 09:21:51.436 | File "/opt/stack/keystone/bin/keystone-manage", line 30, in <module>
2014-10-07 09:21:51.436 | from keystone import cli
2014-10-07 09:21:51.436 | File "/opt/stack/keystone/keystone/cli.py", line 31, in <module>
2014-10-07 09:21:51.436 | from keystone import token
2014-10-07 09:21:51.437 | File "/opt/stack/keystone/keystone/token/__init__.py", line 15, in <module>
2014-10-07 09:21:51.437 | from keystone.token import controllers # noqa
2014-10-07 09:21:51.437 | File "/opt/stack/keystone/keystone/token/controllers.py", line 31, in <modu le>
2014-10-07 09:21:51.437 | from keystone.token import provider
2014-10-07 09:21:51.438 | File "/opt/stack/keystone/keystone/token/provider.py", line 37, in <module>
2014-10-07 09:21:51.438 | from keystone.token import persistence
2014-10-07 09:21:51.438 | File "/opt/stack/keystone/keystone/token/persistence/__init__.py", line 13, in <module>
2014-10-07 09:21:51.439 | from keystone.token.persistence.core import * # noqa
2014-10-07 09:21:51.439 | File "/opt/stack/keystone/keystone/token/persistence/core.py", line 44, in <module>
2014-10-07 09:21:51.439 | class PersistenceManager(manager.Manager):
2014-10-07 09:21:51.439 | File "/opt/stack/keystone/keystone/token/persistence/core.py", line 58, in PersistenceManager
2014-10-07 09:21:51.440 | what='token_api.unique_id')
2014-10-07 09:21:51.440 | File "/opt/stack/keystone/keystone/openstack/common/versionutils.py", line 128, in __call__
2014-10-07 09:21:51.440 | @six.wraps(func_or_cls)
2014-10-07 09:21:51.440 | AttributeError: 'module' object has no attribute 'wraps'
2014-10-07 09:21:51.479 | + exit_trap
2014-10-07 09:21:51.479 | + local r=1
2014-10-07 09:21:51.479 | ++ jobs -p
2014-10-07 09:21:51.480 | + jobs=
2014-10-07 09:21:51.480 | + [[ -n '' ]]
2014-10-07 09:21:51.480 | + kill_spinner
2014-10-07 09:21:51.481 | + '[' '!' -z '' ']'
2014-10-07 09:21:51.481 | + [[ 1 -ne 0 ]]
2014-10-07 09:21:51.481 | + echo 'Error on exit'
2014-10-07 09:21:51.481 | Error on exit
2014-10-07 09:21:51.481 | + [[ -z /opt/stack/logs ]]
2014-10-07 09:21:51.481 | + /home/swami/devstack/tools/worlddump.py -d /opt/stack/logs
2014-10-07 09:21:51.526 | + exit 1
==========

Looks like this is similar to https://bugs.launchpad.net/nova/+bug/1083054

Swami Reddy (swamireddy)
tags: added: keystone
affects: nova → keystone
Revision history for this message
Dolph Mathews (dolph) wrote :

I was only able to reproduce this by installing six v1.6.1 which is explicitly unsupported by keystone (which requires >= v1.7.0 in requirements.txt). The latest version of six is v1.8.0:

  https://pypi.python.org/pypi/six

Can you confirm the version of six that you're running?

  $ python -c "import six; print(six.__version__)"

tags: removed: keystone
Changed in keystone:
status: New → Incomplete
Revision history for this message
Swami Reddy (swamireddy) wrote :

Iam using the latest six ie six-1.8.0 and still this problem seen

Revision history for this message
Vincent Hou (houshengbo) wrote :

It happens on my machine as well.

Revision history for this message
Swami Reddy (swamireddy) wrote :

Vincent Hou - As per the Dolph Mathews comment - check the version of six pkg. If you use the six version >= 1.7.0, it works.

Revision history for this message
Dolph Mathews (dolph) wrote :

Swami: thanks for the follow up! This one was a little befuddling :)

Changed in keystone:
status: Incomplete → Invalid
Revision history for this message
Swami Reddy (swamireddy) wrote :

Mathew: That's correct - Its confusing issue. Even though latest version of six installed using the easy_install, still this issue won't be fixed. This should be fixed using the Ubuntu package update manually.

Revision history for this message
Brianna Poulos (brianna-poulos) wrote :

I was having the same issue on Ubuntu 14.04 with the latest updates. I had version 1.5.2 installed, but using pip to try to upgrade it didn't work.

$ python -c "import six; print(six.__version__)"
1.5.2

I figured out exactly where it was being pulled from and deleted it.

$ python -v -c "import six; print(six.__version__)"
...
import six # from /usr/lib/python2.7/dist-packages/six.py
...
$ sudo rm -f /usr/lib/python2.7/dist-packages/six.py /usr/lib/python2.7/dist-packages/six.pyc

Python then used 1.8.0 from a different location (from /usr/local/lib instead of /usr/lib):

$ python -c "import six; print(six.__version__)"
1.8.0
$ python -v -c "import six; print(six.__version__)"
...
import six # precompiled from /usr/local/lib/python2.7/dist-packages/six.pyc
...

Revision history for this message
Swami Reddy (swamireddy) wrote : Re: [Bug 1378270] Re: keystone-manage db_sync command failed
Download full text (3.6 KiB)

As remember the stack.sh install the old version of six only. You can
update the apt repo with latest six version to work
On Nov 8, 2014 5:00 AM, "Gabriel Laupre" <email address hidden> wrote:

> This error comes from the python lib. You should clean you python lib
> and let ./stack.sh reinstall every thing. It worked for me.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1378270
>
> Title:
> keystone-manage db_sync command failed
>
> Status in OpenStack Identity (Keystone):
> Invalid
>
> Bug description:
> When I ran stack.sh from the latest devstack, the below error shown:
> ==
> 2014-10-07 09:21:50.826 | + mysql -uroot -pcloud -h127.0.0.1 -e 'CREATE
> DATABASE keystone CHARACTER SET utf8;'
> 2014-10-07 09:21:50.831 | + /opt/stack/keystone/bin/keystone-manage
> db_sync
> 2014-10-07 09:21:51.435 | Traceback (most recent call last):
> 2014-10-07 09:21:51.436 | File
> "/opt/stack/keystone/bin/keystone-manage", line 30, in <module>
> 2014-10-07 09:21:51.436 | from keystone import cli
> 2014-10-07 09:21:51.436 | File "/opt/stack/keystone/keystone/cli.py",
> line 31, in <module>
> 2014-10-07 09:21:51.436 | from keystone import token
> 2014-10-07 09:21:51.437 | File
> "/opt/stack/keystone/keystone/token/__init__.py", line 15, in <module>
> 2014-10-07 09:21:51.437 | from keystone.token import controllers #
> noqa
> 2014-10-07 09:21:51.437 | File
> "/opt/stack/keystone/keystone/token/controllers.py", line 31, in <modu
> le>
> 2014-10-07 09:21:51.437 | from keystone.token import provider
> 2014-10-07 09:21:51.438 | File
> "/opt/stack/keystone/keystone/token/provider.py", line 37, in <module>
> 2014-10-07 09:21:51.438 | from keystone.token import persistence
> 2014-10-07 09:21:51.438 | File
> "/opt/stack/keystone/keystone/token/persistence/__init__.py", line 13,
> in <module>
> 2014-10-07 09:21:51.439 | from keystone.token.persistence.core
> import * # noqa
> 2014-10-07 09:21:51.439 | File
> "/opt/stack/keystone/keystone/token/persistence/core.py", line 44, in
> <module>
> 2014-10-07 09:21:51.439 | class PersistenceManager(manager.Manager):
> 2014-10-07 09:21:51.439 | File
> "/opt/stack/keystone/keystone/token/persistence/core.py", line 58, in
> PersistenceManager
> 2014-10-07 09:21:51.440 | what='token_api.unique_id')
> 2014-10-07 09:21:51.440 | File
> "/opt/stack/keystone/keystone/openstack/common/versionutils.py", line
> 128, in __call__
> 2014-10-07 09:21:51.440 | @six.wraps(func_or_cls)
> 2014-10-07 09:21:51.440 | AttributeError: 'module' object has no
> attribute 'wraps'
> 2014-10-07 09:21:51.479 | + exit_trap
> 2014-10-07 09:21:51.479 | + local r=1
> 2014-10-07 09:21:51.479 | ++ jobs -p
> 2014-10-07 09:21:51.480 | + jobs=
> 2014-10-07 09:21:51.480 | + [[ -n '' ]]
> 2014-10-07 09:21:51.480 | + kill_spinner
> 2014-10-07 09:21:51.481 | + '[' '!' -z '' ']'
> 2014-10-07 09:21:51.481 | + [[ 1...

Read more...

Revision history for this message
Gil Vernik (gilv) wrote :

I have exactly the same problem.

Revision history for this message
Swami Reddy (swamireddy) wrote :

What version of six are you using?
==
$ python -c "import six; print(six.__version__)"
==

NOTE: pip install six latest version won't work. You just install the Ubuntu package of six should be updated to the latest version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.