Commit graph

19 commits

Author SHA1 Message Date
Stefan Hanreich db03d26176 frr: enable and start frr on reloading the controller config
Since we now ship frr with Proxmox VE, the frr service is available on
the nodes but disabled on install. Prior to that, users had to
manually install frr, which automatically enabled the service. When
first applying a SDN configuration with an EVPN controller, we always
fell back to restarting the frr service, because reloading fails when
the daemon isn't running. This fallback to restarting leads to the
service running but still being in the disabled state. This means that
the EVPN setup is working until the next reboot. To avoid the
situation where users configure an EVPN controller and everything
seems to be working, until a restart breaks the EVPN setup,
additionally enable and start the frr service before trying to reload
the configuration.

We enable the service after checking for the existence of
frr-pythontools in order to avoid the situation where users apply an
SDN configuration with an EVPN controller, but reloading fails due to
a missing frr-pythontools package. Since we do an early return there,
we never fell back to restarting the service in case frr-pythontools
was not available. If we enabled the service before the check, the
configuration would apply after a reboot since it already got written
to the frr configuration file.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2025-04-09 08:12:01 +02:00
Stefan Hanreich 873b1431d6 frr: remove erroneous outfunc from frr-reload command
Prior to the upgrade to frr-pythontools 10.2.1, frr-reload.py did not
print any output to STDOUT, which masked the erroneous outfunc
provided in run_command. With 10.2.1 frr-reload.py now prints to
STDOUT, which triggers the codepath for invoking the outfunc, leading
to an error when invoking frr-reload.py. By removing the outfunc the
invocation works again.

In addition to fixing the regression introduced, we also now print the
frr-reload.py informational output to the tasklog, which can be
helpful in debugging any issues when reloading the frr configuration.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2025-04-09 08:12:01 +02:00
Alexandre Derumier via pve-devel 7638f25336 fix #5364: bgp|evpn: derivated router-id from mac address for ipv6 underlay
for ipv4, we use the iface ipv4 router-id as router-id need to 32bit.

That's doesn't work for pure ipv6 underlay network.

since https://www.rfc-editor.org/rfc/rfc6286, we can use any 32bit id,
it's just need to be unique in the ASN.

Simply use the last 4 bytes of iface mac address as unique id

changelog V2: add missing test

Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-22 13:56:48 +02:00
Alexandre Derumier via pve-devel c508ffa2de fix #5361: evpn: fix ipv6 route-map
Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-22 13:56:48 +02:00
Alexandre Derumier via pve-devel 51c766f8a0 fix #5319: frr.local: add support for bgp-community
Need to be inserted after ip prefix-list and before route map

Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-22 13:56:48 +02:00
Stefan Lendl 96d7d81d6c evpn: extract read_local_frr_config
to allow mocking local fs access

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-04-04 16:50:08 +02:00
Alexandre Derumier d7d1181ed5 controllers: evpn: fix null routes order && ipv6
- don't duplicate ip
- ipv6 use "ipv6 route"
- order correctly

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2024-01-22 11:57:37 +01:00
Alexandre Derumier dbacff605f controllers: evpn: frr config cleanup
Some values have been reordered in last version

- bump version to 8.5.2
- move no bgp graceful-restart notification
- move neighbor VTEP activate

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2024-01-22 11:57:37 +01:00
Alexandre Derumier e614da43f1 controllers: evpn: bugfix: use prefix-list in route-map instead evpn match
"match evpn" in route-map is broken since 8.5.0
https://github.com/FRRouting/frr/issues/14419

the patch
272c6d5db1
is converting type-2 && type-5 evpn routes to prefix-prefix.
(fixing prefix-list not working previously, but breaking "match evpn")

So, simply use prefix-list now, as "match epvn" was a workaround anyway.

reported on the forum, where user have routing loop between the 2 exit-nodes:
https://forum.proxmox.com/threads/sdn-with-evpn-controller-routing-loop-when-using-multiple-exit-nodes.137362/

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2024-01-22 11:57:37 +01:00
Alexandre Derumier b5471f5a2f controllers: evpn: add ipv6 prefix-list support
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2024-01-22 11:57:37 +01:00
Thomas Lamprecht a3c114c0ef controller: evpn reload: use log_warn to cause a task-warning
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-22 19:49:04 +01:00
Alexandre Derumier 9ce18f80bc controllers: add isis router plugin 2023-10-25 12:50:41 +02:00
Alexandre Derumier ced9392063 controllers: frr: add parsing of "interfaces" section 2023-10-25 12:50:35 +02:00
Alexandre Derumier e1ab3d7c28 controller: evpn: fix find_bgp_controller 2023-10-25 12:50:28 +02:00
Alexandre Derumier 243fa522b6 evpn: update config to frr 8.5.1
add default values:
 "no bgp hard-administrative-reset"
 "no bgp graceful-restart notification"

to avoid frr-reload warning

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-06 10:23:57 +02:00
Alexandre Derumier 91b2f632c0 fix #4389: evpn: exit nodes: null routes subnets from other zones
We don't want to routes subnets between different zones when same
exit node is used.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-06 10:23:57 +02:00
Alexandre Derumier f56311de97 fix #4662: frr: fix config generation ordering
vrf and router bgp vrf need to be ordered by vrf name

ip protocol need to be at the end

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-06 10:23:57 +02:00
Alexandre Derumier 5d5b4099d1 fix #4657: evpn: fix exit-node with multiple vrf
Currently, if a node is primary exit-node for 1 vrf, and secondary
exit-node for another vrf,

The deny route-map is filtering routes imports for both vrf.

This patch adds filtering only for the vrf's where the node is
secondary.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-06 10:23:57 +02:00
Thomas Lamprecht 6029cbb071 separate packaging and source build system
like almost all of our repos do nowadays, modern git can detect such
things on rebase so in development stuff should be hopefully not too
much affected by this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 18:18:57 +02:00
Renamed from PVE/Network/SDN/Controllers/EvpnPlugin.pm (Browse further)