keystone install failed, meet error 'got an unexpected keyword argument 'namedtuple_as_object''

Bug #1361125 reported by Qiu Hua Qiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned

Bug Description

My env:
OS: RHEL 6.5 x86-64
Pthon: 2.6.6
Source branch: master

error log:
2014-08-25 07:30:34.256 | 5298 DEBUG migrate.versioning.repository [-] Repository /opt/stack/keystone/keystone/common/sql/migrate_repo loaded successfully __init__ /usr/lib/python2.6/site-packages/migrate/versioning/repository.py:82
2014-08-25 07:30:34.256 | 5298 DEBUG migrate.versioning.repository [-] Config: {'db_settings': {'__name__': 'db_settings', 'use_timestamp_numbering': 'False', 'required_dbs': '[]', 'version_table': 'migrate_version', 'repository_id': 'keystone'}} __init__ /usr/lib/python2.6/site-packages/migrate/versioning/repository.py:83
2014-08-25 07:30:34.256 | 5298 INFO migrate.versioning.api [-] 35 -> 36...
2014-08-25 07:30:35.142 | 5298 CRITICAL keystone [-] TypeError: __init__() got an unexpected keyword argument 'namedtuple_as_object'
2014-08-25 07:30:35.142 | 5298 TRACE keystone Traceback (most recent call last):
2014-08-25 07:30:35.142 | 5298 TRACE keystone File "/opt/stack/keystone/bin/keystone-manage", line 44, in <module>
2014-08-25 07:30:35.142 | 5298 TRACE keystone cli.main(argv=sys.argv, config_files=config_files)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/opt/stack/keystone/keystone/cli.py", line 292, in main
2014-08-25 07:30:35.143 | 5298 TRACE keystone CONF.command.cmd_class.main()
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/opt/stack/keystone/keystone/cli.py", line 74, in main
2014-08-25 07:30:35.143 | 5298 TRACE keystone migration_helpers.sync_database_to_version(extension, version)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/opt/stack/keystone/keystone/common/sql/migration_helpers.py", line 204, in sync_database_to_version
2014-08-25 07:30:35.143 | 5298 TRACE keystone _sync_common_repo(version)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/opt/stack/keystone/keystone/common/sql/migration_helpers.py", line 160, in _sync_common_repo
2014-08-25 07:30:35.143 | 5298 TRACE keystone init_version=init_version)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/usr/lib/python2.6/site-packages/oslo/db/sqlalchemy/migration.py", line 79, in db_sync
2014-08-25 07:30:35.143 | 5298 TRACE keystone return versioning_api.upgrade(engine, repository, version)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/usr/lib/python2.6/site-packages/migrate/versioning/api.py", line 186, in upgrade
2014-08-25 07:30:35.143 | 5298 TRACE keystone return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "<string>", line 2, in _migrate
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/usr/lib/python2.6/site-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
2014-08-25 07:30:35.143 | 5298 TRACE keystone return f(*a, **kw)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/usr/lib/python2.6/site-packages/migrate/versioning/api.py", line 366, in _migrate
2014-08-25 07:30:35.143 | 5298 TRACE keystone schema.runchange(ver, change, changeset.step)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/usr/lib/python2.6/site-packages/migrate/versioning/schema.py", line 93, in runchange
2014-08-25 07:30:35.143 | 5298 TRACE keystone change.run(self.engine, step)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/usr/lib/python2.6/site-packages/migrate/versioning/script/py.py", line 148, in run
2014-08-25 07:30:35.143 | 5298 TRACE keystone script_func(engine)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/opt/stack/keystone/keystone/common/sql/migrate_repo/versions/036_havana.py", line 283, in upgrade
2014-08-25 07:30:35.143 | 5298 TRACE keystone domain.insert(migration_helpers.get_default_domain()).execute()
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/opt/stack/keystone/keystone/common/sql/migration_helpers.py", line 47, in get_default_domain
2014-08-25 07:30:35.143 | 5298 TRACE keystone 'extra': jsonutils.dumps({'description': 'Owns users and tenants '
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/opt/stack/keystone/keystone/openstack/common/jsonutils.py", line 172, in dumps
2014-08-25 07:30:35.143 | 5298 TRACE keystone return json.dumps(value, default=default, **kwargs)
2014-08-25 07:30:35.143 | 5298 TRACE keystone File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py", line 237, in dumps
2014-08-25 07:30:35.143 | 5298 TRACE keystone **kw).encode(obj)
2014-08-25 07:30:35.143 | 5298 TRACE keystone TypeError: __init__() got an unexpected keyword argument 'namedtuple_as_object'
2014-08-25 07:30:35.143 | 5298 TRACE keystone
2014-08-25 07:30:35.209 | + exit_trap
2014-08-25 07:30:35.209 | + local r=1
2014-08-25 07:30:35.210 | ++ jobs -p
2014-08-25 07:30:35.210 | + jobs=
2014-08-25 07:30:35.210 | + [[ -n '' ]]
2014-08-25 07:30:35.210 | + kill_spinner
2014-08-25 07:30:35.210 | + '[' '!' -z '' ']'
2014-08-25 07:30:35.210 | + [[ 1 -ne 0 ]]
2014-08-25 07:30:35.210 | + echo 'Error on exit'
2014-08-25 07:30:35.210 | Error on exit

Tags: db
Revision history for this message
Lance Bragstad (lbragstad) wrote :

looks like this may have broke with a recent sync from Oslo:

https://github.com/openstack/keystone/commit/94efafd6d6066f63a9226a6b943d0e86699e7edd#diff-a5549dd8762c0390386427fa7b2ff209

We use jsonutils from oslo-incubator in the migration_helpers.py script and uses jsonutils.dumps() from o-i.

https://github.com/openstack/keystone/blob/de2c6e15b9f45969c307ac6d1f634d933537aeaa/keystone/common/sql/migration_helpers.py#L47

The 'namedtuple_as_object' change went into o-i here https://review.openstack.org/#/c/113760/

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

Do we just need to sync again? Is there anything else to fix in keystone?

Changed in keystone:
status: New → Incomplete
Revision history for this message
Dolph Mathews (dolph) wrote :

Latest change I see in keystone.openstack.common.jsonutils is August 17th

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

I stand corrected. Keystone has the fix above in master as of 94efafd6 https://review.openstack.org/#/c/114863/

Changed in keystone:
status: Incomplete → Invalid
Revision history for this message
Brant Knudson (blk-u) wrote :

Dolph - it's 94efafd6 that introduced the problem in Keystone. This is a duplicate of bug 1361230 .

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.