Troubleshoot overlay networks

High availability in DTR depends on swarm overlay networking. One way to test
if overlay networks are working correctly is to deploy containers to the same
overlay network on different nodes and see if they can ping one another.

If the second command succeeds, it indicates overlay networking is working
correctly between those nodes.

You can run this test with any attachable overlay network and any Docker image
that has sh and ping.

Access RethinkDB directly

DTR uses RethinkDB for persisting data and replicating it across replicas.
It might be helpful to connect directly to the RethinkDB instance running on a
DTR replica to check the DTR internal state.

Warning: Modifying RethinkDB directly is not supported and may cause
problems.

Use SSH to log into a node that is running a DTR replica, and run the following
commands:

# REPLICA_ID will be the replica ID for the current node.REPLICA_ID=$(docker ps -lfname='^/dtr-rethinkdb-.{12}$'--format'{{.Names}}' | cut -d--f3)# This command will start a RethinkDB client attached to the database# on the current node.
docker run -it--rm\--net dtr-ol \-v dtr-ca-$REPLICA_ID:/ca dockerhubenterprise/rethinkcli:v2.2.0 \$REPLICA_ID

This container connects to the local DTR replica and launches a RethinkDB client
that can be used to inspect the contents of the DB. RethinkDB
stores data in different databases that contain multiple tables. The rethinkcli
tool launches an interactive prompt where you can run RethinkDB
queries such as: