keystone.get_service_catalog() fails if auth_uri is versionless

Bug #1290482 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Lucas Alvares Gomes

Bug Description

if the CONF keystone_authtoken.auth_uri is versionless the Ironic service will fail when trying to get the API URL from the keystone catalog.

ERROR LOG:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 346, in fire_timers
    timer()
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main
    result = function(*args, **kwargs)
  File "/opt/stack/ironic/ironic/conductor/manager.py", line 385, in _do_node_deploy
    node.target_provision_state = states.NOSTATE
  File "/opt/stack/ironic/ironic/openstack/common/excutils.py", line 70, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/ironic/ironic/conductor/manager.py", line 379, in _do_node_deploy
    task.driver.deploy.prepare(task, node)
  File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 602, in prepare
    _create_pxe_config(task, node, pxe_info)
  File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 524, in _create_pxe_config
    pxe_config = _build_pxe_config(node, pxe_info, task.context)
  File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 161, in _build_pxe_config
    keystone.get_service_url()).rstrip('/')
  File "/opt/stack/ironic/ironic/common/keystone.py", line 48, in get_service_url
    % err)
CatalogFailure: Could not perform authorization process for service catalog: Authorization Failed: The resource could not be found. (HTTP 404)

Changed in ironic:
importance: Undecided → Low
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic (master)

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

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

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

Changed in ironic:
status: New → In Progress
Changed in ironic:
milestone: none → icehouse-rc1
Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

The same thing will happen if admin_url from ironic nova driver is versionless too. Nova-compute will fail with the same error traceback.

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

Reviewed: https://review.openstack.org/79666
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=8fc40926ac4ce1baae854910af41990307abb539
Submitter: Jenkins
Branch: master

commit 8fc40926ac4ce1baae854910af41990307abb539
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Mar 11 16:25:40 2014 +0000

    Make sure auth_url exists and is not versionless

    When getting the Ironic API service URL from the Keystone catalog make
    sure that the Keystone API endpoint is present and that it contains the
    right version of the API.

    Closes-Bug: #1290482
    Change-Id: I80fc74a1aea02074baba4839df83e0e694bc8ea6

Changed in ironic:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ironic (master)

Reviewed: https://review.openstack.org/79579
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=9a4ce8973079a098a19ad43005a9cf385b3947e5
Submitter: Jenkins
Branch: master

commit 9a4ce8973079a098a19ad43005a9cf385b3947e5
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Mar 11 10:52:34 2014 +0000

    PXE validate() to fail if no Ironic API URL

    As part of the deploy process the conductor should pass the URL of the
    Ironic API to the deploy ramdisk so that it can talk back to the Ironic
    API, but if the URL is not present in the Ironic configuration file or
    in the keystone catalog the deploy process will fail in the middle. This
    patch adds a verification to the validate() method to make sure the URL
    is present before the deploy starts.

    Related-Bug: #1290482
    Change-Id: I95472660deff0e23a19d0b744f711bbe3acc2191

Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-rc1 → 2014.1
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.