[RFE] metric for the route

Bug #1759790 reported by zhangyanxian
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Opinion
Wishlist
Unassigned
python-openstackclient
Confirmed
Undecided
XU Xiaodan

Bug Description

Problem Description
===================

A routing metric is a quantitative value used to evaluate the path cost.
But neutron can't specify a different metric with the same destination address,which is useful to realize FRR(Fast Reroute) in Telecoms and NFV scenario.

There is no optional argument for metric:
root@ubuntudbs:/home/dbs# neutron router-update --help
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
usage: neutron router-update [-h] [--name NAME] [--description DESCRIPTION]
                             [--admin-state-up {True,False}]
                             [--distributed {True,False}]
                             [--route destination=CIDR,nexthop=IP_ADDR | --no-routes]
                             ROUTER

root@ubuntudbs:/home/dbs# openstack router set --help
usage: openstack router set [-h] [--name <name>] [--description <description>]
                            [--enable | --disable]
                            [--distributed | --centralized]
                            [--route destination=<subnet>,gateway=<ip-address>]
                            [--no-route] [--ha | --no-ha]
                            [--external-gateway <network>]
                            [--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
                            [--enable-snat | --disable-snat] [--tag <tag>]
                            [--no-tag]
                            <router>

Proposal
========

A new optional argument metric can be added to set the metric for the routes.
This value can be set by the user or have a default value.

Command Line Client Impact
--------------------------

::

  openstack router set [--route destination=<subnet>,
                                gateway=<ip-address>,
                                metric=<metric>] <router>

  neutron router-update [--route destination=CIDR,
                                 nexthop=IP_ADDR,
                                 metric=METRIC | --no-routes] ROUTER

Argument metric is optional.

REST API Impact
---------------

A new API extension to the routes resource is going to be introduced.
Set the metric for the routes :

.. code-block:: python

   PUT /v2.0/routers/{router_id}
   Accept: application/json
   {
       "router": {
           "routes": [
            {
                "destination": "179.24.1.0/24",
                "nexthop": "172.24.3.99"
                "metric": "100"
            }
        ]
       }
   }

References
==========

.. [1] api-ref for the neutron router,
   https://developer.openstack.org/api-ref/network/v2/index.html#routers-routers

description: updated
description: updated
description: updated
description: updated
description: updated
zhaobo (zhaobo6)
tags: added: ap rfe
tags: added: api
removed: ap
Revision history for this message
zhaobo (zhaobo6) wrote :

That means we may owns multiple routes with different Routers, one link down, the backup one can hold on. I think it is valid in real case, but for namespaced baesd reference implementation, it's hard to find some good usecases. Could u provider some more usecases? Do you use other L3 backend? :)

eroc Jiang (erocjiang)
Changed in neutron:
status: New → Confirmed
Revision history for this message
eroc Jiang (erocjiang) wrote :

in software vtep and hardware vtep case, its useful to realize multi-path routes for destination.

Changed in neutron:
assignee: nobody → zhangyanxian (zhang-yanxian)
Changed in neutron:
importance: Undecided → Wishlist
Revision history for this message
zhangyanxian (zhang-yanxian) wrote :

Hi, @zhaobo
thanks for the comments.
Yes we can use other L3 backend such as hardware routers or virtual routers
to implement it, not in the namespaced.

Revision history for this message
zhaobo (zhaobo6) wrote :

Thanks, @yanxian. Yeah, the first sight is NFV scenario for me. :). Good to know what you want. So I think this may be related a flavor proposal which support metric setting or some higher network/routing function driver, right? Since, namespaced one also support setting that, but may lack the routing function you want. So just a opnion from me. :)

Revision history for this message
zhangyanxian (zhang-yanxian) wrote :

Yeah, you are quite right @bo, it's about supporting metric setting for the NFV scenario, thanks for the opnion.

XU Xiaodan (xiaodan)
Changed in python-openstackclient:
assignee: nobody → XU Xiaodan (xiaodan)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lib (master)

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

Changed in neutron:
assignee: zhangyanxian (zhang-yanxian) → XU Xiaodan (xiaodan)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron-lib (master)

Change abandoned by boden (<email address hidden>) on branch: master
Review: https://review.opendev.org/638605
Reason: This patch has been stale for awhile so I'm abandoning it. If it's still valid please push an update to revive it.

tags: added: rfe-triaged
Changed in neutron:
assignee: XU Xiaodan (xiaodan) → Bin Lu (369283883-o)
tags: removed: rfe
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Hi,

This one seems reasonable for me. I would like to discuss it on next Neutron drivers meeting which will be on Friday 04.10.2019: http://eavesdrop.openstack.org/#Neutron_drivers_Meeting - so it would be great if You could join there if there would be any additional questions. But RFE should be discussed even if You will not be able to attend this meeting.

tags: added: l3-dvr-backlog
Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

personally i hope it's named "weight", "preference", or something along the line rather than "metric".

Revision history for this message
Akihiro Motoki (amotoki) wrote :

We discussed this RFE in the neutron drivers meeting last week [1].

Generally speaking, the RFE sounds reasonable.

There is one open question. Do you plan to support the proposed feature in the reference implementation? Or does this just a change in the API supported by a specific third-party plugin/driver? The reference implementation is really important to ensure the feature works well and we hope it is supported by the reference implementation.

Could you clarify it?

[1] http://eavesdrop.openstack.org/meetings/neutron_drivers/2019/neutron_drivers.2019-10-11-14.00.log.html#l-13

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Hi Bin Lu,

Do You still plan to work on this feature? If so, please answer to questions from comment #11 and than we will be able to discuss about it on the drivers meeting again.

Revision history for this message
XU Xiaodan (xiaodan) wrote :

Hi Akihiro Motoki and Slawek Kaplonski,

Sorry for late reply and your discuss means lot for us.
For this BP, just add metric for user configuration and record info in neutron db.
The application such as choose next hop with metric, may realize in next BP.

The codes for API have been pushed for review, please help to review when you are free, thanks.
https://review.opendev.org/#/c/637658/
https://review.opendev.org/#/c/638605/
https://review.opendev.org/#/c/639585/

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Hi Xu Xiaodan,

We were discussing this proposal once again on our last drivers meeting: http://eavesdrop.openstack.org/meetings/neutron_drivers/2020/neutron_drivers.2020-01-10-14.00.log.html#l-112

We all agreed that supporting this feature in reference implementation should be part of this RFE. Do You have plans/possibility to propose that too?

If You don't want to support this in reference implementation of L3 agent, maybe You can do this feature as some out-of-three extension to the neutron API? In such case, would You require any changes on neutron's side to accomplish that?

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Hi Xu Xiaodan,

Did You saw my last comment from January? Are You still interested in this rfe? If so, can You reply to questions from my comment #14?

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Due to no activity in this RFE for long time, I'm marking it as "postponed" for now. Feel free to reopen it if You will want to discuss that again on drivers meeting and if You will want to work on that.

tags: added: rfe-postponed
removed: rfe-triaged
Changed in neutron:
status: In Progress → Opinion
Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: Bin Lu (369283883-o) → nobody
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Slawek Kaplonski (<email address hidden>) on branch: master
Review: https://review.opendev.org/639585
Reason: This review is > 4 weeks without comment, and failed Zuul jobs the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron-lib (master)

Change abandoned by "Rodolfo Alonso <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron-lib/+/638605
Reason: This patch has not been attended in 1 year, if needed, you can restore it again.

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.