Skip to content

F #-: VRouter: add FRR (BGP, OSPF, BFD) configured from OpenNebula attributes - #409

Closed
netaviator wants to merge 1 commit into
OpenNebula:masterfrom
netaviator:pr/frr
Closed

netaviator wants to merge 1 commit into
OpenNebula:masterfrom
netaviator:pr/frr

Conversation

@netaviator

@netaviator netaviator commented Oct 9, 2026 •

Copy link
Copy Markdown

The VRouter cannot talk to upstream routers dynamically. Add an FRR module that runs bgpd, ospfd and bfdd next to the existing services and builds /etc/frr/frr.conf from attributes. Nothing changes unless it is turned on.

The attributes come from the VM context at boot (ONEAPP_VNF_BGP_, ONEAPP_VNF_OSPF_, ONEAPP_VNF_FRR_ROUTER_ID, ONEAPP_VNF_STATIC_ROUTES) and, while the VM runs, from the VM user template through OneGate. A change is checked with frr-reload.py --test and then loaded with --reload, so other neighbors keep their sessions. If the reload fails, the last good config is loaded again. A failed apply is retried with a growing delay.

BGP has IPv4 and IPv6 neighbors with password, BFD, prefix filters, local pref, MED and prepend. OSPF is OSPFv2 with area, cost, passive, timers, MD5 key and BFD per interface, an optional default route and redistribution of connected and static routes. On the VRRP backup, BGP gets a longer AS path and a higher MED, and OSPF a higher cost and metric, so peers prefer the master.

This needs the failover hooks (#405). The backup settings are switched by a hook in /etc/one-appliance/ha-hooks.d, which Failover has to call. Without #405 the hook is installed but never run, and both nodes stay on the master settings.

The service template is not part of this. The marketplace template needs an input for each attribute it should offer; the README lists them. There is no limit on the number of neighbors or OSPF interfaces in the module.

Checked with 483 unit specs, 28 of which compare the generated frr.conf with stored files, and with real FRR 10.2.1 in Docker (sessions, filters, live changes, rollback, the backup settings, OSPF, install and configure on Alpine).

It was also tested live on VMs with several instances and external peering.

@netaviator
netaviator force-pushed the pr/frr branch 3 times, most recently from bced06a to 7fea885 Compare October 9, 2026 14:05
…tributes

The VRouter cannot talk to upstream routers dynamically. Add an FRR module that runs bgpd, ospfd and bfdd next to the existing services and builds /etc/frr/frr.conf from attributes. Nothing changes unless it is turned on.

The attributes come from the VM context at boot (ONEAPP_VNF_BGP_*, ONEAPP_VNF_OSPF_*, ONEAPP_VNF_FRR_ROUTER_ID, ONEAPP_VNF_STATIC_ROUTES) and, while the VM runs, from the VM user template through OneGate. A change is checked with frr-reload.py --test and then loaded with --reload, so other neighbors keep their sessions. If the reload fails, the last good config is loaded again. A failed apply is retried with a growing delay.

BGP has IPv4 and IPv6 neighbors with password, BFD, prefix filters, local pref, MED and prepend. OSPF is OSPFv2 with area, cost, passive, timers, MD5 key and BFD per interface, an optional default route and redistribution of connected and static routes. On the VRRP backup, BGP gets a longer AS path and a higher MED, and OSPF a higher cost and metric, so peers prefer the master.

This needs the failover hooks (#405). The backup settings are switched by a hook in /etc/one-appliance/ha-hooks.d, which Failover has to call. Without #405 the hook is installed but never run, and both nodes stay on the master settings.

The service template is not part of this. The marketplace template needs an input for each attribute it should offer; the README lists them. There is no limit on the number of neighbors or OSPF interfaces in the module.

Checked with 483 unit specs, 28 of which compare the generated frr.conf with stored files, and with real FRR 10.2.1 in Docker (sessions, filters, live changes, rollback, the backup settings, OSPF, install and configure on Alpine).

It was also tested live on VMs with several instances and external peering.

Signed-off-by: Jan Gilla <jgilla@level66.network>
@netaviator netaviator closed this by deleting the head repository Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant