Skip to content

gluon-mesh-babel: implement neighbour check#2297

Merged
AiyionPrime merged 2 commits intofreifunk-gluon:masterfrom
AiyionPrime:gluon-state-check_babeld
Dec 14, 2022
Merged

gluon-mesh-babel: implement neighbour check#2297
AiyionPrime merged 2 commits intofreifunk-gluon:masterfrom
AiyionPrime:gluon-state-check_babeld

Conversation

@AiyionPrime
Copy link
Copy Markdown
Member

This lacks a check for has_default_gw4 or the decision, that babel can't give suitable response.

Resolves #2228.

@github-actions github-actions Bot added 3. topic: babel Topic: Babel Layer 3 Routing 3. topic: package Topic: Gluon Packages labels Aug 13, 2021
@@ -0,0 +1,2 @@
#!/bin/sh
out=$(echo dump | nc ::1 33123 | grep "add neighbour" 2>/dev/null) && [ -n "$out" ]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
out=$(echo dump | nc ::1 33123 | grep "add neighbour" 2>/dev/null) && [ -n "$out" ]
echo dump | nc ::1 33123 | grep -qF 'add neighbour'

As we're only interested whether there is matching output or not, grep -q should be used. Adding -F makes it more efficient, as it doesn't interpret the pattern as a regex.

Copy link
Copy Markdown
Member Author

@AiyionPrime AiyionPrime Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still lack a node/network to test this on;
One possible issue I see are possible error-messages of nc.
I'll apply the commit in a moment. Afterwords this can be marked as blocked by #2353 .

@AiyionPrime AiyionPrime marked this pull request as ready for review January 14, 2022 10:46
@AiyionPrime AiyionPrime added the 5. needs: testing Testing of the changes is necessary label Dec 13, 2022
@christf
Copy link
Copy Markdown
Member

christf commented Dec 14, 2022

this works as is as verified by test in Magdeburg.

One thing we should keep in mind is: babeld dump is CPU bound on large meshes and can have adverse effects on the performance of route distribution. After jech/babeld#57 is merged we should rework every component using dump on the babeld socked to reduce load.

@AiyionPrime
Copy link
Copy Markdown
Member Author

@christf Thank you very much.

@AiyionPrime AiyionPrime merged commit 1f87d15 into freifunk-gluon:master Dec 14, 2022
@AiyionPrime AiyionPrime deleted the gluon-state-check_babeld branch December 14, 2022 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. topic: babel Topic: Babel Layer 3 Routing 3. topic: package Topic: Gluon Packages 5. needs: testing Testing of the changes is necessary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gluon-online-status concept

3 participants