failed to create user from domain scoped token

Bug #1527575 reported by Matthias Runge
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
High
Unassigned
django-openstack-auth
Fix Released
Undecided
Itxaka Serrano

Bug Description

current tests are reporting
.Failed to create user from domain scoped token.
2015-12-18 10:15:46.894 | .Failed to create user from domain scoped token.
2015-12-18 10:15:46.919 | ..Failed to create user from domain scoped token.
2015-12-18 10:15:46.925 | .Failed to create user from domain scoped token.
2015-12-18 10:15:46.942 | .Failed to create user from domain scoped token.
2015-12-18 10:15:46.997 | .Failed to create user from domain scoped token.

but still passing
E.g this one here:
http://logs.openstack.org/13/259013/3/check/gate-horizon-tox-py27dj18/dac7716/console.html

Matthias Runge (mrunge)
Changed in horizon:
importance: Critical → High
Revision history for this message
Paul Karikh (pkarikh) wrote :

Looks like it happens frist time in openstack_dashboard/test/api_tests/policy_rest_tests.py:AdminPolicyRestTestCase and in PolicyRestTestCase too. And looks like the exception is
`'Mock' object has no attribute '__getitem__'`
And it fails on this line: https://github.com/openstack/django_openstack_auth/blob/master/openstack_auth/policy.py#L205. My guess that it fails on `auth_user.Token(domain_auth_ref)`.

Revision history for this message
Paul Karikh (pkarikh) wrote :

Actually it fails on keystone_cms.is_asn1_token(self.id) here:
https://github.com/openstack/django_openstack_auth/blob/master/openstack_auth/user.py#L88-L89

auth_user.Token(domain_auth_ref) calls keystone_cms.is_asn1_token(self.id) and it fails.

Revision history for this message
Itxaka Serrano (itxaka) wrote :

Isnt the problem with this that a exception is being raised but nothing is done about it?

So instead of a log.error a log.debug should be in place as it does not seem to affect anything?

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

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

Changed in django-openstack-auth:
assignee: nobody → Itxaka Serrano (itxakaserrano)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to django_openstack_auth (master)

Reviewed: https://review.openstack.org/277320
Committed: https://git.openstack.org/cgit/openstack/django_openstack_auth/commit/?id=0be06b415792935a7c9012298d3b68092bf2fb7c
Submitter: Jenkins
Branch: master

commit 0be06b415792935a7c9012298d3b68092bf2fb7c
Author: Itxaka <email address hidden>
Date: Mon Feb 8 09:43:57 2016 +0100

    Change log.error to log.warning

    Looks like the actual repercussion from this "error" is
    nothing at all, so the log should be changed to a warning
    as _domain_to_credentials returns even if an exception is
    raised.

    So when a function like this works even if an exception is
    raised, the log level should be a warning at best, as the rest
    of the code depending on this still seems to work no matter
    what is returned.

    Change-Id: I8ea690923010674351d45ef5122bb046ee5e46b5
    Closes-Bug: #1527575

Changed in django-openstack-auth:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/django_openstack_auth 2.2.0

This issue was fixed in the openstack/django_openstack_auth 2.2.0 release.

Revision history for this message
Paul Karikh (pkarikh) wrote :

Checked with current master and looks like issue is fixed now. Issue was fiexed in DOA 2.2.0, as Doug said. Horizon installs in venv django_openstack_auth==2.2.0 now. So, I think, we can close it for Horizon as invalid.

Changed in horizon:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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