Ceilometer cannot poll and publish floatingip samples

Bug #1262124 reported by Liusheng
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Liusheng
OpenStack Compute (nova)
Fix Released
Undecided
Liusheng
openstack-manuals
Invalid
Undecided
Liusheng
python-novaclient
Fix Released
Undecided
Liusheng

Bug Description

The ceilometer central agent pull and pubulish floatingip samples or other types of samples .but it cannot get valid samples of floatingip.
The reason is ceilometer floatingip poster call nova API "list" metod of nova.api.openstack.compute.contrib.floating_ips.FloatingIPController, this API get floatingips filtered by context.project_id.

The current context.project_id is the id of tenant "service".So,the result is {"floatingips": []}

the logs of nova-api-os-compute is:

http://paste.openstack.org/show/55285/

Here,ceilometer invoke novaclient to list floatingips,and novaclient call nova API,then,the nova API will call nova network API or neutron API with:
    client.list_floatingips(tenant_id=project_id)['floatingips']

Novaclient can not list other tenant's floatingip but only the tenant of current context.

So, I think we should modify the nova API with adding a parameter like "all_tenant" which accessed by admin role.

This should be confirmed?

Tags: ceilometer
Liusheng (liusheng)
Changed in ceilometer:
assignee: nobody → Liusheng (liusheng)
Liusheng (liusheng)
affects: ceilometer → nova
affects: nova → ceilometer
Liusheng (liusheng)
affects: ceilometer → nova
Changed in ceilometer:
assignee: nobody → Liusheng (liusheng)
Liusheng (liusheng)
description: updated
gordon chung (chungg)
summary: - Ceilometer cannot poll and pubulish floatingip samples
+ Ceilometer cannot poll and publish floatingip samples
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Triaged
Liusheng (liusheng)
Changed in python-novaclient:
assignee: nobody → Liusheng (liusheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

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

Reviewed: https://review.openstack.org/83660
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=02328d33373479b33f4fee8112d47c1ae29e8bd4
Submitter: Jenkins
Branch: master

commit 02328d33373479b33f4fee8112d47c1ae29e8bd4
Author: liu-sheng <email address hidden>
Date: Fri Mar 28 11:32:39 2014 +0800

    Allow admin user to get all tenant's floating IPs

    When getting floatingips with Nova API, the results will be filtered
    with the 'tenant_id'.
    So, we can only get the floatingips belonging to the tenant of the current
    context.
    When ceilometer invokes novaclient to list floatingips, it will get an
    empty list because the tenant is 'service'.
    we should allow an admin user to index all tenants's floatingip by adding a
    parameter 'all_tenants'.
    This patch provides CLI support

    Change-Id: I35a2155401247d49017bf3c03341b082cb87750d
    Closes-bug: #1262124

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

Reviewed: https://review.openstack.org/81429
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6478554f531f6ee2fa86226fbc79dd31e556bc06
Submitter: Jenkins
Branch: master

commit 6478554f531f6ee2fa86226fbc79dd31e556bc06
Author: liu-sheng <email address hidden>
Date: Wed Mar 19 11:44:22 2014 +0800

    Allow admin user to get all tenant's floating IPs

    When getting floatingips by Nova API, the results will be filtered
    with the 'tenant_id'.
    So, we can only get the floatingips belonging the tenant of current
    context.
    When ceilometer invokes novaclient to list floatingips, it will get an
    empty list because the tenant is 'service'.
    we should allow an admin user to index all tenants's floatingip by adding a
    parameter 'all_tenants'.

    Part1:
        part1 try to implement this and part2 will remove the unused codes.

    Change-Id: I7ab1d5ff463fc29928f6811f846c9e204390a412
    Closes-bug: #1262124

Changed in nova:
status: In Progress → Fix Committed
Liusheng (liusheng)
Changed in openstack-manuals:
assignee: nobody → Liusheng (liusheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit 8057b66c0b7ac87863f175d850414bc0ed260ab2
Author: liu-sheng <email address hidden>
Date: Fri Mar 28 14:49:44 2014 +0800

    Fix the floatingip pollster

    Ceilometer cannot poll and publish floatingip samples, this is
    because Nova and Novaclient didn't provide floatingips that don't belong
    to the project of the current context.
    After merging the following patches it will be possible if parameter
    all_tenants is enabled.

    I7ab1d5ff463fc29928f6811f846c9e204390a412
    I4549341badfdb846c03f2828159c46bc4c4a2c77
    I35a2155401247d49017bf3c03341b082cb87750d

    Change-Id: Ib5a22d6ba6a815f61713194accb4ece11171f706
    Closes-bug: #1262124

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
importance: Undecided → Medium
milestone: none → juno-1
Revision history for this message
Matt Riedemann (mriedem) wrote :

There should be a novaclient docs change for the list floatingips parameter change.

Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Revision history for this message
Anne Gentle (annegentle) wrote :

For the docs change, what if the novaclient isn't released yet?

Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Tom Fifield (fifieldt)
Changed in openstack-manuals:
status: New → Incomplete
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by liusheng (<email address hidden>) on branch: master
Review: https://review.openstack.org/83667

Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
Liusheng (liusheng)
Changed in openstack-manuals:
status: Incomplete → Invalid
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-1 → 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.