[Bug 1837861] Re: Shared Neutron Meter Label not processed correctly
Merlin
1837861 at bugs.launchpad.net
Tue Aug 13 07:44:24 UTC 2019
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)
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to ceilometer in Ubuntu.
https://bugs.launchpad.net/bugs/1837861
Title:
Shared Neutron Meter Label not processed correctly
Status in ceilometer package in Ubuntu:
New
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"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceilometer/+bug/1837861/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list