OpenStack Identity (Keystone)

SQL backend fails if not all URL are defined in an endpoint

Reported by Julien Danjou on 2012-10-04
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Keystone
Undecided
Julien Danjou
Folsom
Low
Alan Pevec

Bug Description

I've created an endpoint with only an admin URL, and this happens when the catalog is requested:

Traceback (most recent call last):
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 204, in __call__
    result = method(context, **params)
  File "/opt/stack/keystone/keystone/service.py", line 340, in authenticate
    metadata=metadata_ref)
  File "/opt/stack/keystone/keystone/catalog/core.py", line 78, in get_catalog
    return self.driver.get_catalog(user_id, tenant_id, metadata)
  File "/opt/stack/keystone/keystone/catalog/backends/sql.py", line 158, in get_catalog
    internal_url = ep['internalurl'].replace('$(', '%(')
AttributeError: 'NoneType' object has no attribute 'replace'

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

Changed in keystone:
assignee: nobody → Julien Danjou (jdanjou)
status: New → In Progress

Reviewed: https://review.openstack.org/14051
Committed: http://github.com/openstack/keystone/commit/ba1df90656f9bcff4d769b18042f731a6d295faa
Submitter: Jenkins
Branch: master

commit ba1df90656f9bcff4d769b18042f731a6d295faa
Author: Julien Danjou <email address hidden>
Date: Thu Oct 4 19:24:10 2012 +0200

    Fix catalog when services have no URL

    This fixes bug #1061736

    Change-Id: Ic8f7a45dfabb2e3fb40f6aa6cd4c0f29c13f2c77
    Signed-off-by: Julien Danjou <email address hidden>

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-11-22
Changed in keystone:
milestone: none → grizzly-1
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/18361
Committed: http://github.com/openstack/keystone/commit/70e55f99e10e1c9d2448e72f469622e2bdf5bea3
Submitter: Jenkins
Branch: stable/folsom

commit 70e55f99e10e1c9d2448e72f469622e2bdf5bea3
Author: Julien Danjou <email address hidden>
Date: Thu Oct 4 19:24:10 2012 +0200

    Fix catalog when services have no URL

    This fixes bug #1061736

    Change-Id: Ic8f7a45dfabb2e3fb40f6aa6cd4c0f29c13f2c77
    Signed-off-by: Julien Danjou <email address hidden>

Ananth (ananth-vit) wrote :

Hi,

I have installed and configured keystone. While I am trying to upload the cloud image in glance, it throws this error below. Could you please help?

[root@01HW449192A images]# glance image-create --name myFirstImage --is-public t
rue --container-format bare --disk-format qcow2 < cirros-0.3.0-x86_64-disk.img
No handlers could be found for logger "keystoneclient.v2_0.client"
Authorization Failed: An unexpected error prevented the server from fulfilling y
our request. 'NoneType' object has no attribute 'replace' (HTTP 500)

For your reference, these are the values in the endpoin table in the keystone database:
| bec65520d76f4a17aa211feab017b6a4 | RegionOne | 1a41e585cf49454f994bdb9ef2a6d25f | {"adminurl": "http://172.25.154.67:8774/v2/39012ceb86cc48e8b9a021805ee46265s", "internalurl": "http://172.25.154.67:8774/v2/39012ceb86cc48e8b9a021805ee46265s", "publicurl": null} |
| 574564eeaa254c3d987662c8f86ade96 | RegionOne | 18500b330c6846ff8389cb30de3bbfd0 | {"adminurl": "http://172.25.154.67:8776/v1/39012ceb86cc48e8b9a021805ee46265s", "internalurl": "http://172.25.154.67:8776/v1/39012ceb86cc48e8b9a021805ee46265s", "publicurl": null} |
| ab50ea4550514a0c839b0811297a6993 | RegionOne | 40b57641ab8a424e815ecac6ceb00e2e | {"adminurl": "http://172.25.154.67:9292/v2", "internalurl": "http://172.25.154.67:9292/v2", "publicurl": null} |
| 56e7300cb48448f79f8d8cc0501e94f5 | RegionOne | 0561eba8c25048148ccfc34d7a4b23dc | {"adminurl": "http://172.25.154.67:35357/v2.0", "internalurl": "http://172.25.154.67:5000/v2.0", "publicurl": null} |
| 5070d47b2f2b47729fc75902225e4a89 | RegionOne | c58acfdec97a403381a4bb0529863433 | {"adminurl": "http://172.25.154.67:8773/services/Admin", "internalurl": "http://172.25.154.67:8773/services/Cloud", "publicurl": null} |

Thank you.

Thierry Carrez (ttx) on 2013-04-04
Changed in keystone:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers