Dispatcher configuration¶
The dispatcher configuration files allows you to configure some of the beavior of the dispatchers.
Available files are:
- dispatcher configuration
- environment
- DUT environment
Dispatcher configuration¶
Environment configuration file is located on the server in:
/etc/lava-server/<hostname>.yaml
old configuration file/etc/lava-server/dispatcher.d/<hostname>/dispatcher.yaml
new configuration file
When loading the configuration, LAVA will look at the new configuration file and fallback to the old one
# Configuration example
# Each dispatcher might have a configuration file like this one.
# Use the fully qualified hostname of the worker as the filename,
# as shown in the lava-server logs, and create the file in
# /etc/lava-server/dispatcher.d on the *server*.
# Only set this key, if this dispatcher has many IPs
#dispatcher_ip: <this-dispatcher-ip>
# Only set this key, if this dispatcher is running separately from worker httpd
# server or listening on a custom port.
#dispatcher_http_ip: <dispatcher-http-ip>:<port>
# Only set this key, if this dispatcher is running separately from nfs server
# or listening on a custom port.
#dispatcher_nfs_ip: <dispatcher-nfs-ip>:<port>
# Only set this key, if this dispatcher is running separately from tftpd server
# or listening on a custom port.
#dispatcher_tftp_ip: <dispatcher-tftp-ip>:<port>
# Set this key, if you want to change the default lxc creation path
# No trailing /
# The default path is /var/lib/lxc
#lxc_path: <custom-path>
# Prefix for all temporary directories
# If this variable is set, the temporary files will be created in
# /var/lib/lava/dispatcher/tmp/<prefix><job_id> instead of
# /var/lib/lava/dispatcher/tmp/<job_id>
#prefix: <prefix>
# Set this variable when using http caching service based on url substitution
# like KissCache
# When downloading resources, lava dispatcher will use this formatting string
# instead of the original url.
#http_url_format_string: "https://cache.lavasoftware.org/api/v1/fetch/?url=%s"
# Directories to be bind mounted in test actions that run with docker.
# Must be an array with exactly two/three items:
# 1st item: the source directory in the host (mandatory)
# 2nd item: the destination directory in the container (mandatory)
# 3rd item: bind mount mode (optional)
# default is read-only if this item omitted
# set as "rw" could make the directory in container writeable
#test_docker_bind_mounts:
#- [<bind-mount1-host-path>, <bind-mount1-container-path>]
#- [<bind-mount2-host-path>, <bind-mount2-container-path>, "rw"]
Environment¶
The dispatcher environment is used to set the process environment when spawning
lava-run
.
Environment configuration file is located on the server in:
/etc/lava-server/env.yaml
default, for every dispatchers/etc/lava-server/dispatcher.d/<hostname>/env.yaml
for a specific dispatcher
When loading the configuration, LAVA will look at the dispatcher specific configuration and fallback to the default configuration.
# Configure the environment that will be used within the server and the dispatcher.
# If set to true, all variables inherited by the process will be dropped.
# The process environment is then fully controlled but you should then list all
# variables that your process needs.
purge: true
# List the variables that will be removed from the inherited environment.
# If purge is 'true', this list is useless.
# default: empty list
#removes:
#- HTTP_PROXY
#- HTTPS_PROXY
#- FTP_PROXY
#- NO_PROXY
# A dictionary of (key, value) that will be added to the inherited environment.
# If a key does not already exist in the inherited environment, it's added.
# default: an empty dictionary
overrides:
LC_ALL: C.UTF-8
LANG: C
# http_proxy: http://lava-lab-proxy
# https_proxy: http://lava-lab-proxy
# ftp_proxy: http://lava-lab-proxy
PATH: /usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/usr/sbin:/sbin
DUT environment¶
The DUT environment is used to set some environment variable on the DUT when running tests.
Environment configuration file is located on the server in:
/etc/lava-server/env-dut.yaml
default, for every dispatchers/etc/lava-server/dispatcher.d/<hostname>/env-dut.yaml
for a specific dispatcher
When loading the configuration, LAVA will look at the dispatcher specific configuration and fallback to the default configuration.
The format is the same as for the environment file.