_get_api_server() incorrectly handling CONF.glance.glance_api_servers

Bug #1381135 reported by Ruby Loo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Ruby Loo

Bug Description

In ironic.common.glance_service.service_utils._get_api_server():

The code uses the value of config CONF.glance.glance_api_servers, which is a list. But I don't see the code treating that value as a list.

Chris brought this up (that there might be something wrong) in a review [1].

[1] https://review.openstack.org/#/c/127648/1/ironic/common/glance_service/service_utils.py

Dmitry Tantsur (divius)
Changed in ironic:
status: New → Confirmed
importance: Undecided → Medium
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/129991

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

Reviewed: https://review.openstack.org/129991
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=77e7a9042dec9fb6f60f01ad7a6c4e30daf59856
Submitter: Jenkins
Branch: master

commit 77e7a9042dec9fb6f60f01ad7a6c4e30daf59856
Author: Ruby Loo <email address hidden>
Date: Tue Oct 21 17:27:08 2014 +0000

    Iterate over glance API servers

    The configuration option CONF.glance.glance_api_servers is meant to
    be a list of Glance API servers, and should behave similar to its use
    in Nova and Cinder: that each time a Glance API server is wanted, one
    of the servers in the list is returned.

    This changes CONF.glance.glance_api_servers to be a list instead of
    a string. The list is randomly shuffled, and an iterator is
    used to cycle through the list of servers.

    This is backwards compatible and handles the case where the
    user may have set [glance]/glance_api_servers = 'host:port' (or
    'host1:port1, host2:port2'). The configuration library will
    convert that to the corresponding list.

    Closes-Bug: #1381135

    Change-Id: Ic7cab502f38407aa0c282203804023dfa45b6623

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: kilo-1 → 2015.1.0
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.