ceilometer cannot communicate with swift if endpoint uri does not start with '/v1'

Bug #1325591 reported by Mauro Stettler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
Mauro Stettler

Bug Description

My keystone has the swift endpoint configured like this:

http://10.0.1.223/swift/v1/AUTH_%(tenant_id)s

The Swift service itself works fine, but but when i start ceilometer-agent-central I get the following error:

2014-06-02 16:05:50.362 10613 INFO swiftclient [-] RESP STATUS: 404 Not Found

In the debug output I can see that the URL has been changed to:

http://10.0.1.223/v1/AUTH_192cd833921c4686888510be6c8612c0

I think the bug is in ceilometer.objectstore.swift._Base in the method _neaten_url. It splits and concatenates the endpoint url, but it only uses the hostname from the endpoint that keystone returned and ignores the URI part after the hostname.

If you agree that the bug is in the _neaten_url method I could submit a Patch for it.

Tags: swift
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

@Mauro Stettler:

yes, it is caused by _neaten_url, please assign to yourself as soon as possible, otherwise, someone else may do it.......

please add me to the reviewer after you upload the patch, I think I already get the answer too :)

Changed in ceilometer:
status: New → Confirmed
Changed in ceilometer:
assignee: nobody → Mauro Stettler (mauro-stettler)
summary: - ceilometer cannot communitcate with swift if endpoint uri does not start
+ ceilometer cannot communicate with swift if endpoint uri does not start
with '/v1'
gordon chung (chungg)
Changed in ceilometer:
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

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

Changed in ceilometer:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ceilometer (master)

Change abandoned by Mauro Stettler (<email address hidden>) on branch: master
Review: https://review.openstack.org/97586
Reason: mistake in coding style

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

Reviewed: https://review.openstack.org/97474
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=bbf4f71bde3266f55f17484b9561041d21e3d31a
Submitter: Jenkins
Branch: master

commit bbf4f71bde3266f55f17484b9561041d21e3d31a
Author: replay <email address hidden>
Date: Wed Jun 4 06:22:39 2014 +0300

    Corrects a flaw in the treatment of swift endpoints

    When keystone has a registered swift endpoint of which the url does not start
    with '/v1', the object-store pollster is not able to use it correctly.
    This commit fixes it's behaviour to provide more flexibility in endpoint urls.

    Change-Id: I579b1cf450f16853ac49f1d248a64a179e6443d9
    Closes-Bug: #1325591

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-2
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-2 → 2014.2
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.