← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1645571] Re: keystone-manage mapping_populate fails when wrong domain name is given and gives unhandled exception

 

Reviewed:  https://review.openstack.org/404197
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=6b16e2cf88f775919eaf8f115986bcdc2aba1e68
Submitter: Jenkins
Branch:    master

commit 6b16e2cf88f775919eaf8f115986bcdc2aba1e68
Author: Boris Bobrov <bbobrov@xxxxxxxxxxxx>
Date:   Tue Nov 29 15:33:17 2016 +0300

    Print domain name in mapping_populate error message
    
    domain_id was not defined at the moment when it was referenced and
    it caused UnboundLocalError.
    
    Use domain name instead and test it.
    
    Change-Id: Ib351df0942025451994873e272861afec1b60dea
    Closes-Bug: 1645571


** 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/1645571

Title:
  keystone-manage mapping_populate fails when wrong domain name is given
  and gives unhandled exception

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  Running keystone-manage mapping_populate --domain-name <domain name> where no such domain name exists, fails silently with no error message displayed on screen.
  The logs from keystone.log is displayed below.

  2016-11-18 07:22:26.470 1384 CRITICAL keystone [req-a2de669b-a645-42b0-8af6-a36e1cf53c54 - - - - -] UnboundLocalError: local variable 'domain_id' referenced before assignment
  2016-11-18 07:22:26.470 1384 ERROR keystone Traceback (most recent call last):
  2016-11-18 07:22:26.470 1384 ERROR keystone   File "/usr/bin/keystone-manage", line 10, in <module>
  2016-11-18 07:22:26.470 1384 ERROR keystone     sys.exit(main())
  2016-11-18 07:22:26.470 1384 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/cmd/manage.py", line 43, in main
  2016-11-18 07:22:26.470 1384 ERROR keystone     cli.main(argv=sys.argv, config_files=config_files)
  2016-11-18 07:22:26.470 1384 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/cmd/cli.py", line 1256, in main
  2016-11-18 07:22:26.470 1384 ERROR keystone     CONF.command.cmd_class.main()
  2016-11-18 07:22:26.470 1384 ERROR keystone   File "/usr/lib/python2.7/site-packages/keystone/cmd/cli.py", line 1202, in main
  2016-11-18 07:22:26.470 1384 ERROR keystone     'domain': domain_id})
  2016-11-18 07:22:26.470 1384 ERROR keystone UnboundLocalError: local variable 'domain_id' referenced before assignment
  2016-11-18 07:22:26.470 1384 ERROR keystone

  My guess is that instead of printing domain_id, we should print
  domain_name to avoid the error.

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


References