Ask Your Question
0

Local variable 'domain_ref' referenced before assignment

asked 2014-01-30 07:20:54 -0500

marcos-fermin-lobo gravatar image

On keystone havana version. If you configure keystone.conf like this:

... domain_specific_drivers_enabled = True domain_config_dir = /etc/keystone/domains ...

After restart openstack-keystone service, if you execute this command for the first:

$keystone user-list

System raises this error

2014-01-29 15:57:46.606 9939 WARNING keystone.identity.core [-] Running an experimental and unsupported configuration (domain_specific_drivers_enabled = True); this will result in known issues. 2014-01-29 15:57:46.659 9939 WARNING keystone.identity.core [-] Invalid domain name (dominioldap) found in config file name 2014-01-29 15:57:46.659 9939 ERROR keystone.common.wsgi [-] local variable 'domain_ref' referenced before assignment 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi Traceback (most recent call last): 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/wsgi.py", line 238, in __call__ 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi result = method(context, **params) 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/token/controllers.py", line 94, in authenticate 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi context, auth) 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/token/controllers.py", line 257, in _authenticate_local 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi username, DEFAULT_DOMAIN_ID) 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/core.py", line 176, in wrapper 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi self.driver, self.assignment_api) 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/core.py", line 128, in setup_domain_drivers 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi names[1]) 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/core.py", line 96, in _load_config 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi if domain_ref: 2014-01-29 15:57:46.659 9939 TRACE keystone.common.wsgi UnboundLocalError: local variable 'domain_ref' referenced before assignment

This problem is derived from the previous WARNING about the invalid domain name. However, there is a codification problem on /usr/lib/python2.6/site-packages/keystone/identity/core.py line 104, because if the DomainNotFound is raised (whatever reason) the "domain_ref" variable will never been initialized. Therefore on line 110 an uncontrolled error " local variable 'domain_ref' referenced before assignment" will be raised.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-12-02 16:26:32 -0500

paulreiber gravatar image

This is a known bug, which has been addressed in icehouse. https://bugs.launchpad.net/keystone/+...

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: 2014-01-30 07:20:54 -0500

Seen: 251 times

Last updated: Dec 02 '14