Skip to content

Dispatcher configuration

The dispatcher configuration files allow you to configure some of the behavior 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

```yaml

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.

Dispatcher tmp directory

dispatcher_download_dir: /var/lib/lava/dispatcher/tmp

Only set this key, if this dispatcher has many IPs

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: :

Only set this key, if this dispatcher is running separately from nfs server

or listening on a custom port.

dispatcher_nfs_ip: :

Only set this key, if this dispatcher is running separately from tftpd server

or listening on a custom port.

dispatcher_tftp_ip: :

Prefix for all temporary directories

If this variable is set, the temporary files will be created in

/var/lib/lava/dispatcher/tmp/ instead of

/var/lib/lava/dispatcher/tmp/

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"

Set this variable to automatically fallback to the original url if the

caching service returns an error.

http_cache_fallback_origin_url: True

Set additional http cache rules to include/exclude urls for caching.

if http_cache_include_rules specified, only matched urls will use cache even

cache service enabled

if http_cache_exclude_rules specified, matched urls will be skipped even cache

service enabled

http_cache_include_rules: ["https://.*nxrm.com"]

http_cache_exclude_rules: ["https://10.*"]

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:

- [, ]

- [, , "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 dispatcher
  • /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.

```yaml

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 dispatcher
  • /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.