Skip to content

Commit 54d87cf

Browse files
Kyle Squizzatoshin-
authored andcommitted
Access rethinkcli through dtr-rethinkdb (docker#6061)
* dtr-rethinkdb now houses the rethinkcli which means we no longer need to pull the rethinkcli container from hub. Signed-off-by: Kyle Squizzato <[email protected]>
1 parent b6b770d commit 54d87cf

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

datacenter/dtr/2.4/guides/admin/monitor-and-troubleshoot/troubleshoot-with-logs.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You can run this test with any overlay network, and any Docker image that has
4040

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

4545
> **Warning**: Modifying RethinkDB directly is not supported and may cause
4646
> problems.
@@ -51,21 +51,14 @@ commands:
5151

5252
```bash
5353
{% raw %}
54-
# REPLICA_ID will be the replica ID for the current node.
55-
REPLICA_ID=$(docker ps -lf name='^/dtr-rethinkdb-.{12}$' --format '{{.Names}}' | cut -d- -f3)
5654
# This command will start a RethinkDB client attached to the database
5755
# on the current node.
58-
docker run -it --rm \
59-
--net dtr-ol \
60-
-v dtr-ca-$REPLICA_ID:/ca dockerhubenterprise/rethinkcli:v2.2.0 \
61-
$REPLICA_ID
56+
docker exec -it $(docker ps -q --filter name=dtr-rethinkdb) rethinkcli
6257
{% endraw %}
6358
```
6459

65-
This container connects to the local DTR replica and launches a RethinkDB client
66-
that can be used to inspect the contents of the DB. RethinkDB
67-
stores data in different databases that contain multiple tables. The `rethinkcli`
68-
tool launches an interactive prompt where you can run RethinkDB
60+
RethinkDB stores data in different databases that contain multiple tables. The `rethinkcli`
61+
tool launches an interactive prompt where you can run RethinkDB
6962
queries such as:
7063

7164
```none
@@ -91,7 +84,7 @@ queries such as:
9184
'repositories',
9285
'repository_team_access',
9386
'tags' ]
94-
87+
9588
# List the entries in the repositories table
9689
> r.db('dtr2').table('repositories')
9790
[ { id: '19f1240a-08d8-4979-a898-6b0b5b2338d8',

0 commit comments

Comments
 (0)