if ceilometerclient is sent an auth_url it sends a keystone request to the publicURL (and ignores the endpoint type if set to internalURL).

Bug #1513544 reported by Yves-Gwenael Bourhis
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ospurge
Fix Released
Undecided
Yves-Gwenael Bourhis
python-ceilometerclient
New
Undecided
Unassigned

Bug Description

ceilometerclient makes some keystone requests and tries to hit the publicURL regardless of the endpoint_type if auth_url is sent to it:

Traceback (most recent call last):
  File "/usr/bin/ospurge", line 13, in <module>
    sys.exit(main())
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/ospurge/client.py", line 907, in main
    action, args.insecure)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/ospurge/client.py", line 747, in perform_on_project
    resources = globals()[rc](session)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/ospurge/client.py", line 640, in __init__
    token=get_token, insecure=session.insecure)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/ceilometerclient/v2/client.py", line 68, in __init__
    self.alarm_client, aodh_enabled = self._get_alarm_client(**kwargs)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/ceilometerclient/v2/client.py", line 106, in _get_alarm_client
    kwargs.get('timeout'))
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/ceilometerclient/client.py", line 271, in redirect_to_aodh_endpoint
    self.opts['endpoint'] = _get_endpoint(ks_session, **ks_kwargs)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/ceilometerclient/client.py", line 201, in _get_endpoint
    region_name=kwargs.get('region_name'))
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/session.py", line 661, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 323, in get_endpoint
    service_catalog = self.get_access(session).service_catalog
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 248, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.py", line 88, in get_auth_ref
    authenticated=False, log=False)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/session.py", line 502, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/session.py", line 387, in request
    resp = send(**kwargs)
  File "/usr/share/python/ospurge/lib/python2.7/site-packages/keystoneclient/session.py", line 431, in _send_request
    raise exceptions.ConnectionRefused(msg)
keystoneclient.exceptions.ConnectionRefused: Unable to establish connection to https://identity.fr1.cloudwatt.com/v2.0/tokens

see https://review.openstack.org/#/c/242157/2/ospurge/client.py to see what makes ceilometerclient fail.
I'm not sure whether it's a ceilometerclient or ceilometerclient's documentation bug.

Revision history for this message
Yves-Gwenael Bourhis (yves-gwenael-bourhis) wrote :

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

Changed in ospurge:
assignee: nobody → Yves-Gwenael Bourhis (yves-gwenael-bourhis)
Changed in ospurge:
status: New → In Progress
summary: - ceilometerclient needs endpoint type
+ ceilometerclient does not need auth_url and needs endpoint type
summary: - ceilometerclient does not need auth_url and needs endpoint type
+ if ceilometerclient is sent an auth_url it sends a keystone request to
+ the publicURL (and ignores the endpoint type if set to internalURL).
description: updated
description: updated
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ospurge (master)

Reviewed: https://review.openstack.org/242157
Committed: https://git.openstack.org/cgit/openstack/ospurge/commit/?id=cdcf2cbf5812f6f74a19ba98e67be155864a0701
Submitter: Jenkins
Branch: master

commit cdcf2cbf5812f6f74a19ba98e67be155864a0701
Author: Yves-Gwenael Bourhis <email address hidden>
Date: Thu Nov 5 17:49:16 2015 +0100

    Not sending auth-url to ceilometerclient

    If ceilometerclient gets an auth-url, it tries some keystone
    requests with the publicURL even if endpoint_type is 'internalURL'.

    We force the endpoint-type and region name without providing auth-url.

    Closes-Bug: #1513544

    Change-Id: Ib214f9d25f32f7cd1f06c27d73a889ce032915e0

Changed in ospurge:
status: In Progress → Fix Committed
Asha (assarava)
Changed in python-ceilometerclient:
assignee: nobody → Asha (assarava)
Asha (assarava)
Changed in python-ceilometerclient:
assignee: Asha (assarava) → nobody
Changed in ospurge:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.