17755: Merge branch 'main' into 17755-add-singularity-to-compute-image
[arvados.git] / doc / install / crunch2-lsf / install-dispatch.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install the LSF dispatcher
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 {% include 'notebox_begin_warning' %}
13 arvados-dispatch-lsf is only relevant for on premises clusters that will spool jobs to LSF. Skip this section if you are installing a cloud cluster.
14 {% include 'notebox_end' %}
15
16 Containers can be dispatched to an LSF cluster.  The dispatcher sends work to the cluster using LSF's @bsub@ command, so it works in a variety of LSF configurations.
17
18 *LSF support is currently considered experimental.*
19
20 Limitations include:
21 * Arvados container priority is not propagated to LSF job priority. This can cause inefficient use of compute resources, and even deadlock if there are fewer compute nodes than concurrent Arvados workflows.
22 * Combining LSF with docker may not work, depending on LSF configuration and user/group IDs (if LSF only sets up the configured user's primary group ID when executing the crunch-run process on a compute node, it may not have permission to connect to the docker daemon).
23
24 In order to run containers, you must choose a user that has permission to set up FUSE mounts and run Singularity/Docker containers on each compute node.  This install guide refers to this user as the @crunch@ user.  We recommend you create this user on each compute node with the same UID and GID, and add it to the @fuse@ and @docker@ system groups to grant it the necessary permissions.  However, you can run the dispatcher under any account with sufficient permissions across the cluster.
25
26 Set up all of your compute nodes "as you would for a SLURM cluster":../crunch2-slurm/install-compute-node.html.
27
28
29 h2(#update-config). Update config.yml
30
31 Arvados-dispatch-lsf reads the common configuration file at @/etc/arvados/config.yml@.
32
33 Review the following configuration parameters and adjust as needed.
34
35
36 h3(#BsubSudoUser). Containers.LSF.BsubSudoUser
37
38 arvados-dispatch-lsf uses @sudo@ to execute @bsub@, for example @sudo -E -u crunch bsub [...]@. This means the @crunch@ account must exist on the hosts where LSF jobs run ("execution hosts"), as well as on the host where you are installing the Arvados LSF dispatcher (the "submission host"). To use a user account other than @crunch@, configure @BsubSudoUser@:
39
40 <notextile>
41 <pre>    Containers:
42       LSF:
43         <code class="userinput">BsubSudoUser: <b>lsfuser</b>
44 </code></pre>
45 </notextile>
46
47 Alternatively, you can arrange for the arvados-dispatch-lsf process to run as an unprivileged user that has a corresponding account on all compute nodes, and disable the use of @sudo@ by specifying an empty string:
48
49 <notextile>
50 <pre>    Containers:
51       LSF:
52         # Don't use sudo
53         <code class="userinput">BsubSudoUser: <b>""</b>
54 </code></pre>
55 </notextile>
56
57
58 h3(#SbatchArguments). Containers.LSF.BsubArgumentsList
59
60 When arvados-dispatch-lsf invokes @bsub@, you can add arguments to the command by specifying @BsubArgumentsList@.  You can use this to send the jobs to specific cluster partitions or add resource requests.  Set @BsubArgumentsList@ to an array of strings.  For example:
61
62 <notextile>
63 <pre>    Containers:
64       LSF:
65         <code class="userinput">BsubArgumentsList: <b>["-C", "0", "-o", "/tmp/crunch-run.%J.out", "-e", "/tmp/crunch-run.%J.err"]</b></code>
66 </pre>
67 </notextile>
68
69 Note that the default value for @BsubArgumentsList@ uses the @-o@ and @-e@ arguments to write stdout/stderr data to files in @/tmp@ on the compute nodes, which is helpful for troubleshooting installation/configuration problems. Ensure you have something in place to delete old files from @/tmp@, or adjust these arguments accordingly.
70
71
72 h3(#PollPeriod). Containers.PollInterval
73
74 arvados-dispatch-lsf polls the API server periodically for new containers to run.  The @PollInterval@ option controls how often this poll happens.  Set this to a string of numbers suffixed with one of the time units @s@, @m@, or @h@.  For example:
75
76 <notextile>
77 <pre>    Containers:
78       <code class="userinput">PollInterval: <b>10s</b>
79 </code></pre>
80 </notextile>
81
82
83 h3(#ReserveExtraRAM). Containers.ReserveExtraRAM: Extra RAM for jobs
84
85 Extra RAM to reserve (in bytes) on each LSF job submitted by Arvados, which is added to the amount specified in the container's @runtime_constraints@.  If not provided, the default value is zero.
86
87 Supports suffixes @KB@, @KiB@, @MB@, @MiB@, @GB@, @GiB@, @TB@, @TiB@, @PB@, @PiB@, @EB@, @EiB@ (where @KB@ is 10[^3^], @KiB@ is 2[^10^], @MB@ is 10[^6^], @MiB@ is 2[^20^] and so forth).
88
89 <notextile>
90 <pre>    Containers:
91       <code class="userinput">ReserveExtraRAM: <b>256MiB</b></code>
92 </pre>
93 </notextile>
94
95
96 h3(#CrunchRunCommand-network). Containers.CrunchRunArgumentList: Using host networking for containers
97
98 Older Linux kernels (prior to 3.18) have bugs in network namespace handling which can lead to compute node lockups.  This by is indicated by blocked kernel tasks in "Workqueue: netns cleanup_net".   If you are experiencing this problem, as a workaround you can disable use of network namespaces by Docker across the cluster.  Be aware this reduces container isolation, which may be a security risk.
99
100 <notextile>
101 <pre>    Containers:
102       <code class="userinput">CrunchRunArgumentsList:
103         - <b>"-container-enable-networking=always"</b>
104         - <b>"-container-network-mode=host"</b></code>
105 </pre>
106 </notextile>
107
108 {% assign arvados_component = 'arvados-dispatch-lsf' %}
109
110 {% include 'install_packages' %}
111
112 {% include 'start_service' %}
113
114 {% include 'restart_api' %}