Shared Neutron Meter Label not processed correctly

Bug #1837861 reported by Merlin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ceilometer (Ubuntu)
New
Undecided
Unassigned

Bug Description

# Description
Shard neutron meter label don't create bandwidth meters in gnocchi.
The meter label is only attached to one extra project.

# Expected behavior
Shared Meter label should be processed for every project containing the project_id of the project that the measures are linked to.

#Reproduce
1. Create Multiple Projects
2. Create a shared metering label for the admin project:
openstack network meter create billing-exgress-public --description "Meter for billing only exgress traffic to the internet" --share
while read line; do openstack network meter rule create --egress --exclude --remote-ip-prefix "$line" billing-exgress-public ; done <cidr-private.txt
openstack network meter rule create --egress --include --remote-ip-prefix 0.0.0.0/0 billing-exgress-public
3. Check the Gnoochi Database for network resources
gnocchi resource list -f json | grep -C 5 'network"'
gnocchi measures aggregation -m bandwidth --aggregation mean --query "project_id=<ProjectID>" --resource-type network --needed-overlap 0 --groupby original_resource_id --utc --granularity 300 --fill 0"

Revision history for this message
Merlin (merlinb) wrote :

Using OpenStack Stein from Stable Branch

summary: - Shared Neutron Meter Label not processed
+ Shared Neutron Meter Label not processed correctly
description: updated
Revision history for this message
Merlin (merlinb) wrote :

As a workaround create a meter label for every project itself:

import openstack
conn = openstack.connect(cloud='test')

def createBillingMeteringLabel(projectId):
    '''Creates Billing Label for internet exgress traffic for a project'''
    label = conn.network.create_metering_label(
            name='billing-exgres', project_id=projectId)
    conn.network.create_metering_label_rule(
        direction='egress',
        metering_label_id=label.id, project_id=projectId,
        remote_ip_prefix='0.0.0.0/0')
    privateCidrs = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
    for privateNet in privateCidrs:
        conn.network.create_metering_label_rule(
            direction='egress', is_excluded=True,
            metering_label_id=label.id, project_id=projectId,
            remote_ip_prefix=privateNet)

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.