Reviewed:  https://review.openstack.org/549870
Committed: 
https://git.openstack.org/cgit/openstack/keystone/commit/?id=852bd45c94df4a5c5ccb1e42077ec4f2d1a57272
Submitter: Zuul
Branch:    master

commit 852bd45c94df4a5c5ccb1e42077ec4f2d1a57272
Author: Mark Hamzy <ha...@us.ibm.com>
Date:   Mon Mar 5 15:18:31 2018 -0600

    Fix formatting of ImportError
    
    Fix formatting of ImportError when using a driver not found in the list
    of token providers.
    
    Change-Id: I0ac8ac199aeebd20960ad0654461f1f81c4d7da0
    Closes-bug: 1753584


** Changed in: keystone
       Status: In Progress => Fix Released

-- 
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/1753584

Title:
  incorrect ImportError message raised

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  Logs show:

  2018-03-05 20:50:01.665 35 WARNING stevedore.named [-] Could not load uuid
  2018-03-05 20:50:01.666 35 CRITICAL keystone [-] Unhandled error: 
ImportError: (u'Unable to find %(name)r driver in %(namespace)r.',
   {'namespace': 'keystone.token.provider', 'name': 'uuid'})
  2018-03-05 20:50:01.666 35 ERROR keystone Traceback (most recent call last):
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/bin/keystone-manage", line 10, in <module>
  2018-03-05 20:50:01.666 35 ERROR keystone     sys.exit(main())
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/cmd/manage.py", line 
45, 
  in main
  2018-03-05 20:50:01.666 35 ERROR keystone     cli.main(argv=sys.argv, 
config_files=config_files)
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/cmd/cli.py", line 
1349, i
  n main
  2018-03-05 20:50:01.666 35 ERROR keystone     CONF.command.cmd_class.main()
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/cmd/cli.py", line 
397, in
   main
  2018-03-05 20:50:01.666 35 ERROR keystone     klass = cls()
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/cmd/cli.py", line 66, 
in 
  __init__
  2018-03-05 20:50:01.666 35 ERROR keystone     self.load_backends()
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/cmd/cli.py", line 
129, in
   load_backends
  2018-03-05 20:50:01.666 35 ERROR keystone     drivers = 
backends.load_backends()
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/server/backends.py", 
line
   53, in load_backends
  2018-03-05 20:50:01.666 35 ERROR keystone     drivers = {d._provides_api: d() 
for d in managers}
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/server/backends.py", 
line
   53, in <dictcomp>
  2018-03-05 20:50:01.666 35 ERROR keystone     drivers = {d._provides_api: d() 
for d in managers}
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/token/provider.py", 
line 
  65, in __init__
  2018-03-05 20:50:01.666 35 ERROR keystone     super(Manager, 
self).__init__(CONF.token.provider)
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/common/manager.py", 
line 
  181, in __init__
  2018-03-05 20:50:01.666 35 ERROR keystone     self.driver = 
load_driver(self.driver_namespace, driver_name)
  2018-03-05 20:50:01.666 35 ERROR keystone   File 
"/var/lib/kolla/venv/lib/python2.7/site-packages/keystone/common/manager.py", 
line 
  81, in load_driver
  2018-03-05 20:50:01.666 35 ERROR keystone     raise ImportError(msg, {'name': 
driver_name, 'namespace': namespace})
  2018-03-05 20:50:01.666 35 ERROR keystone ImportError: (u'Unable to find 
%(name)r driver in %(namespace)r.', {'namespace': 'keystone
  .token.provider', 'name': 'uuid'})
  2018-03-05 20:50:01.666 35 ERROR keystone 

  which is misleading.  The correct error should be:

  2018-03-05 20:50:25.517 47 ERROR keystone ImportError: Unable to find
  'uuid' driver in 'keystone.token.provider'.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to