← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1713574] Re: keystone middleware and keystoneauth1 errors with python 3 and memcache_security_strategy=ENCRYPT

 

This exception seems specific to keystonemiddleware, but adding
keystoneauth to the report based on the original bug title.

** Summary changed:

- keystone middleware and keystoneauth1 errors with pyton 3 and memcache_security_strategy=ENCRYPT
+ keystone middleware and keystoneauth1 errors with python 3 and memcache_security_strategy=ENCRYPT

** Also affects: keystoneauth
   Importance: Undecided
       Status: New

** Also affects: keystonemiddleware
   Importance: Undecided
       Status: New

** Changed in: keystone
       Status: New => Invalid

** Summary changed:

- keystone middleware and keystoneauth1 errors with python 3 and memcache_security_strategy=ENCRYPT
+ python 3 errors with memcache

** Changed in: keystonemiddleware
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1713574

Title:
  python 3 errors with memcache enabled

Status in OpenStack Identity (keystone):
  Invalid
Status in keystoneauth:
  New
Status in keystonemiddleware:
  New

Bug description:
  Hi, we are using gnocchi 4 running the following:

  keystoneauth1 (3.1.0)
  keystonemiddleware (4.14.0)
  python-keystoneclient (3.13.0)

  with python 3.5.4

  on a configuration file like this :

  [keystone_authtoken]
  signing_dir = /var/cache/gnocchi
  project_domain_name = default
  user_domain_name = default
  signing_dir = /var/cache/gnocchi
  auth_uri = http://yourmomkeystone.com:5000/v3
  auth_url = http://yourmomkeystone.com:35357/v3
  project_name = admin
  password = porotito
  username = cloudadmin
  auth_type = password
  auth_type = password
  memcached_servers = yourmommecached:11211
  insecure=true
  endpoint_type = internal
  region_name = yourmomregion
  memcache_security_strategy = ENCRYPT
  memcache_secret_key = lalalalalalaalala

  After the api starts, the token is asked successfully, but we have
  this stacktrace when trying to use memcached.

  2017-08-28 20:12:41,029 [7] CRITICAL root: Traceback (most recent call last):
    File "/usr/local/lib/python3.5/site-packages/webob/dec.py", line 131, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python3.5/site-packages/webob/dec.py", line 196, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/local/lib/python3.5/site-packages/oslo_middleware/base.py", line 131, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python3.5/site-packages/webob/request.py", line 1316, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python3.5/site-packages/webob/request.py", line 1280, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/local/lib/python3.5/site-packages/paste/urlmap.py", line 216, in __call__
      return app(environ, start_response)
    File "/usr/local/lib/python3.5/site-packages/webob/dec.py", line 131, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python3.5/site-packages/webob/dec.py", line 196, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/local/lib/python3.5/site-packages/oslo_middleware/base.py", line 131, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python3.5/site-packages/webob/request.py", line 1316, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python3.5/site-packages/webob/request.py", line 1280, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/local/lib/python3.5/site-packages/webob/dec.py", line 131, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python3.5/site-packages/webob/dec.py", line 196, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/__init__.py", line 331, in __call__
      response = self.process_request(req)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/__init__.py", line 622, in process_request
      resp = super(AuthProtocol, self).process_request(request)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/__init__.py", line 404, in process_request
      allow_expired=allow_expired)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/__init__.py", line 434, in _do_fetch_token
      data = self.fetch_token(token, **kwargs)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/__init__.py", line 736, in fetch_token
      cached = self._cache_get_hashes(token_hashes)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/__init__.py", line 719, in _cache_get_hashes
      cached = self._token_cache.get(token)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/_cache.py", line 212, in get
      key, context = self._get_cache_key(token_id)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/_cache.py", line 268, in _get_cache_key
      self._security_strategy)
    File "/usr/local/lib/python3.5/site-packages/keystonemiddleware/auth_token/_memcache_crypt.py", line 101, in derive_keys
      digest = hmac.new(secret, token + strategy, HASH_FUNCTION).digest()
  TypeError: Can't convert 'bytes' object to str implicitly

  any help ?

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1713574/+subscriptions


References