0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 02:01:55 +00:00
Commit Graph

4527 Commits

Author SHA1 Message Date
Katerina Kubecova
283ea03419 fixup! fixup! fixup! partial import seems working 2023-10-25 14:55:46 +02:00
Katerina Kubecova
95c3ac5d8b fixup! fixup! partial import seems working 2023-10-25 13:41:23 +02:00
Katerina Kubecova
64e7edaf41 fixup! partial import seems working 2023-10-25 12:27:46 +02:00
Katerina Kubecova
1eaf7213b6 partial import seems working 2023-10-25 12:18:19 +02:00
Katerina Kubecova
455e7e49c6 not working 2023-10-25 11:08:13 +02:00
Katerina Kubecova
eae05c1346 fixup! fixup! partial reload for RPKI - not working 2023-10-24 14:39:40 +02:00
Katerina Kubecova
292af59e06 fixup! partial reload for RPKI - not working 2023-10-24 12:00:03 +02:00
Katerina Kubecova
90f70e0009 partial reload for RPKI - not working 2023-10-24 09:52:09 +02:00
Katerina Kubecova
76de8ca8be fixup! fixup! fixup! Partial import reload looks working 2023-10-18 12:22:37 +02:00
Katerina Kubecova
5acdd8ec43 fixup! fixup! Partial import reload looks working 2023-10-17 15:28:31 +02:00
Katerina Kubecova
06954bbabf fixup! Partial import reload looks working 2023-10-17 15:17:53 +02:00
Katerina Kubecova
f9e46a8e31 Partial import reload looks working 2023-10-13 09:44:16 +02:00
Katerina Kubecova
21e7d9c5c3 Partial import reload looks working for cli 2023-10-12 15:18:42 +02:00
Katerina Kubecova
10bf227de7 Partial import reload 2023-10-12 13:16:54 +02:00
Maria Matejka
a532146886 fixup! Prefiltering routes by net and custom hook for partial reloads 2023-10-05 14:23:02 +02:00
Maria Matejka
479911ee78 fixup! Partial reloads of channels 2023-10-05 14:22:16 +02:00
Maria Matejka
468833b24f Channel reload: don't reload if export is down 2023-10-05 12:09:16 +02:00
Katerina Kubecova
b3e33da83d Partial reloads of channels
Now it's possible to reload only part of routes, e.g. when ROA has
changed.
2023-10-05 12:08:32 +02:00
Maria Matejka
898cc7ee9b Prefiltering routes by net and custom hook for partial reloads 2023-10-05 12:08:15 +02:00
Maria Matejka
45e8629f53 Channel feeding request respects the subnet tries 2023-10-04 10:39:46 +02:00
Maria Matejka
5e733a764d Channel feeding request has a done-hook 2023-10-04 10:02:43 +02:00
Maria Matejka
843bd05087 BGP: Splitting Route Refresh and Enhanced Route Refresh toggles 2023-10-03 11:27:49 +02:00
Maria Matejka
198fb23a3a Merge commit '93509af4' into HEAD 2023-10-03 11:26:46 +02:00
katerina.kubecova
93509af4c1 Table preexport net-filter refactoring
Also added a possibility for filtering by trie.
2023-10-03 11:08:28 +02:00
katerina.kubecova
216abcb12e ROA notifications store the affected nets into trie 2023-10-03 11:07:46 +02:00
Maria Matejka
8d1215dba6 Channel: Refeeding by an auxiliary request if needed.
If the protocol supports route refresh on export, we keep the stop-start
method of route refeed. This applies for BGP with ERR or with export
table on, for OSPF, Babel, RIP or Pipe.

For BGP without ERR or for future selective ROA reloads, we're adding an
auxiliary export request, doing the refeed while the main export request
is running, somehow resembling the original method of BIRD 2 refeed.

There is also a refeed request queue to keep track of different refeed
requests.
2023-10-03 09:54:39 +02:00
Maria Matejka
b58ebc4ef1 Babel: Properly handle route refeed 2023-09-27 17:40:40 +02:00
Maria Matejka
bf84daca8c RIP: Properly handle route refeed 2023-09-27 17:40:40 +02:00
Maria Matejka
860fbf0d65 Babel: Remove interfaces on shutdown
This avoids calling interface timer between Babel going
PS_DOWN and finally cleaning up the resource pool.
2023-09-25 09:31:18 +02:00
Maria Matejka
5cdc1b679c Kernel: refeed routes and delete them from kernel before actual shutdown 2023-09-24 23:23:08 +02:00
Maria Matejka
e65a5257b2 Protocols have now assigned startup phases
For now, there are 4 phases: Necessary (device), Connector (kernel, pipe), Generator (static, rpki) and Regular.
Started and reconfigured are from Necessary to Regular, shutdown backwards.

This way, kernel can flush routes before actually being shutdown.
2023-09-24 23:23:08 +02:00
Maria Matejka
5ab182d8d1 Iface: trace log messages cleanup 2023-09-24 22:20:01 +02:00
Maria Matejka
c92b5ad218 Table: Added some journal and export tracing 2023-09-24 20:43:04 +02:00
Maria Matejka
32bb548c11 Table: Fixed feed race condition
The problem happened like this:

1. Single route for the given net in table
2. A feed is started
3. The route is deleted (from another thread)
4. The feed finds an empty net, exports nothing, ignores journal (here is bug)
5. The route is added
6. The export transitions from FEEDING to READY
7. While processing the journal, the route deletion and addition combines into noop.

This way routes mysteriously disappeared in specific cases of link instability.

Problem fixed by explicitly marking the empty-net journal entries as processed in step 4.
2023-09-24 20:43:04 +02:00
Maria Matejka
c262c728eb Export: More strict export state checking on change 2023-09-24 20:43:04 +02:00
Maria Matejka
a920b5111c Properly consted routes inside table 2023-09-24 20:43:04 +02:00
Maria Matejka
206b33fd0b Filter iterator accepts lines instead of filter 2023-09-24 20:43:04 +02:00
Vojtech Vilimek
b43580d77d Renamed channel class pointers
The channel class pointers were strangely named , not .
2023-09-24 20:43:04 +02:00
Maria Matejka
144ac4c1d3 Logging: fixed size logfiles behaving as mmapped ringbuffers
This variant of logging avoids calling write() for every log line,
allowing for waitless logging. This makes heavy logging less heavy
and more useful for race condition debugging.
2023-09-24 20:43:04 +02:00
Maria Matejka
75a5936924 Logging limit enforcement moved into the rfile structure 2023-09-24 20:43:04 +02:00
Maria Matejka
427177edb7 Logging now doesn't lock with each message
The original logging routines were locking a common mutex. This led to
massive underperformance and unwanted serialization when heavily logging
due to lock contention. Now the logging is lockless, though still
serializing on write() syscalls to the same filedescriptor.

This change also brings in a persistent logging channel structures and
thus avoids writing into active configuration data structures during
regular run.
2023-09-24 20:43:04 +02:00
Maria Matejka
3c9429a282 Threads: added a generic method to run in all threads 2023-09-24 20:40:07 +02:00
Maria Matejka
32009cb6eb Logging: Abolished stdio in favor of write() to make the logging faster. 2023-09-24 20:40:06 +02:00
Maria Matejka
88307c31c5 CLI: Dropping the mechanism of echoing log messages
This is better done by running tail -f on a logfile.
2023-09-14 14:45:01 +02:00
Maria Matejka
8638c6f0b3 BGP: When debug { routes } is set, updates considered as loop are logged 2023-09-14 14:44:35 +02:00
Maria Matejka
0faf3bb630 Enhanced tracing of route refresh state 2023-09-14 14:40:33 +02:00
Maria Matejka
510b1046e1 Hostentry application locking
Due to a race condition between rta_apply_hostentry() and rt_update_hostentry(),
happening when a new route is inserted to a table, this commit makes it mandatory
to lock the next hop resolution table while resolving the next hop.

This may be slow, we'll fix it better in some future release
2023-08-29 10:24:54 +02:00
Maria Matejka
7776e47e32 Config obstacles are lockless now 2023-08-24 17:21:58 +02:00
Maria Matejka
5ba9878b4f BFD: Fixed reconfiguration issues
After converting BFD to the new IO loop system, reconfiguration never
really worked. Sadly, we missed this case in our testing suite so it
passed under the radar for quite a while.

Thanks to Andrei Dinu <andrei.dinu@digitalit.ro> for reporting and
isolating this issue.
2023-05-29 19:32:26 +02:00
Maria Matejka
6a3e5c2ae8 Fixed abort when running in foreground but stdin is closed
A forgotten else-clause caused BIRD to treat some pseudo-random place in
memory as fd-pair. This was happening only on startup of the first
thread in group and the value there in memory was typically zero ... and
writing to stdin succeeded.

When running BIRD with stdin not present (like systemd does), it died on
this spurious write. Now it seems to work correctly.

Thanks to Daniel Suchy <danny@danysek.cz> for reporting.

http://trubka.network.cz/pipermail/bird-users/2023-May/016929.html
2023-05-13 20:33:35 +02:00