Add monitor option to rt tool (such as ip mon route)

Bug #1650316 reported by Antoine Eiche
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
In Progress
Undecided
Antoine Eiche
R4.1
Fix Committed
Undecided
Antoine Eiche
Trunk
Fix Committed
Undecided
Antoine Eiche
OpenContrail
New
Undecided
Unassigned

Bug Description

Add --monitor options to rt tool in order to be able to get in real time routes from the vrouter module.
iproute2 has this kind of feature and we could propose the same kind of features in contrail.

I think, the vrouter module has to broadcast messages and not only do unicast netlink communications. Once the module broadcast messages, tools can receive these messages in real time.

I started with the routes, but this could also be applied to other resources such as interfaces, labels...

Tags: vrouter
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/27344
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/27444
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/27344
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/28620
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/29446
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/29447
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28620
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/27344
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/28620
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/27344
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/28620
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/27344
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/27344
Committed: http://github.org/Juniper/contrail-vrouter/commit/0399c8c91a28135d321558c7ad7763bb179aa37d
Submitter: Zuul (<email address hidden>)
Branch: master

commit 0399c8c91a28135d321558c7ad7763bb179aa37d
Author: Antoine Eiche <email address hidden>
Date: Thu Dec 15 16:36:00 2016 +0100

Broadcast vrouter operations on netlink

This patch introduces the netlink broadcasting of operations on vrouter
routes. For instance, when a route is added by a client, the vrouter
broadcasts the request on netlink.

We currently broadcast 'add' and 'delete' operations on the resource
route.

This allows the userspace to be notified by any modifcation on routes,
in the same manner it is notified by the Linux network stack thanks to
'ip monitor' for instance.

Change-Id: Ifed994e552b35faa771d4b6dad6da7eea1cecdfb
Closes-bug: #1650316

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/30052
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/36844
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/36844
Committed: http://github.com/Juniper/contrail-vrouter/commit/12b9b490c4ecc619e797e09afae1e2c144bbb1a1
Submitter: Zuul (<email address hidden>)
Branch: master

commit 12b9b490c4ecc619e797e09afae1e2c144bbb1a1
Author: Antoine Eiche <email address hidden>
Date: Wed Oct 25 22:05:46 2017 +0200

rt: Add monitor option

rt --monitor can be used to get route creations and deletions in
live. They are broadcasted on Netlink by the vrouter kernel module.
Only routes of type AF_INET and AF_INET6 are fully printed while
routes of type AF_BRIDGE are not generated yet.

The output format is 'jsonline' to be easily parsed by external
tools.

This is an example of the output:
{"operation":"add","family":"AF_INET","vrf_id":2,"prefix":32,"address":"20.1.1.254","nh":12,"flags":{"label_valid":false, "arp_proxy":true, "arp_trap":true, "arp_flood":false}}

Change-Id: I8cb8556f1c4adda0bb0ef10f98fc38702b2942c4
Closes-bug: #1650316

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/38374
Submitter: Antoine Eiche (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/38374
Committed: http://github.com/Juniper/contrail-vrouter/commit/677dbab7c5b55448683d74cad208b408f47963ae
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 677dbab7c5b55448683d74cad208b408f47963ae
Author: Antoine Eiche <email address hidden>
Date: Wed Oct 25 22:05:46 2017 +0200

rt: Add monitor option

rt --monitor can be used to get route creations and deletions in
live. They are broadcasted on Netlink by the vrouter kernel module.
Only routes of type AF_INET and AF_INET6 are fully printed while
routes of type AF_BRIDGE are not generated yet.

The output format is 'jsonline' to be easily parsed by external
tools.

This is an example of the output:
{"operation":"add","family":"AF_INET","vrf_id":2,"prefix":32,"address":"20.1.1.254","nh":12,"flags":{"label_valid":false, "arp_proxy":true, "arp_trap":true, "arp_flood":false}}

Change-Id: I8cb8556f1c4adda0bb0ef10f98fc38702b2942c4
Closes-bug: #1650316
(cherry picked from commit 12b9b490c4ecc619e797e09afae1e2c144bbb1a1)

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.