Merge branch '20850-wb1-deprecated' refs #20850
[arvados.git] / doc / admin / diagnostics.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: Diagnostics
5 ...
6
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 The @arvados-client diagnostics@ command exercises basic cluster functionality, and identifies some common installation and configuration problems. Especially after upgrading or reconfiguring Arvados or server/network infrastructure, it can be the quickest way to identify problems.
14
15 h2. Using system privileges
16
17 On a server node, it is easiest to run the diagnostics command with system privileges. The word @sudo@ here instructs the @arvados-client@ command to load @Controller.ExternalURL@ and @SystemRootToken@ from @/etc/arvados/config.yml@ and use those credentials to run tests with system privileges.
18
19 When run this way, diagnostics will also include "health checks":health-checks.html.
20
21 <notextile><pre>
22 # <span class="userinput">arvados-client sudo diagnostics</span>
23 </pre></notextile>
24
25 h2. Using regular user privileges
26
27 On any node (server node, shell node, or a workstation outside the system network), you can also run diagnostics by setting the usual @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ environment variables. Typically this is done with a regular user account.
28
29 <notextile><pre>
30 $ <span class="userinput">export ARVADOS_API_HOST=zzzzz.arvadosapi.com</span>
31 $ <span class="userinput">export ARVADOS_API_TOKEN=xxxxxxxxxx</span>
32 $ <span class="userinput">arvados-client diagnostics</span>
33 </pre></notextile>
34
35 h2. Internal/external client detection
36
37 The diagnostics output indicates whether its client connection is categorized by the server as internal or external. If you run diagnostics automatically with cron or a monitoring tool, you can use the @-internal-client@ or @-external-client@ flag to specify how you _expect_ the client to be categorized, and the test will fail otherwise. Example:
38
39 <notextile><pre>
40 # <span class="userinput">arvados-client sudo diagnostics -internal-client</span>
41 [...]
42
43 --- cut here --- error summary ---
44
45 ERROR     60: checking internal/external client detection (11 ms): expecting internal=true external=false, but found internal=false external=true
46 </pre></notextile>
47
48 h2(#container-options). Container-running options
49
50 By default, the @diagnostics@ command builds a custom Docker image containing a copy of its own binary, and uses that image to run diagnostic checks from inside an Arvados container. This can help detect problems like lack of network connectivity between containers and Arvados cluster services.
51
52 The default approach works well if the client host (i.e., the host where you invoke @arvados-client diagnostics@) meets certain conditions:
53 * Docker is installed and working (so the diagnostics command can run @docker build@ and @docker save@).
54 * Its hardware and kernel are similar to the cluster's compute instances (so the @arvados-client@ binary and the custom-built Docker image are compatible with the compute instances).
55 * Network bandwidth supports uploading the Docker image (about 100 megabytes) in less than a minute.
56
57 The following options provide flexibility in case the default approach is not suitable.
58 * @-priority=0@ skips the container-running part of the diagnostics suite.
59 * @-docker-image="hello-world"@ uses a tiny "hello world" image that is already embedded in the @arvados-client@ binary. This works even if the client host does not have any docker tools installed, and it minimizes the data transferred during the diagnostics suite. It provides less test coverage than the default option, but it will at least check that it is possible to run a container on the cluster.
60 * @-docker-image=X@ (where @X@ is a Docker image name or a portable data hash) uses a Docker image that has already been uploaded to your Arvados cluster using @arv keep docker@. In this case the diagnostics tool will run a container with the command @echo {timestamp}@.
61 * @-docker-image-from=NAME@ builds a custom Docker image on the fly as described above, but using the specified image as a base instead of the default @debian:slim-stable@ image. Note that the build recipe runs commands like @apt-get install [...] libfuse2 ca-certificates@ so only Debian-based base images are supported. For more flexibility, use one of the above @-docker-image=...@ options.
62 * @-timeout=2m@ extends the time limit for each HTTP request made by the diagnostics suite, including the process of uploading a custom-built Docker image, to 2 minutes (the default HTTP request timeout is 10 seconds, and the default upload time limit is either the HTTP timeout or 1 minute, whichever is longer).
63
64 h2. Example output
65
66 <notextile><pre>
67 # <span class="userinput">arvados-client sudo diagnostics</span>
68 INFO       5: running health check (same as `arvados-server check`)
69 INFO      10: getting discovery document from https://zzzzz.arvadosapi.com/discovery/v1/apis/arvados/v1/rest
70 INFO      20: getting exported config from https://zzzzz.arvadosapi.com/arvados/v1/config
71 INFO      30: getting current user record
72 INFO      40: connecting to service endpoint https://keep.zzzzz.arvadosapi.com/
73 INFO      41: connecting to service endpoint https://*.collections.zzzzz.arvadosapi.com/
74 INFO      42: connecting to service endpoint https://download.zzzzz.arvadosapi.com/
75 INFO      43: connecting to service endpoint wss://ws.zzzzz.arvadosapi.com/websocket
76 INFO      44: connecting to service endpoint https://workbench.zzzzz.arvadosapi.com/
77 INFO      45: connecting to service endpoint https://workbench2.zzzzz.arvadosapi.com/
78 INFO      50: checking CORS headers at https://zzzzz.arvadosapi.com/
79 INFO      51: checking CORS headers at https://keep.zzzzz.arvadosapi.com/d41d8cd98f00b204e9800998ecf8427e+0
80 INFO      52: checking CORS headers at https://download.zzzzz.arvadosapi.com/
81 INFO      60: checking internal/external client detection
82 INFO      61: reading+writing via keep service at https://keep.zzzzz.arvadosapi.com:443/
83 INFO      80: finding/creating "scratch area for diagnostics" project
84 INFO      90: creating temporary collection
85 INFO     100: uploading file via webdav
86 INFO     110: checking WebDAV ExternalURL wildcard (https://*.collections.zzzzz.arvadosapi.com/)
87 INFO     120: downloading from webdav (https://d41d8cd98f00b204e9800998ecf8427e-0.collections.zzzzz.arvadosapi.com/foo)
88 INFO     121: downloading from webdav (https://d41d8cd98f00b204e9800998ecf8427e-0.collections.zzzzz.arvadosapi.com/sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412.tar)
89 INFO     122: downloading from webdav (https://download.zzzzz.arvadosapi.com/c=d41d8cd98f00b204e9800998ecf8427e+0/_/foo)
90 INFO     123: downloading from webdav (https://download.zzzzz.arvadosapi.com/c=d41d8cd98f00b204e9800998ecf8427e+0/_/sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412.tar)
91 INFO     124: downloading from webdav (https://a15a27cbc1c7d2d4a0d9e02529aaec7e-128.collections.zzzzz.arvadosapi.com/sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412.tar)
92 INFO     125: downloading from webdav (https://download.zzzzz.arvadosapi.com/c=zzzzz-4zz18-twitqma8mbvwydy/_/sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412.tar)
93 INFO     130: getting list of virtual machines
94 INFO     140: getting workbench1 webshell page
95 INFO     150: connecting to webshell service
96 INFO     160: running a container
97 INFO      ... container request submitted, waiting up to 10m for container to run
98 INFO    9990: deleting temporary collection
99 </pre></notextile>