Doesn't properly get keystone endpoint when Keystone is configured to use templated catalog

Bug #1356053 reported by Sudarshan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Denis Egorenko
8.0.x
Fix Released
High
Denis Egorenko
OpenStack Dashboard (Horizon)
Fix Released
High
Sergey Reshetnyak
OpenStack Heat
Fix Released
Undecided
Sergey Reshetnyak
Python client library for Sahara
Fix Released
High
Telles Mota Vidal Nóbrega
Sahara
Fix Released
High
Telles Mota Vidal Nóbrega
devstack
Invalid
Undecided
Unassigned
tempest
Fix Released
Undecided
Yaroslav Lobankov

Bug Description

When using the keystone static catalog file to register endpoints (http://docs.openstack.org/developer/keystone/configuration.html#file-based-service-catalog-templated-catalog), an endpoint registered (correctly) as catalog.region.data_processing.... gets read as "data-processing" by keystone.
Thus, when Sahara looks for an endpoint, it is unable to find one for data_processing.

This causes a problem with the commandline interface and the dashboard.

Keystone seems to be converting underscores to dashes here: https://github.com/openstack/keystone/blob/master/keystone/catalog/backends/templated.py#L47

modifying this line to not perform the replacement seems to work fine for me, but may have unintended consequences.

Changed in sahara:
milestone: none → juno-3
Changed in sahara:
milestone: juno-3 → juno-rc1
Changed in sahara:
milestone: juno-rc1 → kilo-1
importance: Undecided → Critical
Revision history for this message
Chad Roberts (croberts) wrote :

Is this actually a sahara bug, or might it be more proper (and a more robust fix) to bring this up against keystone?

Revision history for this message
Sergey Lukjanov (slukjanov) wrote :

It sounds like we should move to dash instead of underline in Kilo for the endpoint name

Revision history for this message
Michael McCune (mimccune) wrote :

agreed with Sergey about moving to a dash.

Also, maybe we should also add a fallback mechanism to check for the underscore replacement by attempting to acquire the endpoint with a dash after failing to find the name with underscore. I realize this may have unintended consequences with there were 2 service names like "data_processing" and "data-processing", but in this case it would fail in Keystone as well.

Revision history for this message
Andrew Lazarev (alazarev) wrote :

Agreed about moving to a dash.

I don't think fallback mechanism is possible. Sahara itself doesn't use endpoint type (only in documentation). So, this is mostly for horizon and devstack.

Changed in horizon:
assignee: nobody → Andrew Lazarev (alazarev)
Changed in devstack:
assignee: nobody → Andrew Lazarev (alazarev)
Changed in sahara:
assignee: nobody → Andrew Lazarev (alazarev)
Changed in horizon:
assignee: Andrew Lazarev (alazarev) → nobody
Changed in sahara:
assignee: Andrew Lazarev (alazarev) → nobody
Changed in devstack:
assignee: Andrew Lazarev (alazarev) → nobody
Revision history for this message
Andrew Lazarev (alazarev) wrote :

Assigned to Telles per discussion in IRC

Changed in sahara:
assignee: nobody → Telles Mota Vidal Nóbrega (tellesmvn)
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Horizon does not perform any translation of the endpoint from the service catalog returned by Keystone.

There is no work required to fix in Horizon, once Keystone is fixed it should work work in Horizon.

Changed in horizon:
status: New → Won't Fix
Revision history for this message
Telles Mota Vidal Nóbrega (tellesmvn) wrote :

Great

Changed in sahara:
status: New → In Progress
Revision history for this message
Andrew Lazarev (alazarev) wrote :
Changed in horizon:
assignee: nobody → Andrew Lazarev (alazarev)
assignee: Andrew Lazarev (alazarev) → nobody
Changed in horizon:
assignee: nobody → Telles Mota Vidal Nóbrega (tellesmvn)
Changed in devstack:
assignee: nobody → Telles Mota Vidal Nóbrega (tellesmvn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

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

Changed in devstack:
status: New → In Progress
Changed in python-saharaclient:
assignee: nobody → Telles Mota Vidal Nóbrega (tellesmvn)
Changed in sahara:
status: In Progress → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: Won't Fix → In Progress
Changed in python-saharaclient:
status: New → In Progress
Changed in sahara:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
assignee: nobody → Telles Mota Vidal Nóbrega (tellesmvn)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

Reviewed: https://review.openstack.org/135472
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=5faa22168d47ec380ee527d966db9cc413033544
Submitter: Jenkins
Branch: master

commit 5faa22168d47ec380ee527d966db9cc413033544
Author: Telles Nobrega <email address hidden>
Date: Tue Nov 18 22:01:31 2014 -0300

    Replacing data_processing with data-processing

    Sahara is changing the endpoint name from data_processing to
    data-processing. The Sahara docs are updated here to reflect this
    change.

    Change-Id: Ide6c216f939964621bdea29c5588f83c49aad103
    Partial-bug: #1356053

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

Reviewed: https://review.openstack.org/135148
Committed: https://git.openstack.org/cgit/openstack/python-saharaclient/commit/?id=7ecac90599c54654fd20d72b7ec30ec2b7d4220c
Submitter: Jenkins
Branch: master

commit 7ecac90599c54654fd20d72b7ec30ec2b7d4220c
Author: Telles Nobrega <email address hidden>
Date: Mon Nov 17 22:45:14 2014 -0300

    Replacing data_processing with data-processing

    Using data_processing causes a problem when defining the endpoint
    statically in keystone.

    Change-Id: I8fb2be802c4390bdcd49e1722cd36f50781b1feb
    Partial-bug: #1356053

Changed in python-saharaclient:
importance: Undecided → High
milestone: none → 0.7.6
Changed in sahara:
importance: Critical → High
Revision history for this message
Marcos Lobo (marcos-fermin-lobo) wrote :

Sudarshan, I'm working in a patch for solve that https://review.openstack.org/#/c/120011/

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

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

Changed in sahara:
milestone: kilo-1 → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-saharaclient (master)

Reviewed: https://review.openstack.org/138332
Committed: https://git.openstack.org/cgit/openstack/python-saharaclient/commit/?id=be164236407d8bc3937292062969d8ea0ba946c0
Submitter: Jenkins
Branch: master

commit be164236407d8bc3937292062969d8ea0ba946c0
Author: Sergey Lukjanov <email address hidden>
Date: Tue Dec 2 15:06:14 2014 +0300

    Set default service_type to "data-processing" in client

    We're using the default value in many places, so, we should switch it
    to the data-processing by default. The fallback mechanism is already
    implemented, so, backward compatibility supported.

    It's needed to make CLI support both endpoints.

    Change-Id: I8818c77a96685c8a557aa6fec77002c93064118e
    Partial-bug: #1356053

Changed in sahara:
milestone: kilo-2 → kilo-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/135458
Reason: This review is > 4 weeks without comment and currently blocked by a core reviewer with a -2. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and contacting the reviewer with the -2 on this review to ensure you address their concerns.

Changed in devstack:
assignee: Telles Mota Vidal Nóbrega (tellesmvn) → Chad Roberts (croberts)
Changed in devstack:
assignee: Chad Roberts (croberts) → Sergey Reshetnyak (sreshetniak)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/135454
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=37a06f017ba6ef38159ee65ac25bdd890ccbd102
Submitter: Jenkins
Branch: master

commit 37a06f017ba6ef38159ee65ac25bdd890ccbd102
Author: Telles Nobrega <email address hidden>
Date: Tue Nov 18 07:59:10 2014 -0300

    Add data-processing service for Sahara

    When registering endpoint with data_processing keystone transforms it
    into data-processing. This problem causes sahara to not find the
    endpoint afterwards

    We need to have two endpoints for correct working tempest and horizon
    with devstack. After resolving bug in tempest and horizon need to remove
    old data_processing endpoint

    Change-Id: I97827d23ffe8a1218abd61e76804b918b1b7cbe0
    Partial-bug: #1356053

Changed in tempest:
assignee: Telles Mota Vidal Nóbrega (tellesmvn) → Sergey Reshetnyak (sreshetniak)
Changed in fuel:
assignee: nobody → Denis Egorenko (degorenko)
importance: Undecided → High
milestone: none → 7.0
Changed in fuel:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: Telles Mota Vidal Nóbrega (tellesmvn) → Sergey Reshetnyak (sreshetniak)
Changed in heat:
assignee: nobody → Sergey Reshetnyak (sreshetniak)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/161631

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

Reviewed: https://review.openstack.org/161243
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=6373b5178f39370613007fcfc39bcf0aba9262eb
Submitter: Jenkins
Branch: master

commit 6373b5178f39370613007fcfc39bcf0aba9262eb
Author: Sergey Reshetnyak <email address hidden>
Date: Wed Mar 4 17:47:52 2015 +0300

    Replacing data_processing with data-processing

    Using data_processing when setting keystone static catalog causes
    Sahara not to find the endpoint afterwards since keystone translates
    data_processing to data-processing

    Change-Id: I959c1bc76eebc4ddb787f872ce7319bd6ba83be8
    Closes-bug: #1356053

Changed in heat:
status: In Progress → Fix Committed
Changed in horizon:
milestone: none → kilo-3
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/161191
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=8c4a2cd1265c86d3493b82cb9d1277a2274f63cf
Submitter: Jenkins
Branch: master

commit 8c4a2cd1265c86d3493b82cb9d1277a2274f63cf
Author: Sergey Reshetnyak <email address hidden>
Date: Wed Mar 4 15:20:38 2015 +0300

    Replacing data_processing with data-processing

    Using data_processing when setting keystone static catalog causes
    Sahara not to find the endpoint afterwards since keystone translates
    data_processing to data-processing.

    Change-Id: I5b253e4f5a0486913c59150d2bafd631f06a8cf1
    Partial-bug: #1356053

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/juno)

Reviewed: https://review.openstack.org/161631
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=94c12267f47fb3165a53e4aae8d9515e1df1cca7
Submitter: Jenkins
Branch: stable/juno

commit 94c12267f47fb3165a53e4aae8d9515e1df1cca7
Author: Telles Nobrega <email address hidden>
Date: Tue Nov 18 07:59:10 2014 -0300

    Add data-processing service for Sahara

    When registering endpoint with data_processing Keystone transforms it
    into data-processing. This problem causes sahara to not find the
    endpoint afterwards

    We need to have two endpoint for correct working tempest and horizon
    with devstack. After resolving bug in tempest and horizon need to remove
    old data_processing endpoint

    Change-Id: I97827d23ffe8a1218abd61e76804b918b1b7cbe0
    Partial-bug: #1356053
    (cherry picked from commit 77f82f38496f364b7cc6d2a5bc8b45432934a130)

tags: added: in-stable-juno
Revision history for this message
Dmitry Mescheryakov (dmitrymex) wrote :

The corresponding bug for fuel is moved to https://bugs.launchpad.net/mos/+bug/1431983

no longer affects: fuel
Changed in sahara:
milestone: kilo-3 → kilo-rc1
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-3 → kilo-rc1
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-3
status: Fix Committed → Fix Released
David Lyle (david-lyle)
Changed in horizon:
status: In Progress → Fix Committed
Changed in sahara:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in sahara:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-rc1 → 2015.1.0
Thierry Carrez (ttx)
Changed in sahara:
milestone: kilo-rc1 → 2015.1.0
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-3 → 2015.1.0
Changed in tempest:
assignee: Sergey Reshetnyak (sreshetniak) → Yaroslav Lobankov (ylobankov)
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

For DevStack-

>https://github.com/openstack/sahara/blob/master/devstack/plugin.sh#L37

As Tempest publish the "data_processing" catalog type as config option, be careful about removing the 'data_processing' catalog_type support from devstack otherwise it going to break the user using with old default value.

Or we have to have some fallback logic for backward compatibility in Tempest.

Revision history for this message
Luigi Toscano (ltoscano) wrote :

If Tempest is patches to use data-processing by default, as I suspect ylobankov is going to do, I don't think it would be a problem to remove setup of the "data_processing" service from devstack. Do you have any concern?

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

Reviewed: https://review.openstack.org/135489
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=6189b0a69505a3a97fc559113694b3b5a6816257
Submitter: Jenkins
Branch: master

commit 6189b0a69505a3a97fc559113694b3b5a6816257
Author: Telles Nobrega <email address hidden>
Date: Tue Nov 18 23:22:17 2014 -0300

    Replacing data_processing with data-processing

    Changing data_processing with data-processing where needed to match the
    new defined endpoint of Sahara.

    Co-Authored-By: Sergey Reshetnyak <email address hidden>
    Co-Authored-By: Yaroslav Lobankov <email address hidden>

    Closes-Bug: #1356053

    Change-Id: Iba45c15ed57d43a11e6fac74d75d6b2db46f6a2f

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
Sergey Reshetnyak (sreshetniak) wrote :

affects fuel-puppets and fuel-ostf

Changed in fuel:
status: New → Confirmed
assignee: nobody → Denis Egorenko (degorenko)
importance: Undecided → High
milestone: none → 8.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/266316
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=fd9501197fd7e16dfb4ab85e919913924b4696b3
Submitter: Jenkins
Branch: master

commit fd9501197fd7e16dfb4ab85e919913924b4696b3
Author: Denis Egorenko <email address hidden>
Date: Tue Jan 12 14:55:33 2016 +0300

    Fix service_type for Sahara

    Currently we are using wrong service_type for Sahara, it was introduced
    because of bug in Tempest in upstream during Kilo cycle and now
    this bug is fixed and we should use proper service_type as well.

    Change-Id: I890cf8bb8e15b568e72f42327c22ed4d852ea6e4
    Closes-bug: #1356053

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/266905

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/8.0)

Reviewed: https://review.openstack.org/266905
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=727572b8fab20da331229d1b3dc57ab5276de8ca
Submitter: Jenkins
Branch: stable/8.0

commit 727572b8fab20da331229d1b3dc57ab5276de8ca
Author: Denis Egorenko <email address hidden>
Date: Tue Jan 12 14:55:33 2016 +0300

    Fix service_type for Sahara

    Currently we are using wrong service_type for Sahara, it was introduced
    because of bug in Tempest in upstream during Kilo cycle and now
    this bug is fixed and we should use proper service_type as well.

    Change-Id: I890cf8bb8e15b568e72f42327c22ed4d852ea6e4
    Closes-bug: #1356053
    (cherry picked from commit fd9501197fd7e16dfb4ab85e919913924b4696b3)

Maciej Relewicz (rlu)
tags: added: area-library
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/268958

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 8.0 → 9.0
Changed in devstack:
status: In Progress → Invalid
assignee: Sergey Reshetnyak (sreshetniak) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/268958
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=309b3115bce2c3c478e2f636a3afafa675505949
Submitter: Jenkins
Branch: master

commit 309b3115bce2c3c478e2f636a3afafa675505949
Author: Denis Egorenko <email address hidden>
Date: Mon Jan 18 12:48:36 2016 +0300

    Set proper service_type for Sahara for sahara template providers

    Change-Id: I918241635749f9a6e8d0b10808627ec963707000
    Related-bug: #1356053
    Closes-bug: #1535089

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (stable/8.0)

Related fix proposed to branch: stable/8.0
Review: https://review.openstack.org/269552

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (stable/8.0)

Reviewed: https://review.openstack.org/269552
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=1460127ca23ea8ee1ac1d02ead9ccf99b754edb9
Submitter: Jenkins
Branch: stable/8.0

commit 1460127ca23ea8ee1ac1d02ead9ccf99b754edb9
Author: Denis Egorenko <email address hidden>
Date: Mon Jan 18 12:48:36 2016 +0300

    Set proper service_type for Sahara for sahara template providers

    Change-Id: I918241635749f9a6e8d0b10808627ec963707000
    Related-bug: #1356053
    Closes-bug: #1535089
    (cherry picked from commit 309b3115bce2c3c478e2f636a3afafa675505949)

Changed in fuel:
status: Fix Committed → Fix Released
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.