Configuration Reference¶
dunscaith reads its own settings from eight top-level sections: cluster, record, hosting,
settlement, recovery, checkpoint, supervise and escalation. The rest of the configuration belongs to
go-tool-base (ci, logging and so on).
Where configuration comes from¶
Configuration files are read from /etc/dunscaith/config.yaml and ~/.dunscaith/config.yaml by
default. --config <file> replaces that list and can be repeated. dunscaith config path shows
what was resolved.
A key on this page that holds one value can also be set from the environment: prefix DUNSCAITH_,
upper-case the key, replace . with _. For example DUNSCAITH_RECORD_ROOT sets record.root,
and DUNSCAITH_CHECKPOINT_S3_LOGINPROXY sets checkpoint.s3.loginProxy. Three kinds of key are
set in a file only:
-
The
updatesettings, which govern how a self-update checks a release's signature (see release signing). dunscaith ignores, with a warning, every variable that would be read as a key in theupdatesection, whatever its case or separator, andDUNSCAITH_UPDATEitself. -
A list, such as
escalation.commandorcheckpoint.s3.credentials. A variable holds one string, and that is refused where a list is wanted. - An adapter's key under
cluster.configthat has a capital letter or an underscore in it, such asprobeRuntime. A variable overrides such a key when a file already sets it. When no file does, the variable's name is lower-cased and each_becomes a., soDUNSCAITH_CLUSTER_CONFIG_PROBERUNTIMEsetscluster.config.proberuntime, which is not the adapter's key.
dunscaith does not read a .dunscaith.yaml from the working directory or above it. These settings
name commands to run and where credentials go, so they belong to you or your site, not to whichever
repository you are standing in. Share a project's settings by passing --config <file>.
dunscaith validates its sections against a schema on every command, and an unknown key inside a section is an error:
configuration: config validation failed:
record: additional properties 'bogus' not allowed [dunscaith]
An unknown top-level section is not refused. A misspelt recorde: is ignored without a message, so
check the spelling of section names yourself.
Keys are case-sensitive: write each as this page spells it. record.Root is refused as an unknown
key. A section in another case is refused with the spelling to use, whether it is one of
dunscaith's, such as Cluster:, or one of go-tool-base's, such as Log:. The
job commands refuse it; go-tool-base's own commands, such as version,
doctor and update, ignore a miscased go-tool-base section, so they still run to help you find a
broken file. Keys keep their case
because cluster.config carries the adapter's own keys, such as probeRuntime, and names from
outside dunscaith, such as a Kubernetes label.
Durations are Go duration strings such as 30s, 2m or 1h30m, and must be positive.
cluster¶
Which scheduler adapter to open.
| Key | Type | Default | Meaning |
|---|---|---|---|
cluster.name |
string | unset | A name for the cluster, recorded in each job's pointer. A submit fails writing the pointer if it is empty, so set it. |
cluster.adapter |
string, slurm or kubeflow |
unset | The go/dispatch adapter to open. |
cluster.config |
map | unset | The adapter's own configuration. The adapter validates it, not dunscaith. |
Two adapters are linked into the binary:
cluster.adapter |
Scheduler | cluster.config |
|---|---|---|
slurm |
Slurm, from a login node | the Slurm adapter's settings; all optional |
kubeflow |
Kubeflow Trainer | the Kubeflow adapter's settings; namespace is required, and one of runtimes or probeRuntime |
With cluster.adapter: slurm, dunscaith sets one adapter setting itself. The adapter finds out
what the cluster allows by submitting a held probe job and cancelling it, and
preflight.cacheDir is where it keeps the answer. dunscaith sets it to preflight.cache under
the record root, so the probe runs once and its answer is reused for up to 24 hours
(the adapter's preflight.maxAge). A command such as status then submits nothing. A
preflight.cacheDir in your own cluster.config is used as written, by every command but the
emergency stop. See
where the probe's answers are kept
for when the adapter runs the probe again.
stop --emergency uses no preflight cache at all, not even a preflight.cacheDir you set, so a
cache directory it cannot use never stops it. It runs the probe each time, which adds a held
probe job, submitted and cancelled, to every emergency stop.
The adapter uses the directory only when it is private: a real directory, not a symlink, owned by
the user who runs dunscaith, with mode 0700. It makes the directory that way when it is missing.
Any other directory is refused as an unsafe directory, and a directory that cannot be written is
an error too. Either way the command stops after its probe job has been submitted and cancelled,
so put the directory right before you run it again. An emergency stop never uses the directory, so
it is not stopped this way.
With cluster.adapter unset, a command that needs the scheduler stops with
no cluster adapter: set cluster.adapter (this build links: kubeflow, slurm). See
Connect dunscaith to your cluster.
record¶
Where job records live. See Choose a record backing.
| Key | Type | Default | Meaning |
|---|---|---|---|
record.store |
string, file |
file |
The record store. Only file exists. |
record.root |
string | /var/tmp/dunscaith-$USER/ |
The directory for the file store. Must be on a local filesystem. $VAR, ${VAR} and a leading ~/ are expanded, $USER falling back to the user database's name for the calling uid. A root naming any other unset variable is refused, and so is any other ${...} form, such as ${VAR:-default}: no default is expanded. The root must expand to an absolute path, with no .. element, no control character or line break, and no whitespace at either end; dunscaith refuses such a root rather than tidying it. A root that arrives with a forwarded command or a job's pointer is held to the same rules. --root and DUNSCAITH_ROOT override it. |
record.ephemeral |
boolean | false |
Declares that the root will not survive a reboot or pod restart. Lets dunscaith use a RAM-backed root it would otherwise refuse, and makes status and the submit receipt say so. |
The root is chosen in this order: --root, then DUNSCAITH_ROOT, then record.root, then the
default.
No key sets the clean-up age. dunscaith reads it from the host's systemd-tmpfiles configuration
and warns once per job when a record is older than it; see
the clean-up age warning.
hosting¶
How this login node names itself to the others. See Reach a job from another login node.
| Key | Type | Default | Meaning |
|---|---|---|---|
hosting.host |
string, a hostname | unset | The name a job's pointer records as its owning host, and the name submit and supersede check, in place of the OS hostname. Set it in a site profile where the OS hostname is not the name other login nodes use, or resolves only to loopback. It must still resolve to this host's own addresses. The root's HOST identity, which decides whether a host owns a record, is unchanged. |
settlement¶
| Key | Type | Default | Meaning |
|---|---|---|---|
settlement.unmatched |
residual or manual |
residual |
How a submit attempt whose outcome stayed unknown affects settlement. With residual, the settled record lists it and dunscaith sweeps for it later. With manual, an unmatched attempt escalates and the record waits for you to close it with abandon. It is recorded in each job's plan when it is submitted, so changing it affects new jobs only. |
recovery¶
| Key | Type | Default | Meaning |
|---|---|---|---|
recovery.cessation |
string | unset | A command whose answer proves a lost node's processes have stopped. dunscaith passes it to the adapter as its cessation setting, {command: <value>}, and the adapter applies its own default timeout. Set, it lets jobs that share a checkpoint recover automatically after node loss. Unset, they hold for a person. |
checkpoint¶
| Key | Type | Default | Meaning |
|---|---|---|---|
checkpoint.s3.credentials |
list of sources | [{kind: file, profile: default}] |
Ordered S3 credential sources for the checkpoint publish helper. Only references reach a job script, never a value. |
checkpoint.s3.root |
string, s3://bucket[/prefix] |
unset | The checkpoint root s3 login probes when it is given no --store. |
checkpoint.s3.proxy |
string, http(s)://host[:port] |
unset | The HTTP proxy compute nodes reach the S3 store through, passed to the publish helper as -proxy. Unset means directly. |
checkpoint.s3.loginProxy |
string, http(s)://host[:port] |
empty | The HTTP proxy s3 login's store probe goes through from the login node, whose network may differ from the compute nodes'. Never rendered into a job. Empty means directly. |
Each source is one of:
kind |
Keys | Notes |
|---|---|---|
file |
profile |
profile is letters, digits, ., _, -, at most 64 characters. Reads ~/.config/dunscaith/s3/<profile>/. |
secret |
path |
An absolute path, no ,, where a Kubernetes Secret is mounted. |
vault |
addr, auth, path, mount, role, approleDir, proxy |
addr is http(s)://host[:port]. auth is kubernetes or approle. kubernetes needs role and refuses approleDir; approle needs approleDir, an absolute directory holding role_id and secret_id, and refuses role. mount is the KV v2 mount, default secret; path is the secret within it. proxy is the HTTP proxy compute nodes reach this Vault through, http(s)://host[:port]; unset means directly. |
No proxy is ever taken from HTTPS_PROXY, HTTP_PROXY or NO_PROXY: the publish helper
and s3 login's probe ignore them. A proxy URL is http:// or https://, a host and an optional port; userinfo, a path,
a query and any other scheme are refused, so no proxy password sits in a job script. The store's
proxy, the login proxy and each Vault source's are independent.
The schema checks the shape of each entry and which of role and approleDir its auth takes. The
rest of the rules in the table (absolute paths, no repeats, the proxy URL's form) are checked when
configuration is loaded. See
Set up S3 checkpoint credentials.
supervise¶
| Key | Type | Default | Meaning |
|---|---|---|---|
supervise.poll |
duration | 30s |
How often the supervisor polls, and the unit that health and Unattended judgements are counted in. |
supervise.drain |
duration | 30s |
How long a signal-ended supervisor may spend finishing the step in flight. |
supervise.wait |
duration | 2m |
How long the foreground supervisor keeps working after the outcome, on clean-up, escalation delivery and settlement. |
supervise.giveup |
duration | 10m |
How long the foreground supervisor tolerates a record it cannot read, or a loop whose health has stopped advancing, before it stops, leaves the job Unattended and exits 4. It must be at least three times supervise.poll, the age at which status calls the loop unhealthy: a shorter value set here is refused, and the default grows to three polls when supervise.poll is longer than 3m20s. |
Derived from supervise.poll:
- the pointer's
supervised-atis refreshed at most once per ten polls (five minutes by default); - a job is shown
Unattendedfrom another host when that time is cleared or older than twenty polls (ten minutes by default); statuscalls the supervisor's loop unhealthy when it last completed more than three polls ago.
escalation¶
| Key | Type | Default | Meaning |
|---|---|---|---|
escalation.command |
list of strings, at least one | unset | A program and arguments, run with each escalation as JSON on stdin. Unset, escalations go to the supervisor's terminal only. See Deliver escalations to a command. |
Environment variables that are not configuration keys¶
| Variable | Effect |
|---|---|
DUNSCAITH_ROOT |
Overrides record.root. --root overrides it in turn. |
CI=true |
Same as --ci: no interactive SSH prompt. |
XDG_RUNTIME_DIR, TMPDIR |
Choose the SSH control socket directory. See Reach a job from another login node. |
A complete example¶
cluster:
name: gpu-prod
record:
store: file
root: /var/tmp/dunscaith-${USER}/
ephemeral: false
hosting:
host: login-0.ib.example
settlement:
unmatched: residual
supervise:
poll: 30s
drain: 30s
wait: 2m
escalation:
command: [/home/you/bin/notify-escalation]
checkpoint:
s3:
credentials:
- kind: file
profile: default