AttributeError: 'Assignment' object has no attribute 'get_domain_by_name'

Bug #1427379 reported by Matthew Edmonds
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Matthew Edmonds

Bug Description

2015-03-02 13:16:45.493 19248 CRITICAL keystone [-] AttributeError: 'Assignment' object has no attribute 'get_domain_by_name'
2015-03-02 13:16:45.493 19248 TRACE keystone Traceback (most recent call last):
2015-03-02 13:16:45.493 19248 TRACE keystone File "/usr/bin/keystone-manage", line 44, in <module>
2015-03-02 13:16:45.493 19248 TRACE keystone cli.main(argv=sys.argv, config_files=config_files)
2015-03-02 13:16:45.493 19248 TRACE keystone File "/usr/lib/python2.7/site-packages/keystone/cli.py", line 311, in main
2015-03-02 13:16:45.493 19248 TRACE keystone CONF.command.cmd_class.main()
2015-03-02 13:16:45.493 19248 TRACE keystone File "/usr/lib/python2.7/site-packages/keystone/cli.py", line 250, in main
2015-03-02 13:16:45.493 19248 TRACE keystone mapping['domain_id'] = get_domain_id(CONF.command.domain_name)
2015-03-02 13:16:45.493 19248 TRACE keystone File "/usr/lib/python2.7/site-packages/keystone/cli.py", line 236, in get_domain_id
2015-03-02 13:16:45.493 19248 TRACE keystone return assignment_manager.driver.get_domain_by_name(name)['id']
2015-03-02 13:16:45.493 19248 TRACE keystone AttributeError: 'Assignment' object has no attribute 'get_domain_by_name'

Changed in keystone:
assignee: nobody → Matthew Edmonds (edmondsw)
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Matthew,

Can you detail the steps to reproduce this? Are you calling this internally with Keystone somewhere, or it this recreateable via the API?

Also, the assignment API has changed and now calls into the Resource API.

https://github.com/openstack/keystone/blob/master/keystone/assignment/core.py#L592

Revision history for this message
Henry Nash (henry-nash) wrote :

I just spotted this same issue while adding support for the domain-config uploading to keystone-manage (which is where you found this issue I suspect Matthew?).

As Lance stated, the domain api have now moved to the resource controller/manager/backend. To aid the transition, we provide re-directs at the manager level (so most calls won't notice this change). However, keystone-manager makes a direct driver call (bypassing the manager)...which is why this is failing. I'll put up a fix asap.

Changed in keystone:
status: New → Triaged
Revision history for this message
Henry Nash (henry-nash) wrote :

..just noticed that you assigned the bug you yourself, Matthew...if you are going to fix it go ahead! If you need me to take it, let me know.

Revision history for this message
Matthew Edmonds (edmondsw) wrote :

Thanks, guys. If you want to take it, Henry, you will probably get a fix up faster than I will... I think I know what to change, but my hard drive died, and with it my dev environment, which I'll have to rebuild before I can submit a fix.

Revision history for this message
Matthew Edmonds (edmondsw) wrote :

we hit this in a test suite, and it wasn't clear exactly where at a glance, but I think it was probably with this:

/usr/bin/keystone-manage mapping_purge --domain-name Default

Changed in keystone:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/161543

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/161543
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=90a7eb933d10e64bb223de4fee1d23313656b517
Submitter: Jenkins
Branch: master

commit 90a7eb933d10e64bb223de4fee1d23313656b517
Author: Matthew Edmonds <email address hidden>
Date: Wed Mar 4 20:58:58 2015 -0500

    'Assignment' has no attr 'get_domain_by_name'

    The domain API has moved to the resource manager. While there are
    redirects at the manager level so that most calls won't notice,
    keystone-manage mapping_purge is making a direct driver call (bypassing
    the manager). It needs to be updated to point to the resource manager
    rather than the assignment manager.

    Change-Id: Ia4fc89a0496bf9dc45300dbbe4cb776210340de4
    Closes-Bug: 1427379

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.