divio / divio-cli

Command line interface to the Divio Cloud (formerly aldryn-client)
http://control.divio.com
Other
21 stars 19 forks source link

Is ping a good way to test for internet connectivity? #229

Open craiga opened 5 years ago

craiga commented 5 years ago

I'm currently working via corporate Wi-Fi network on which pings fail, but regular HTTP and HTTPS traffic is fine.

I'm finding that commands such as divio project setup … will fail, with divio doctor reporting the following:

$ divio doctor
Verifying your system setup
 ✓  Login
 ✓  Git
 ✓  Docker Client
 ✓  Docker Machine
 ✓  Docker Compose
 ✓  Docker Engine Connectivity
 ✖  Docker Engine Internet Connectivity
 ✓  Docker Engine DNS Connectivity

The following errors occurred:

 Docker Engine Internet Connectivity:
 > Command 'docker run --rm busybox:1.30 ping -c 1 -W 5 8.8.8.8' returned non-zero exit status 1
 > The 'ping' command inside docker is not able to ping 8.8.8.8. This might be due to missing internet connectivity, a firewall or a network configuration problem.

I can put "skip_doctor_checks": ["docker-server-ping"] into ~/.aldryn and then everything works fine.

Would it make sense to change the ping check to something like a cURL check to ensure HTTP(S) traffic works? As far as I understand things, that's what we're actually interested in confirming here.