zos
zos copied to clipboard
Improve internet connectivity check
https://github.com/threefoldtech/zos/blob/main/cmds/internet/main.go#L55-L70
2 things:
- if the check fails it immediately logs an error, even though it might take a while for DHCP to hand out an IP. This causes error logs to appear during node boot, which confuses users. It would be better to track the duration since we started checking internet connectivity, and if the time since start of testing is less than this duration, only log an info message stating the network is not ready yet.
- currently we use a wget of google.com, though most nodes boot with ipxe which means we technically already know they can get a DHCP ip and bootstrap.grid.tf is reachable. So suggestion is to do the wget to fetch (a small file) of bootstrap. This way if an ipxe booted zos reaches this stage but faills, we know for sure it is not an outside issue