Horizon fail to load resources usage if ceilometer configured with SSL

Bug #1388764 reported by zhu zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
zhu zhu
Juno
Fix Released
High
zhu zhu

Bug Description

When ceilometer is configured in SSL, within Horizon configured as below for the local_setting

OPENSTACK_SSL_CACERT=<cert>
OPENSTACK_SSL_NO_VERIFY=false

Horizon fail to load the meter-list from ceilometer while ceilometer will get the meter-list with the same cert via command line.

With checking the code of Horizon. Found that, It uses the wrong arguments to pass the cacert: It should be 'cacert' instead of 'ca_file'

https://github.com/openstack/python-ceilometerclient/blob/master/ceilometerclient/v2/client.py#L53

In openstack_dashboard/api/ceilometer.py:
@memoized
def ceilometerclient(request):
    """Initialization of Ceilometer client."""

    endpoint = base.url_for(request, 'metering')
    insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
    cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
    return ceilometer_client.Client('2', endpoint,
                                    token=(lambda: request.user.token.id),
                                    insecure=insecure,
                                    ca_file=cacert)

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/132538

Changed in horizon:
assignee: nobody → zhu zhu (zhuzhubj)
status: New → In Progress
Revision history for this message
Doug Fish (drfish) wrote :

This prevents Horizon from connecting to ceilometer via a secure connection.

Changed in horizon:
importance: Undecided → High
milestone: none → kilo-1
tags: added: juno-backport-potential
Julie Pichon (jpichon)
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/juno)

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

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

Reviewed: https://review.openstack.org/132538
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=8164075f5b6b24972503c9d27f78e0228dce9716
Submitter: Jenkins
Branch: master

commit 8164075f5b6b24972503c9d27f78e0228dce9716
Author: ZHU ZHU <email address hidden>
Date: Mon Nov 3 04:18:26 2014 -0600

    Fix incorrect ca arguments for calling ceilometer client

    With ceilometer configured with SSL, Horizon fail to connect to
    ceilometer to load the meters(usage data) due to it passed a wrong
    of ca argument for ceilometer client. Should use 'cacert' instead
    of 'ca_file'.

    See ceilometer client:
    https://github.com/openstack/python-ceilometerclient/blob/master/ceilometerclient/v2/client.py#L53

    Change-Id: I296c61119e07cd2e19079ef62054c5837fa13114
    Closes-Bug: #1388764

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/juno)

Reviewed: https://review.openstack.org/132609
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=74f83331f818d802d3ecb1b0b46466cba7a1132e
Submitter: Jenkins
Branch: stable/juno

commit 74f83331f818d802d3ecb1b0b46466cba7a1132e
Author: ZHU ZHU <email address hidden>
Date: Mon Nov 3 04:18:26 2014 -0600

    Fix incorrect ca arguments for calling ceilometer client

    With ceilometer configured with SSL, Horizon fail to connect to
    ceilometer to load the meters(usage data) due to it passed a wrong
    of ca argument for ceilometer client. Should use 'cacert' instead
    of 'ca_file'.

    See ceilometer client:
    https://github.com/openstack/python-ceilometerclient/blob/master/ceilometerclient/v2/client.py#L53

    Change-Id: I296c61119e07cd2e19079ef62054c5837fa13114
    Closes-Bug: #1388764
    (cherry picked from commit 8164075f5b6b24972503c9d27f78e0228dce9716)

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → 2015.1.0
Alan Pevec (apevec)
tags: removed: icehouse-backport-potential in-stable-juno juno-backport-potential
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.