Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1343143

Summary: When using "keystone-manage domain_config_upload" authentication breaks.
Product: Red Hat OpenStack Reporter: David Hill <dhill>
Component: openstack-keystoneAssignee: Adam Young <ayoung>
Status: CLOSED CURRENTRELEASE QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: low    
Version: 7.0 (Kilo)CC: akaris, dhill, jdennis, nkinder, srevivo
Target Milestone: ---Keywords: ZStream
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-03 23:04:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Hill 2016-06-06 15:30:49 UTC
Description of problem:
When using "keystone-manage domain_config_upload" authentication breaks and returns the following error message in the logs after running that command:

2016-05-20 16:24:43.538 29669 DEBUG keystone.common.ldap.core [-] LDAP init: url=ldap://ldapserver.com _common_ldap_initialization /usr/lib/python2.7/site-packages/keystone/common/ldap/core.py:576
2016-05-20 16:24:43.538 29669 DEBUG keystone.common.ldap.core [-] LDAP init: use_tls=True tls_cacertfile=/etc/pki/ca-trust/extracted/pem/allRAroot.crt tls_cacertdir=/etc/pki/ca-trust/extracted/pem/ tls_req_cert=2 tls_avail=1 _common_ldap_initialization /usr/lib/python2.7/site-packages/keystone/common/ldap/core.py:580
2016-05-20 16:24:43.538 29669 ERROR keystone.common.wsgi [-] an integer is required
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi Traceback (most recent call last):
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 238, in __call__
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     result = method(context, **params)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/auth/controllers.py", line 377, in authenticate_for_token
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     self.authenticate(context, auth_info, auth_context)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/auth/controllers.py", line 502, in authenticate
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     auth_context)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/auth/plugins/password.py", line 35, in authenticate
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     user_info = auth_plugins.UserAuthInfo.create(auth_payload, self.method)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/auth/plugins/core.py", line 106, in create
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     user_auth_info._validate_and_normalize_auth_data(auth_payload)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/auth/plugins/core.py", line 174, in _validate_and_normalize_auth_data
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     user_name, domain_ref['id'])
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 342, in wrapper
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     return f(self, *args, **kwargs)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 353, in wrapper
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     return f(self, *args, **kwargs)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 1040, in decorate
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     should_cache_fn)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 651, in get_or_create
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     async_creator) as value:
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 158, in __enter__
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     return self._enter()
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 98, in _enter
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     generated = self._enter_create(createdtime)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/dogpile/core/dogpile.py", line 149, in _enter_create
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     created = self.creator()
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 619, in gen_value
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     created_value = creator()
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 1036, in creator
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     return fn(*arg, **kw)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/core.py", line 773, in get_user_by_name
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     ref = driver.get_user_by_name(user_name, domain_id)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/backends/ldap.py", line 87, in get_user_by_name
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     return self.user.filter_attributes(self.user.get_by_name(user_name))
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 1497, in get_by_name
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     res = self.get_all(query)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 1891, in get_all
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     return super(EnabledEmuMixIn, self).get_all(ldap_filter)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 1505, in get_all
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     for x in self._ldap_get_all(ldap_filter)]
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 1459, in _ldap_get_all
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     with self.get_connection() as conn:
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 1271, in get_connection
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     pool_conn_lifetime=pool_conn_lifetime
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 886, in connect
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     pool_conn_lifetime=pool_conn_lifetime)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 695, in connect
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     debug_level=debug_level)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/ldap/core.py", line 583, in _common_ldap_initialization
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     ldap.set_option(ldap.OPT_DEBUG_LEVEL, debug_level)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib64/python2.7/site-packages/ldap/functions.py", line 132, in set_option
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     return _ldap_function_call(None,_ldap.set_option,option,invalue)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi   File "/usr/lib64/python2.7/site-packages/ldap/functions.py", line 63, in _ldap_function_call
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi     result = func(*args,**kwargs)
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi TypeError: an integer is required
2016-05-20 16:24:43.538 29669 TRACE keystone.common.wsgi
2016-05-20 16:24:43.541 29669 INFO eventlet.wsgi.server [-] 10.10.10.10 - - [20/May/2016 16:24:43] "POST /v3/auth/tokens HTTP/1.1" 400 288 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. You loaded the domain configuration files to the database
2. The keystone entries used an integer instead of a string



Actual results:
Authentication breaks

Expected results:
Authentication authenticates

Additional info:
I don't have a domain reproducer environment.

Comment 2 Andreas Karis 2016-06-17 01:00:04 UTC
This looks related to https://bugzilla.redhat.com/show_bug.cgi?id=1347394

Comment 3 Adam Young 2016-06-24 16:11:26 UTC
This seems to work OK in OSP8, so there must be a fix in the upstream.  It makes use of oslo-config, and the problem seems to be parsing in numeric values; they show as text instead since they are in quotes.