Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically postpone automated reboots by deferable-reboot #1147

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ilario
Copy link
Member

@ilario ilario commented Nov 25, 2024

As explained in #1023, deferable-reboot was developed in two pieces, the main one on this repository and a very useful piece in the LibreRouterOS repository.

Without the second piece, the routers would just reboot every 27 hours, annoying.
With the second piece, the routers are checking the internet connectivity every 3 minutes (by means of a ping to a known IP on the internet) and the reboot is deferred by 13 minutes if the ping is successful.

With this PR, the second piece is also included in the deferable-reboot package in this repository.

The IP to be pinged has been de-hardcoded and moved to the LibreMesh configuration files in the system section.

The chosen IP is one of the ones being used as DNS:

list resolvers 4.2.2.2 # b.resolvers.Level3.net # DNS servers node will use
list resolvers 141.1.1.1 # cns1.cw.net # Set every entry empty for using the upstream (ISP) DNS server

I am testing in these days, please do not merge yet.

@ilario
Copy link
Member Author

ilario commented Nov 30, 2024

Tested and it works.
@germanferrero once this gets merged, you should consider removing the file in the LibreRouterOS repository https://gitlab.com/librerouter/librerouteros/-/blob/librerouter-1.5/files/etc/uci-defaults/90-cron-defer-reboot

@ilario
Copy link
Member Author

ilario commented Dec 2, 2024

Just increased a bit the deferring time (from 13 min to 30 min) in order to be sure that the network had time to re-establish the connection after a failure.
Also, added a random delay in the execution of the ping for not bombarding too hard the 4.2.2.2 with pings (does it ban IPs pinging too much?).

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