Is ping a good way to test for internet connectivity?

Open
#229 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli, networking

Research direction

Start with the divio doctor entry point and locate the docker-server-ping check described in the issue. Review how it tests Docker Engine internet connectivity and whether an HTTP(S) check better reflects the traffic required by divio project setup. Done means the check no longer rejects networks where HTTP and HTTPS work but ping is blocked.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
23
Forks
19
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from divio/divio-cli

All issues in divio/divio-cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.