Bug 260950 - [NEW PORT] net/frr8: Add new port for frr8
Summary: [NEW PORT] net/frr8: Add new port for frr8
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Olivier Cochard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-05 10:57 UTC by L4rS
Modified: 2022-07-07 12:16 UTC (History)
9 users (show)

See Also:
lars.wagner: maintainer-feedback? (olivier)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description L4rS 2022-01-05 10:57:13 UTC
Hi there,

might it be possible to add a new port of frrouting daemon version 8? Version 8 includes some features which are required by our setup (e.g. bgp no-rib) and those aren't available in version 7 (net/frr/).

Best regards,
Lars
Comment 1 Olivier Cochard freebsd_committer freebsd_triage 2022-01-05 13:31:29 UTC
I will compare it with my work-in-progress (https://github.com/ocochard/freebsd-ports/tree/BSDRP/net/frr8).
I meet a problem testing FRR 8, but I wonder if my problem didn't came from the way I'm building the port in my use-case.
Comment 2 L4rS 2022-01-05 16:12:49 UTC
Thank you. Just let me know if you need some help (e.g. testing).
Comment 3 John W. O'Brien 2022-03-20 18:50:46 UTC
(In reply to Olivier Cochard from comment #1)

I, too, would like to be able to use FRR8 from the ports tree. I wonder if you could share some more details of the problems you have found, so the rest of us might be able to help investigate and resolve them?
Comment 4 Olivier Cochard freebsd_committer freebsd_triage 2022-03-22 18:18:59 UTC
(In reply to John W. O'Brien from comment #3)

Sure, here is the regression I meet since FRR 8.x branch, last test with 8.2.2:

# grep frr /etc/rc.conf
frr_vtysh_boot="YES"
frr_daemons="zebra"
frr_enable="yes"

# cat /usr/local/etc/frr/frr.conf
log file /var/log/frr.log debug
!
interface lo1
 ip address 192.168.10.1/24
 ipv6 address 2001:db8:10::1/64
!

# ifconfig lo1 create
# ifconfig lo1 up
# service frr start
Checking intergrated config...
Checking vtysh.conf
OK
Starting zebra.
2022/03/22 19:15:38 ZEBRA: [NNACN-54BDA][EC 4043309110] Disabling MPLS support (no kernel support)
Booting for integrated-vtysh-config...
% Can't set interface IP address: FAILURE.
line 5: Failure to communicate[13] to zebra, line:  ipv6 address 2001:db8:10::1/64

Configuration file[/usr/local/etc/frr/frr.conf] processing failure: 13

=> Sometimes it fails to set the IPv4, other time is it the IPv6
Comment 5 yon 2022-03-27 00:16:05 UTC
The biggest change in the frr8 version is that the multicast ip address of the network interface must be set
like:
fe81:58:5020:ca::/64
Comment 6 Hiroki Sato freebsd_committer freebsd_triage 2022-03-27 00:31:10 UTC
Can anyone try this port[1]?  This includes libyang2, on which frr8 depends.

I fixed most of the problems that I noticed and am running
frr8 for a while with the full BGP routing table of IPv4 and IPv6
and dynamically-generated pseudo interfaces.  The patches still contain
some rough edges, but they should work.


[1] https://people.allbsd.org/~hrs/FreeBSD/net_frr8-20220327-1.tar.gz
Comment 7 Olivier Cochard freebsd_committer freebsd_triage 2022-03-29 15:45:50 UTC
(In reply to Hiroki Sato from comment #6)

Thanks a lot for your patches Hiroki!
Your patches solve the regression I've noticed.
I'm syncing with the FRR dev team to upstream your patches.
Comment 8 Hiroki Sato freebsd_committer freebsd_triage 2022-03-31 02:09:40 UTC
(In reply to Olivier Cochard from comment #7)

Thanks for testing.  I forgot to remove a debug log in the patches, so I created a new frr-8.2.2 port and uploaded it:

 https://people.allbsd.org/~hrs/FreeBSD/net_frr8-20220330-1.tar.gz

and changes that can be upstreamed are in the following repo:

 https://github.com/hrs-allbsd/frr/tree/freebsd

I am not sure if there is a demand for that, but a port for FRR main branch as of March 30 for testing can be found at:

 https://people.allbsd.org/~hrs/FreeBSD/net_frr-devel-20220330-1.tar.gz


I need some more investigation about 80a203f and 97c358d because the fix is not optimal and the former could change behaviors on non-FreeBSD platforms.  These patches should work fine on FreeBSD in any way.

Any comments or reports from others who are watching this PR are also welcome.
Comment 9 Olivier Cochard freebsd_committer freebsd_triage 2022-07-04 23:11:37 UTC
(In reply to Hiroki Sato from comment #8)

Here is a vnet jail regression script for FRR:

It works great with FRR 7 on FreeBSD 13.1.
But once upgraded to frr8, it failed to set some IP address.

Running it on a 12.3, I've noticed that bfd fails on this release.

https://github.com/ocochard/myscripts/blob/master/FreeBSD/jail/frr_lab.sh
Comment 10 mike 2022-07-05 12:02:02 UTC
(In reply to Olivier Cochard from comment #9)

There seem to be a few recent fixes in the tree that will hopefully be in 8.3 that might fix that issue ?

https://github.com/FRRouting/frr/pull/11516
https://github.com/FRRouting/frr/issues/11499
Comment 11 Olivier Cochard freebsd_committer freebsd_triage 2022-07-05 17:06:18 UTC
(In reply to mike from comment #10)
Yes I've just tested dev/8.3 branch and it fixes this regression.
But I've detected a new one regarding babel on dev/8.3.
Comment 12 commit-hook freebsd_committer freebsd_triage 2022-07-07 12:14:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=49f754e2225188ad07e64b7d505ffc44e3590306

commit 49f754e2225188ad07e64b7d505ffc44e3590306
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2022-07-07 11:52:46 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2022-07-07 12:12:51 +0000

    net/frr8-pythontools: Extra tools related to new major frr version

    PR:             260950

 net/Makefile                         | 1 +
 net/frr8-pythontools/Makefile (new)  | 7 +++++++
 net/frr8-pythontools/pkg-plist (new) | 3 +++
 3 files changed, 11 insertions(+)
Comment 13 commit-hook freebsd_committer freebsd_triage 2022-07-07 12:14:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=04630d170791e12f2b698167a1002d1dad028849

commit 04630d170791e12f2b698167a1002d1dad028849
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2022-07-07 11:42:17 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2022-07-07 12:12:50 +0000

    net/frr8: New major version 8.2.2 of FRRouting

    PR:             260950
    Obtained from:  Bug fixes by hrs, improved by bijanebrahimi@riseup.net

 net/Makefile                              |   1 +
 net/frr8/Makefile (new)                   | 146 ++++++++++++++++++++
 net/frr8/distinfo (new)                   |   3 +
 net/frr8/files/frr.in (new)               | 168 +++++++++++++++++++++++
 net/frr8/files/patch-Makefile.am (new)    |  11 ++
 net/frr8/files/patch-backport.patch (new) | 175 ++++++++++++++++++++++++
 net/frr8/files/watchfrr.in (new)          |  30 ++++
 net/frr8/pkg-descr (new)                  |   5 +
 net/frr8/pkg-message (new)                |  17 +++
 net/frr8/pkg-plist (new)                  | 220 ++++++++++++++++++++++++++++++
 10 files changed, 776 insertions(+)
Comment 14 Olivier Cochard freebsd_committer freebsd_triage 2022-07-07 12:16:41 UTC
Thanks Hiroki for your help fixing regression in the 8.x branch.