Rework network configuration #209

Closed
fbl wants to merge 4 commits from fbl:network-overhaul into master
Owner

The configurenetwork script has been a big, hard to maintain monolith for a long time now, even though its functionality can be broken down into rather simple, easy-to-follow scripts. Also, due to some leftovers, it is rather slow and might also cause a race conditions (see #203).

This patchset aims to improve readabilty, maintainability and speed of our network configuration by removing manual changes to the kernel and separating static and dynamic configuration.

It might also fix the race condition mentioned in #203.

This patchset has been runtime-tested on a TP-Link WDR4900 using the node variant. One- and Two-Port devices, as well as devices using our DSA configuration still have to be tested.

Due to the rather weird dependencies of the layer3 variant to the base configuration established by the fff-network package, it should be tested for any regressions before applying the patchset.

The configurenetwork script has been a big, hard to maintain monolith for a long time now, even though its functionality can be broken down into rather simple, easy-to-follow scripts. Also, due to some leftovers, it is rather slow and might also cause a race conditions (see #203). This patchset aims to improve readabilty, maintainability and speed of our network configuration by removing manual changes to the kernel and separating static and dynamic configuration. It might also fix the race condition mentioned in #203. This patchset has been runtime-tested on a TP-Link WDR4900 using the node variant. One- and Two-Port devices, as well as devices using our DSA configuration still have to be tested. Due to the rather weird dependencies of the layer3 variant to the base configuration established by the fff-network package, it should be tested for any regressions before applying the patchset.
fbl added this to the next-bugfix milestone 2022-02-27 01:26:41 +01:00
fbl self-assigned this 2022-02-27 01:26:41 +01:00
fbl added 3 commits 2022-02-27 01:26:42 +01:00
1d3ed9953e fff-uradvd: Add reload trigger for network
fff-uradvd depends on values stored in the uci network config.
Therefore, a reload is required if the uci network config is modified.

As fff-uradvd does not support reloads, and possibly changing values are
given as command parameters, do a restart on procd reload.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
8cd45781a9 fff-network: Replace runtime configuration with reload_config
Instead of both setting values in the uci configuration and applying
them manually, only set the values in the uci configuration and do a
combined reload_config afterward.

This not only ensures that the changes to the configuration are actually
correct, but also decreases the runtime of configurenetwork.
b66987e5bd fff-network: Remove unnecessary restart of fff-uradvd
The explicit restat of fff-uradvd is not necessary anymore, as
appropriate procd reload triggers have been added, and reload_config is
executed after every run of configurenetwork.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
rohammer reviewed 2022-02-27 21:35:19 +01:00
@ -0,0 +49,4 @@
set network.bat0.fragmentation='1'
set network.bat0.orig_interval='1000'
set network.bat0.distributed_arp_table='1'
set network.bat0.hop_penalty='30'
Member

Hi Fabian,
der Block kommt doch mit fff-batman-adv rein. Sollte nicht default sein. Oder moechtest du den auch in der l3 haben?
Robert

Hi Fabian, der Block kommt doch mit fff-batman-adv rein. Sollte nicht default sein. Oder moechtest du den auch in der l3 haben? Robert
Author
Owner

Ich möchte die l3 config langfristig komplett unabhängig von dieser Basiskonfiguration machen. Kurzfristig würde ich diesen Umstand einfach - wie bisher - hinnehmen.

Ich möchte die l3 config langfristig komplett unabhängig von dieser Basiskonfiguration machen. Kurzfristig würde ich diesen Umstand einfach - wie bisher - hinnehmen.
Member

So ist es halt doppelt. Einmal hier und im package fff-batman-adv.

So ist es halt doppelt. Einmal hier und im package fff-batman-adv.
Author
Owner

Ah, an mir ist total vorbei gegangen, was du eigentlich meinst. Das war vorher ja auch nicht da und gehört hier entsprechend auch überhaupt nicht hin.

Ich hab da einen relativ alten Patch von mir wiederverwertet, möglicherweise ist da was übrig geblieben.

Würde ich entsprechend entfernen, gut aufgepasst!

Ah, an mir ist total vorbei gegangen, was du eigentlich meinst. Das war vorher ja auch nicht da und gehört hier entsprechend auch überhaupt nicht hin. Ich hab da einen relativ alten Patch von mir wiederverwertet, möglicherweise ist da was übrig geblieben. Würde ich entsprechend entfernen, gut aufgepasst!
fbl marked this conversation as resolved
rohammer reviewed 2022-02-27 21:47:09 +01:00
@ -0,0 +143,4 @@
echo "MAC for client is set already"
else
echo "Fixing MAC on br-client"
sleep 10
Member

Ich vermute, dass man hier das sleep nicht braucht. Im alten configurenetwork war da direkt davor ein network-restart. Auf den musste wohl gewartet werden. Hier gibt es nur ein uci commit.

Im Rest von configurenetwork ist auch noch so ein sleep uebrig, wo vorher ein network-restart war.

Ich vermute, dass man hier das sleep nicht braucht. Im alten configurenetwork war da direkt davor ein network-restart. Auf den musste wohl gewartet werden. Hier gibt es nur ein uci commit. Im Rest von configurenetwork ist auch noch so ein sleep uebrig, wo vorher ein network-restart war.
Author
Owner

Guter Punkt, der sollte nicht mehr nötig sein. Ebenso gilt dies für Fallunterscheidung, die kann komplett raus. Für das konfigurieren der fdff:: Adressen hatte ich das ja auch so gemacht, hier hab ich das dann wohl übersehen.

Guter Punkt, der sollte nicht mehr nötig sein. Ebenso gilt dies für Fallunterscheidung, die kann komplett raus. Für das konfigurieren der fdff:: Adressen hatte ich das ja auch so gemacht, hier hab ich das dann wohl übersehen.
fbl marked this conversation as resolved
fbl force-pushed network-overhaul from aa776ecbdf to ae0cfb7068 2022-02-28 17:28:14 +01:00 Compare
Author
Owner

Changes:

  • Remove bat0 interface configuration from 22-network-base (created in fff-batadv)
  • Remove unnecessary sleeps, uci commits and conditions for setting ETHMESHMAC and ROUTERMAC
Changes: - Remove bat0 interface configuration from 22-network-base (created in fff-batadv) - Remove unnecessary sleeps, uci commits and conditions for setting ETHMESHMAC and ROUTERMAC
rohammer approved these changes 2022-02-28 23:39:54 +01:00
rohammer left a comment
Member
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
``` Reviewed-by: Robert Langhammer <rlanghammer@web.de> ```
fbl modified the milestone from next-bugfix to 20220405-beta 2022-03-03 15:42:54 +01:00
fbl added a new dependency 2022-03-03 21:55:59 +01:00
fbl added a new dependency 2022-03-03 22:28:24 +01:00
Author
Owner

Auf meinen staging tree applied.

Auf meinen staging tree applied.
fbl closed this pull request 2022-03-05 19:25:38 +01:00
fbl deleted branch network-overhaul 2022-03-05 19:25:41 +01:00

Pull request closed

Sign in to join this conversation.
No description provided.