<div dir="ltr">Hallo Jonas, <br>I have worked to address this specific use case. <br><br>First, the part of the solution that is already implemented. If you only need to gather metrics in a tenant fashion, you can take a look into this PR: <a href="https://review.opendev.org/#/c/735605/">https://review.opendev.org/#/c/735605/</a>. That pull request enables operators to configure shared traffic labels, and then, these traffic labels will be exposed/published with different granularities. The different granularities are router, tenant, label, router-label, and tenant-label. The complete explanation can be found in the "RST" document that the PR also introduces, where we wrote a complete description of neutron metering, its configs, and usage. You are welcome to review and help us get this PR merged :)<br><br>So far, if all you need is to measure the whole traffic, but in different granularities, that PR will probably be enough. On the other hand,  if you need to create more complex rules to filter by source/destination IPs, then we need something else. Interestingly enough, we are working towards that. We will extend neutron API, and neutron metering to allow operators to use "remote-ip" and "source-ip" to create metering labels rules.<br><br>We also saw the PR that changed the behavior of the "remote-ip"  property, and the whole confusion it caused (at least for us). However, instead of proposing to revert it, we are working towards enabling the API to handle "remote-ip" and "source-ip", which will cover the use case of the person that introduced that commit, and many others such as ours and yours (probably).</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 7, 2020 at 5:47 AM Jonas Schäfer <<a href="mailto:jonas.schaefer@cloudandheat.com">jonas.schaefer@cloudandheat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear list,<br>
<br>
We are trying to implement tenant bandwidth metering at the neutron router <br>
level. Since some of the network spaces connected to the external interface of <br>
the neutron router are supposed to be unmetered, we need to match on the <br>
remote address.<br>
<br>
Conveniently, there exists a --remote-ip-prefix option on meter label create; <br>
however, since [1], its meaning was changed to the exact opposite: Instead of <br>
matching on the *remote* prefix (towards the external interface), it matches <br>
on the *local* prefix (towards the OS tenant network).<br>
<br>
In an ideal world, we would want to revert that change and instead introduce a <br>
--local-ip-prefix option which covers that use-case. I suppose this is not a <br>
thing we *should* do though, given that this change made it into a few <br>
releases already.<br>
<br>
Instead, we’ll have to create a new option (which whatever name) + associated <br>
database schema + iptables rule patterns to implement the feature.<br>
<br>
The questions associated with this are now:<br>
<br>
- Does this make absolutely no sense to anyone?<br>
- What is the process for this? I suppose since this change was made <br>
intentionally and passed review, our desired change needs to go through a <br>
feature request process (blueprints maybe?).<br>
<br>
kind regards,<br>
Jonas Schäfer<br>
<br>
   [1]: <a href="https://opendev.org/openstack/neutron/commit/" rel="noreferrer" target="_blank">https://opendev.org/openstack/neutron/commit/</a><br>
92db1d4a2c49b1f675b6a9552a8cc5a417973b64<br>
<br>
<br>
-- <br>
Jonas Schäfer<br>
DevOps Engineer<br>
<br>
Cloud&Heat Technologies GmbH<br>
Königsbrücker Straße 96 | 01099 Dresden<br>
+49 351 479 367 37<br>
<a href="mailto:jonas.schaefer@cloudandheat.com" target="_blank">jonas.schaefer@cloudandheat.com</a> | <a href="http://www.cloudandheat.com" rel="noreferrer" target="_blank">www.cloudandheat.com</a><br>
<br>
New Service:<br>
Managed Kubernetes designed for AI & ML<br>
<a href="https://managed-kubernetes.cloudandheat.com/" rel="noreferrer" target="_blank">https://managed-kubernetes.cloudandheat.com/</a><br>
<br>
Commercial Register: District Court Dresden<br>
Register Number: HRB 30549<br>
VAT ID No.: DE281093504<br>
Managing Director: Nicolas Röhrs<br>
Authorized signatory: Dr. Marius Feldmann<br>
Authorized signatory: Kristina Rübenkamp<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Rafael Weingärtner</div></div>