Nova catalogue info incorrect in Cinder configuration

Bug #1668281 reported by Rhys Oxenham
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Rhys Oxenham

Bug Description

TripleO lays down the configuration for /etc/cinder/cinder.conf with incorrect service catalogue/endpoint settings for Nova, pointing to entries that do not exist as defined, resulting in EndpointNotFound errors when Cinder attempts to communicate with Nova via novaclient, e.g. during a 'cinder retype' event.

Out of the box it sets the catalogue information in /etc/cinder/cinder.conf as:

nova_catalog_info = compute:Compute Service:internalURL

With the format as "<service_type>:<service_name>:<endpoint_type>"

But TripleO sets up the service catalogue for Nova like this:

+------------+-----------------+---------------------------------------------------------------------------------------------------+
| Name | Type | Endpoints |
+------------+-----------------+---------------------------------------------------------------------------------------------------+
| nova | compute | regionOne |

Note the lack of a "Compute Service" reference, and "compute" for the actual type.

As such, there's a mismatch here and leads to an EndpointNotFound error when Cinder attempts to call Nova via novaclient.

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-5.2.0-3.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install an environment using OSP director (or TripleO).

Actual results:
nova_catalog_admin_info and nova_catalog_info incorrectly configured. All novaclient calls from Cinder to Nova will fail as a result with EndpointNotFound, for example:

2017-02-17 15:19:36.790 27390 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/novaclient/service_catalog.py", line 84, in url_for
2017-02-17 15:19:36.790 27390 ERROR cinder.volume.manager raise novaclient.exceptions.EndpointNotFound()
2017-02-17 15:19:36.790 27390 ERROR cinder.volume.manager EndpointNotFound

Expected results:
nova_catalog_admin_info and nova_catalog_info correctly configured allowing calls between Cinder and Nova to succeed.

Additional info:

This can be manually worked around with the following:

# openstack catalog list
+------------+--------------+-------------------------------------------------------------------------------------+
| Name | Type | Endpoints |
+------------+--------------+-------------------------------------------------------------------------------------+
| nova | compute | RegionOne |
| | | publicURL: http://192.168.122.204:8774/v2/eb29e1b11a604a0b82e1ad3ac38262b6 |
| | | internalURL: http://192.168.122.204:8774/v2/eb29e1b11a604a0b82e1ad3ac38262b6 |
| | | adminURL: http://192.168.122.204:8774/v2/eb29e1b11a604a0b82e1ad3ac38262b6 |
| | | |
[..]

# openstack-config --set /etc/cinder/cinder.conf DEFAULT nova_catalog_admin_info 'compute:nova:adminURL'
# openstack-config --set /etc/cinder/cinder.conf DEFAULT nova_catalog_info 'compute:nova:internalURL'
# openstack-service restart cinder

But should be fixed properly within the TripleO heat templates - see: https://review.openstack.org/#/c/437153/

Rhys Oxenham (rdoxenham)
Changed in tripleo:
importance: Undecided → High
Revision history for this message
Emilien Macchi (emilienm) wrote :

https://review.openstack.org/#/c/437153/ needs to be backported and then we can close this one.

Changed in tripleo:
milestone: none → ocata-rc2
status: New → In Progress
assignee: nobody → Rhys Oxenham (rdoxenham)
Revision history for this message
Rhys Oxenham (rdoxenham) wrote :

Thanks Emilien, once it's merged I'll work on the backport.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-heat-templates (stable/ocata)

Related fix proposed to branch: stable/ocata
Review: https://review.openstack.org/438568

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-heat-templates (stable/ocata)

Reviewed: https://review.openstack.org/438568
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=7a08ed7a13220b35493aa7c1b9dd712ffb8a4c33
Submitter: Jenkins
Branch: stable/ocata

commit 7a08ed7a13220b35493aa7c1b9dd712ffb8a4c33
Author: Rhys Oxenham <email address hidden>
Date: Wed Feb 22 16:20:40 2017 -0500

    Update the Nova Endpoint information for Cinder

    This patch updates the Cinder service to reference the correct
    catalogue entries for Nova as configured by TripleO. The default
    settings as set by TripleO do not match our catalogue entries,
    and when Cinder attempts to callback to Nova in certain events
    (such as a Cinder volume retype) it can raise an EndpointNotFound
    error.

    Out of the box we have settings in /etc/cinder/cinder.conf like:

    nova_catalog_info = compute:Compute Service:internalURL

    With the format as "<service_type>:<service_name>:<endpoint_type>"

    Yet our catalogue has no mention of 'Compute Service'. This patch
    also fixes the reference for the adminURL also.

    Related-Bug: #1668281

    Change-Id: I888ee07ef02d82578867e33608901c06e6478472
    Co-Authored-By: Greg Charot <email address hidden>
    (cherry picked from commit 09d8c1278604cc2aec42b7284c01cf7eb8b074b6)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-heat-templates (stable/newton)

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/440624

Changed in tripleo:
milestone: ocata-rc2 → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-heat-templates (stable/newton)

Reviewed: https://review.openstack.org/440624
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=31a4bb9965de8c9b98194d99a3b61ca8ea594c68
Submitter: Jenkins
Branch: stable/newton

commit 31a4bb9965de8c9b98194d99a3b61ca8ea594c68
Author: Rhys Oxenham <email address hidden>
Date: Wed Feb 22 16:20:40 2017 -0500

    Update the Nova Endpoint information for Cinder

    This patch updates the Cinder service to reference the correct
    catalogue entries for Nova as configured by TripleO. The default
    settings as set by TripleO do not match our catalogue entries,
    and when Cinder attempts to callback to Nova in certain events
    (such as a Cinder volume retype) it can raise an EndpointNotFound
    error.

    Out of the box we have settings in /etc/cinder/cinder.conf like:

    nova_catalog_info = compute:Compute Service:internalURL

    With the format as "<service_type>:<service_name>:<endpoint_type>"

    Yet our catalogue has no mention of 'Compute Service'. This patch
    also fixes the reference for the adminURL also.

    Related-Bug: #1668281

    Change-Id: I888ee07ef02d82578867e33608901c06e6478472
    Co-Authored-By: Greg Charot <email address hidden>
    (cherry picked from commit 09d8c1278604cc2aec42b7284c01cf7eb8b074b6)
    (cherry picked from commit 7a08ed7a13220b35493aa7c1b9dd712ffb8a4c33)

tags: added: in-stable-newton
Rhys Oxenham (rdoxenham)
Changed in tripleo:
status: In Progress → 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.