← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1459791] [NEW] Juno to Kilo upgrade breaks default domain id

 

Public bug reported:

Hello,

Upgrading from Keystone Juno to Kilo breaks my build.
I have had close looks warnings and debug output in keystone.log and read notes on https://wiki.openstack.org/wiki/ReleaseNotes/Kilo#OpenStack_Identity_.28Keystone.29 but without any luck, I could simply bypass this but it's here for a reason.

2015-05-28 22:51:59.400 1559 ERROR keystone.common.wsgi [-] 'NoneType' object has no attribute 'get'
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi Traceback (most recent call last):
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 239, in __call__
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     result = method(context, **params)
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/controllers.py", line 51, in get_users
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     return {'users': self.v3_to_v2_user(user_list)}
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 309, in v3_to_v2_user
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     return [_normalize_and_filter_user_properties(x) for x in ref]
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 301, in _normalize_and_filter_user_properties
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     V2Controller.filter_domain(ref)
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 235, in filter_domain
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     if ref['domain'].get('id') != CONF.identity.default_domain_id:
2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi AttributeError: 'NoneType' object has no attribute 'get'

It occurs here "/usr/lib/python2.7/site-
packages/keystone/common/controller.py", line 235

 @staticmethod
    def filter_domain(ref):
        """Remove domain since v2 calls are not domain-aware.

        V3 Fernet tokens builds the users with a domain in the token data.
        This method will ensure that users create in v3 belong to the default
        domain.

        """
        if 'domain' in ref:
            if ref['domain'].get('id') != CONF.identity.default_domain_id:
                raise exception.Unauthorized(
                    _('Non-default domain is not supported'))
            del ref['domain']
        return ref

Configuration:
[DEFAULT]
debug = false
verbose = true
[assignment]
[auth]
[cache]
[catalog]
[credential]
[database]
connection=mysql://keystone:xxx@xxx/keystone
[domain_config]
[endpoint_filter]
[endpoint_policy]
[eventlet_server]
[eventlet_server_ssl]
[federation]
[fernet_tokens]
[identity]
[identity_mapping]
[kvs]
[ldap]
[matchmaker_redis]
[matchmaker_ring]
[memcache]
servers = localhost:11211
[oauth1]
[os_inherit]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[paste_deploy]
[policy]
[resource]
[revoke]
driver = keystone.contrib.revoke.backends.sql.Revoke
[role]
[saml]
[signing]
[ssl]
[token]
provider = keystone.token.providers.uuid.Provider
driver = keystone.token.persistence.backends.memcache.Token
[trust]

Best regards

** Affects: keystone
     Importance: Undecided
         Status: New

** Description changed:

  Hello,
  
  Upgrading from Keystone Juno to Kilo breaks my build.
  I have had close looks warnings and debug output in keystone.log and read notes on https://wiki.openstack.org/wiki/ReleaseNotes/Kilo#OpenStack_Identity_.28Keystone.29 but without any luck, I could simply bypass this but it's here for a reason.
  
  2015-05-28 22:51:59.400 1559 ERROR keystone.common.wsgi [-] 'NoneType' object has no attribute 'get'
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi Traceback (most recent call last):
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 239, in __call__
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     result = method(context, **params)
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/controllers.py", line 51, in get_users
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     return {'users': self.v3_to_v2_user(user_list)}
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 309, in v3_to_v2_user
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     return [_normalize_and_filter_user_properties(x) for x in ref]
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 301, in _normalize_and_filter_user_properties
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     V2Controller.filter_domain(ref)
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 235, in filter_domain
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     if ref['domain'].get('id') != CONF.identity.default_domain_id:
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi AttributeError: 'NoneType' object has no attribute 'get'
  
  It occurs here "/usr/lib/python2.7/site-
  packages/keystone/common/controller.py", line 235
  
-  @staticmethod
-     def filter_domain(ref):
-         """Remove domain since v2 calls are not domain-aware.
+  @staticmethod
+     def filter_domain(ref):
+         """Remove domain since v2 calls are not domain-aware.
  
-         V3 Fernet tokens builds the users with a domain in the token data.
-         This method will ensure that users create in v3 belong to the default
-         domain.
+         V3 Fernet tokens builds the users with a domain in the token data.
+         This method will ensure that users create in v3 belong to the default
+         domain.
  
-         """
-         if 'domain' in ref:
-             if ref['domain'].get('id') != CONF.identity.default_domain_id:
-                 raise exception.Unauthorized(
-                     _('Non-default domain is not supported'))
-             del ref['domain']
-         return ref
- 
+         """
+         if 'domain' in ref:
+             if ref['domain'].get('id') != CONF.identity.default_domain_id:
+                 raise exception.Unauthorized(
+                     _('Non-default domain is not supported'))
+             del ref['domain']
+         return ref
  
  Configuration:
  [DEFAULT]
  debug = false
  verbose = true
  [assignment]
  [auth]
  [cache]
  [catalog]
  [credential]
  [database]
- connection=mysql://keystone:dee03eae7d8f92f5cd22@mariadb1-os1/keystone
+ connection=mysql://keystone:xxx@xxx/keystone
  [domain_config]
  [endpoint_filter]
  [endpoint_policy]
  [eventlet_server]
  [eventlet_server_ssl]
  [federation]
  [fernet_tokens]
  [identity]
  [identity_mapping]
  [kvs]
  [ldap]
  [matchmaker_redis]
  [matchmaker_ring]
  [memcache]
  servers = localhost:11211
  [oauth1]
  [os_inherit]
  [oslo_messaging_amqp]
  [oslo_messaging_qpid]
  [oslo_messaging_rabbit]
  [oslo_middleware]
  [oslo_policy]
  [paste_deploy]
  [policy]
  [resource]
  [revoke]
  driver = keystone.contrib.revoke.backends.sql.Revoke
  [role]
  [saml]
  [signing]
  [ssl]
  [token]
  provider = keystone.token.providers.uuid.Provider
  driver = keystone.token.persistence.backends.memcache.Token
  [trust]
  
  Best regards

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1459791

Title:
  Juno to Kilo upgrade breaks default domain id

Status in OpenStack Identity (Keystone):
  New

Bug description:
  Hello,

  Upgrading from Keystone Juno to Kilo breaks my build.
  I have had close looks warnings and debug output in keystone.log and read notes on https://wiki.openstack.org/wiki/ReleaseNotes/Kilo#OpenStack_Identity_.28Keystone.29 but without any luck, I could simply bypass this but it's here for a reason.

  2015-05-28 22:51:59.400 1559 ERROR keystone.common.wsgi [-] 'NoneType' object has no attribute 'get'
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi Traceback (most recent call last):
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 239, in __call__
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     result = method(context, **params)
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/identity/controllers.py", line 51, in get_users
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     return {'users': self.v3_to_v2_user(user_list)}
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 309, in v3_to_v2_user
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     return [_normalize_and_filter_user_properties(x) for x in ref]
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 301, in _normalize_and_filter_user_properties
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     V2Controller.filter_domain(ref)
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi   File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 235, in filter_domain
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi     if ref['domain'].get('id') != CONF.identity.default_domain_id:
  2015-05-28 22:51:59.400 1559 TRACE keystone.common.wsgi AttributeError: 'NoneType' object has no attribute 'get'

  It occurs here "/usr/lib/python2.7/site-
  packages/keystone/common/controller.py", line 235

   @staticmethod
      def filter_domain(ref):
          """Remove domain since v2 calls are not domain-aware.

          V3 Fernet tokens builds the users with a domain in the token data.
          This method will ensure that users create in v3 belong to the default
          domain.

          """
          if 'domain' in ref:
              if ref['domain'].get('id') != CONF.identity.default_domain_id:
                  raise exception.Unauthorized(
                      _('Non-default domain is not supported'))
              del ref['domain']
          return ref

  Configuration:
  [DEFAULT]
  debug = false
  verbose = true
  [assignment]
  [auth]
  [cache]
  [catalog]
  [credential]
  [database]
  connection=mysql://keystone:xxx@xxx/keystone
  [domain_config]
  [endpoint_filter]
  [endpoint_policy]
  [eventlet_server]
  [eventlet_server_ssl]
  [federation]
  [fernet_tokens]
  [identity]
  [identity_mapping]
  [kvs]
  [ldap]
  [matchmaker_redis]
  [matchmaker_ring]
  [memcache]
  servers = localhost:11211
  [oauth1]
  [os_inherit]
  [oslo_messaging_amqp]
  [oslo_messaging_qpid]
  [oslo_messaging_rabbit]
  [oslo_middleware]
  [oslo_policy]
  [paste_deploy]
  [policy]
  [resource]
  [revoke]
  driver = keystone.contrib.revoke.backends.sql.Revoke
  [role]
  [saml]
  [signing]
  [ssl]
  [token]
  provider = keystone.token.providers.uuid.Provider
  driver = keystone.token.persistence.backends.memcache.Token
  [trust]

  Best regards

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


Follow ups

References