Expand description
Runpod as a training target: a pod created for a run over the REST API (v2), reached over SSH with per-run keys, guarded by a watchdog running on the pod, and deleted once the run’s results are retrieved.
A Runpod target is not an executor of its own: once its pod is ready, the run
goes through the SshExecutor and the native
runtime, like an SSH target.
Structs§
- Assessment
- What one look at the disk calls for.
- Attempt
- One create call.
- Capture
- The pod’s log kept in a run directory (
POD_LOG, mode 0600) and its cursor (POD_LOG_CURSOR). PastPOD_LOG_CAP, one line says the log was capped and nothing more is kept. The cursor is written when it moved, at most once a second while lines keep coming, then once more at the end (dropping the capture writes it too): a cursor behind the log repeats a few lines on the next resume, never loses one. - CostCap
- When the cost cap of a pod applies, in Unix seconds.
- Create
Pod - The body of
POST /pods: exactly the v2 fields overbrainer sets (the API rejects any unknown field with a 422). - Cuda
Version - A CUDA version offered by a GPU type’s machines.
- Data
Center - A data center of the catalog (
GET /catalog/datacenters). - Data
Center List GET /catalog/datacenters.- Data
Center Stock - A data center with the stock of chosen GPU types.
- Disk
Probe - What
disk_probe_scriptfound. - Disk
Watch - The disk policy of one followed run: it warns from
WARN_PERCENTon, and atACT_PERCENT, or when the next checkpoint would not fit, grows the network volume withinmax_volume_gbor stops the job with a snapshot. - GpuFilter
- What
select_gpuskeeps. The default keeps every Secure Cloud GPU type. - GpuMax
Count - Most GPUs of one type a pod can have, per cloud: a ceiling, not stock.
- GpuOffer
- A GPU type in stock and what a pod of it costs.
- GpuPrice
- List prices of one GPU, in USD per hour.
- GpuRequest
- The GPU part of
CreatePod. - GpuType
- A GPU type of the catalog (
GET /catalog/gpus). Only the fields overbrainer uses are read; every one toleratesnull. - GpuType
List GET /catalog/gpus.- Invalid
PodId - A string rejected by
PodId::new: empty, or holding anything but ASCII letters and digits. - LogQuery
- What to ask of the log stream.
- Mounts
- Volumes of
CreatePod. - Network
Mount - A network volume and where it is mounted.
- Network
Volume - A network volume of the account (
GET /network-volumes). - Network
Volume List GET /network-volumes.- NewSecret
- The body of
POST /account/secrets. Only the JSON serializer ever sees the value:Debugshows the name only. - Pagination
- Paging of
GET /podsandGET /templates. - Pod
- A pod, as
GET /pods/{id},GET /podsandPOST /podsreturn it. Only the fields overbrainer uses are read. - PodCtx
- What the pod flows share.
- PodEnv
- The part of a pod’s environment overbrainer reads back.
- PodGpu
- The GPUs of a pod.
- PodId
- A pod ID as Runpod assigns it: letters and digits only, so it is safe in a URL path and a file.
- PodKeys
- The keys of a run: the client key overbrainer logs in with, and the pod’s host key. The private host key only lives in memory, as the base64 of its OpenSSH file, until it is sent in the create call.
- PodLog
Line - One line of a pod’s log, as the stream gives it and
POD_LOGkeeps it. - PodPage
- One page of
GET /pods. - PodPlan
- What to create for a run.
- PodRecord
runs/<run-id>/pod.json. It never holds a private key, the API key or the pod’s environment: only the public host key and what Runpod reported.- PodRow
- A row of
overbrainer pod ls. - PodSettings
- What a pod’s bootstrap and watchdog need to know, sent in its
env. - PodSsh
- SSH access to a pod.
- Provisioned
- A pod ready for the run: reachable over SSH with its pinned host key, with a watchdog that proved it can delete it.
- Removal
- What
pod rmdid: the pods it deleted, even when it failed. - Removed
- A pod
pod rmdeleted. - Runpod
Client - A client of the Runpod REST API (v2) with the account API key.
- Runpod
Target - A
runpodtarget ofoverbrainer.toml, defaults applied. - Secret
- A secret of the account (
/account/secrets). Runpod never returns its value. - Secret
List - The answer of
GET /account/secrets. - SshDirect
- The public endpoint of a pod’s SSH server.
- SshEndpoint
- The SSH endpoint of a pod as last seen.
- Stock
- The stock of one catalog entry (a GPU type in a data center, or a data center for a GPU type).
- Template
- A template of the account (
GET /templates). Itsenv, which may hold secrets, is never read. - Template
Page - One page of
GET /templates. - Timing
- How long the provisioning steps wait.
Timing::standardin production; tests use milliseconds. - Usage
- How much of the run’s disk is used.
- Volume
Disk - The network volume of a pod.
Enums§
- ApiError
- Errors of the Runpod API. No variant ever holds the API key or a pod’s host
key. A create call’s error never holds any text from Runpod’s answer either,
however that text was shaped: its message is chosen only from the HTTP
status (see
RunpodClient::status_error), because no amount of pattern matching against ways a server might chunk, escape or encode an echoed value can be shown complete; not showing any of it is the only claim this client can make and keep. - Attempt
Result - How one create call ended.
- Availability
- A catalog stock band, as Runpod writes it.
- Critical
- Why the disk must be acted on.
- Delete
Reason - Why overbrainer deletes a pod.
- Deleted
By - Who removed a pod.
- Ending
- What became of a pod once its job ended.
- LogError
- Why reading a pod’s log stopped.
- LogSource
- Where a line of a pod’s log comes from.
- PodError
- Errors of a Runpod run’s pod: provisioning, keys, readiness, deletion.
- PodState
- Where a run’s pod stands.
- PodStatus
- A step of a pod’s life.
- Remote
Status - What Runpod says a pod is doing (
desiredStatusin v1,statusin v2). - Resolve
Error - Why an
autochoice of a Runpod target found nothing: each message says what was asked. - RowKind
- What overbrainer knows of a pod of
pod ls. - Watched
- How
watch_on_podended.
Constants§
- ACT_
PERCENT - Use, in percent, at which the disk is grown or the job stopped.
- BOOTSTRAP_
LOG - The bootstrap’s log on the pod, in the run directory on the pod.
- CLIENT_
KEY - The run’s client private key, in
SSH_DIR. - COST_
CAP_ FILE - Where the client writes, on the pod, when the watchdog deletes the pod for the cost cap (Unix seconds), in the run directory.
- DEADLINE_
MARGIN - How long after the watchdog’s deadline the client deletes the pod itself, when it is still there: the watchdog should have done it first.
- DISK_
PROBE_ EVERY - How often, at most, the disk probe (
du) runs. - DRAIN_
WAIT - How long the last read before a delete waits for the lines not read yet.
- GROW_
WINDOW - How long the API may keep showing the old size after a grow before the job is stopped.
- HOST_
KEY_ ENV - The create call’s variable holding the base64 of the pod’s private host key: a reference to the run’s host key secret, which Runpod resolves at boot.
- HOST_
KEY_ SECRET_ PREFIX - Prefix of the name of every run’s host key secret.
- JOB_ENV
- Where the bootstrap writes the jobs’ environment on the pod.
- KNOWN_
HOSTS - The pod’s pinned host key, in
SSH_DIR. - LEASE_
FILE - The lease a client following a job keeps on its pod, in the run directory:
the watchdog skips its
max_hoursdeadline while the file was touched less thanLEASE_TTLago. - LEASE_
TTL - How long a renewed lease holds the deadline off; the watchdog’s
OVERBRAINER_LEASE_TTLdefault. - MAX_
COST_ REACHED - Why a run fails when its pod was deleted on
max_cost_usdby its watchdog. - MAX_
HOURS_ REACHED - Why a run fails when its pod was deleted on
max_hours, by the client’s own guard or by the pod’s watchdog. - MIN_
CAP_ TIME - Least time
max_cost_usdshould buy for a run to train before its cost snapshot:SNAPSHOT_LEADtwice. - MIN_
CUDA_ VERSION - Lowest CUDA version of the host driver, for
DEFAULT_RUNPOD_IMAGE’s CUDA 13. - POD_
FILE - The pod record of a run, in its local run directory.
- POD_LOG
- The pod’s logs, in a run directory: JSON lines
{ts, source, line}. - POD_
LOG_ CAP - Largest
POD_LOGkept, in bytes: past it, one line says so and the capture stops. - POD_
LOG_ CURSOR - The last event ID of the stream kept in
POD_LOG, in a run directory. - POD_
RECORD_ VERSION - Format version of
POD_FILE. - RETRIEVED_
MARKER - Where the watchdog looks for the client’s “retrieved” marker, in a run directory on the pod.
- SECRETS_
FORBIDDEN_ MESSAGE - A secret write was refused with a 403: the API key lacks the permission.
- SNAPSHOT_
AT_ FILE - Where the client writes, on the pod, when the job is stopped with a snapshot for the cost cap (Unix seconds), in the run directory: read by the watchdog.
- SNAPSHOT_
LEAD - How long before the pod is deleted at the latest its job is asked for a
snapshot: the watchdog’s
OVERBRAINER_SNAPSHOT_LEADdefault, for the cost cap as for the deadline. - SNAPSHOT_
SHARE - Share of
max_cost_usdat which the job is stopped with a snapshot. - SSH_
CONFIG - The run’s ssh config, in
SSH_DIR. - SSH_DIR
- Directory of a run’s SSH files, in its local run directory.
- TAIL_
MAX - Most lines Runpod replays (
tail); more is refused. - USER_
AGENT User-Agentof every request. Runpod sits behind Cloudflare, which answers a generic client’s user agent with a 403 (“error code: 1010”).- VOLUME_
MOUNT - Where a network volume is mounted.
- VOLUME_
SIZE_ FILE - Where the client writes the network volume’s size in GB, in the run directory, for the watchdog’s own disk rule.
- VOLUME_
USABLE_ PERCENT - Share of a network volume’s size, in percent, that can really be written: Runpod’s quota refuses writes a little before the size in GB.
- VOLUME_
WORKDIR - Directory of the run directories on a network volume, so they outlive the pod.
- WARN_
PERCENT - Use, in percent, of the first warning.
- WARN_
STEP - Percent between two warnings, after the first one.
- WATCHDOG_
ACT_ PERCENT - Use, in percent, at which the watchdog asks for a snapshot on its own: later
than
ACT_PERCENT, so a grow overbrainer is making comes first. - WATCHDOG_
LOG - The watchdog’s log on the pod, in the run directory on the pod.
- WORKDIR
- Directory of the run directories on a pod without a network volume. Nothing
else in the image uses it, and
/workspaceitself is never a mount point.
Functions§
- alias
- The SSH host alias of a run’s pod, also its
HostKeyAlias. - arm_
cost_ cap - Hands the cost cap of
podto its watchdog before the job ofrunstarts: when to stop the job with a snapshot and when to delete the pod, in files the watchdog reads every minute, with a warning when the cap buys too little training (short_cap_warning). Nothing to do without a cap, or for a kept pod. - assess
- What
usagecalls for: a warning atWARN_PERCENTand at each furtherWARN_STEPabovewarned(the last warning’s percent), and an action atACT_PERCENTor when the free space is less than 1.5 timescheckpoint_bytes, the size of the newest checkpoint when known. - base64
bytesin standard base64, with padding and no line break.- bootstrap_
functions - The bootstrap’s shell functions, without the call that runs them.
- by_
price - Cheapest Secure Cloud price first (no price last), ties by more VRAM, then by ID.
- capture
- Keeps the log of the pod
pod_idin the directory of the runrun_idwhile the pod exists: follows its stream from the kept cursor (or the longest replay), until the pod is gone, the cap is reached or the API refuses. Best effort: failures are logged, never returned. - chain
errorand its sources, joined with:.- cheapest_
in_ stock - The cheapest GPU type in stock a pod of
targetwould get, from the cataloggpus, priced fortarget.gpu_countGPUs, asoverbrainer pod gpuslists prices: itsautoGPU types asresolve_with_floorpicks them (withfloor_gb), else its listed ones.Nonewhen none is in stock with a price. - connect_
followed - Connects to the pod of the run
runwithclientthrough the ssh config the process following it wrote (the endpointpod.jsonholds, for the built-in client), fortrain stopwhile that process holds the project: no Runpod API call, and nothing written locally, so the run directory stays that process’s alone.Nonewhen the run has no pod left or no ssh config or endpoint yet. - data_
center_ stock - Every data center with the stock of each
chosenGPU type, ordered by ID. - data_
center_ table - The rows of
overbrainer pod datacenters, header first, sorted by ID; nothing whendata_centersis empty. The stock column counts the GPU typesdata_centersreports in stock there, not a chosen set. - disk_
probe_ script - The script printing the size of the newest checkpoint of the run in
run_dir, and with a network volume mounted atvolume_dir, what the volume holds, both in KiB, each after its@nameline. It always succeeds. - drain
- The last read of the log of the pod
pod_idinto the directory of the runrun_id, before the pod is deleted: what the stream gives from the kept cursor withinDRAIN_WAIT. Best effort. - drop_
host_ key - Deletes the host key secret of the run
run_id, found by name; nothing when there is none. - drop_
host_ key_ or_ warn drop_host_key, a failure only warned about with how to finish it.- end_pod
- Ends the pod of the run
runonce its job ended, after copying the watchdog’s and the bootstrap’s logs intoruns/<run-id>/.pod/. Only when the results wereretrieved(Outcome::retrieved: every file the pod has was downloaded and verified) is the “retrieved” marker written on the pod, first (so its watchdog deletes it even if this client’s delete fails), then the pod is deleted unless kept and its deletion confirmed, other pods of the run are swept (any whose deletion cannot be confirmed is recorded inpod.json), and, when none is, the run’s private client key is removed and its host key secret deleted. Otherwise the pod is left to its watchdog’s retrieve grace (a kept pod stays kept), with a warning telling how to retrieve the results again or remove the pod. - export_
room_ warning - The warning when the container disk of
container_disk_gbGB, without a network volume, may be too small for an export needingneed_bytes(seeexport_disk_bytes) beside the run: more than 90% of the disk.Nonewhen it fits. - follow
- Follows the started run
recordwithruns::watch, until its job ends, with the client’s own guard: at the watchdog’s deadline plusDEADLINE_MARGIN, a pod still there is deleted and the run savedFailed(never for a kept pod). That iswatch_on_pod, the pod’s logs kept meanwhile (with_pod_logs), thensettle_watch. - follow_
logs - Follows the log stream of the pod
idforquery, forever:sinkgets each batch of lines assnapshotsays. A dropped connection is opened again from the last event ID, after 0.5 s doubling up to 15 s (reset once an event arrives), or Runpod’sRetry-After. Returns only why it stopped: a refusal that would come back on every reconnect (400, 401, 403, 404, 422; a 404 once the pod is deleted), or a failedsink. - forget_
client_ key - Removes the private client key of a run whose pod is gone, best effort.
- forget_
keys - Removes the private client key of the run
run_idand deletes its host key secret, best effort, once itspod.jsonshows no pod of it that may still exist (no pod, or one confirmed deleted, and no stray): a stray pod restarted later boots with the same secret. Callers savepod.jsonfirst, strays included. Keys kept here go once the strays are deleted: byoverbrainer pod rm, or by the sweep of the secrets of ended runs at the next start. - gpu_
table - The rows of
overbrainer pod gpus, header first, forgpusalready filtered and sorted (seeselect_gpus); nothing whengpusis empty.data_center, when given, is shown as the stock column instead of the overall band (seeGpuType::stock_in). - grown_
size - The size, in GB, to grow a network volume of
current_gbto: half again its size, and at least 50 GB more, but never pastmax_gb.Nonewhen that is no growth at all. - host_
key_ placeholder - What the pod’s
envholds instead of the host key: Runpod replaces it with the secret’s value when the pod boots. - host_
key_ run - The run of the host key secret
name, orNonewhennameis not one. - host_
key_ secret - The name of the host key secret of the run
run_id. A run ID is ASCII letters, digits,_and-, at most 64 characters, so the name meets Runpod’s rules (a letter first, at most 191 characters). - hours
max_hoursas a duration, zero when it cannot be one (the configuration rejects such values).- job_
started - Records that the job of the run was started on the pod.
- keep_
file - Replaces the kept file
pathofrun_dirwithbytes, whole or not at all: written to a new temporary file (mode 0600, a stale one removed first), then renamed over it. - kept_
cursor - The event ID the log kept in
run_dirends at, if any. - kept_
lines - The lines of the log kept in
run_dir, oldest first; a line that cannot be read is skipped. Empty when none is kept. - limit_
reached - Why the run of
pod, found gone atnow, failed when a limit of its watchdog had passed:MAX_COST_REACHEDorMAX_HOURS_REACHED. - listed_
rows - The rows of the pods that one list of the account shows, as
pod_rowsmakes them, with no look at any single pod and nothing recorded: what the orphan warning oftrainis built from. A recorded pod the list does not show has no row: it is not billing, orpod lsfinds it. - one_
line texton one line: a newline and a carriage return are written\nand\r, other control characters but tab, and the bidirectional overrides and isolates,\u{..}.- open_
kept - Opens the kept file
path(such asPOD_LOGorBOOTSTRAP_LOG) ofrun_dirfor reading;Nonewhen it, or.pod, does not exist. - orphan_
warnings - One warning per orphan pod among
rows, saying how to remove it. Never deletes anything. - parse_
disk_ probe - Reads the answer of
disk_probe_script. - parse_
kept_ line - A line of the kept log, cleaned like a line of the stream (see
PodLogLine::cleaned);Nonewhen it is not one. - past_
deadline - Whether the watchdog’s own deadline for
podhas passed atnow; never for a kept pod, or one without a deadline. A pod found gone then was deleted by its watchdog onmax_hours. - pod_
command - The pod’s
cmd:bash -cwith the bootstrap, awrite_watchdogfunction holding the watchdog in a quoted here-document, and the call tobootstrap_main.write_watchdogwrites to a sibling.tmpfile and onlymv -fs it into place once the write itself succeeded, so a write that fails partway (a full disk) can never leavefaila truncated watchdog to exec into. - pod_
endpoint - Writes the run’s ssh config (see
write_config) and returns what reaches the pod atendpoint, with either client: the config for OpenSSH, the endpoint, client key and pinned host key for the built-in client. - pod_env
- The pod’s
env. It holds no secret: the host key is only a reference to the run’s host key secret (seehost_key_placeholder),HF_TOKENnever goes there (the job gets it over SSH), nor does the account API key (the pod has its own pod-scoped key). - pod_
rows - Every pod of the account whose run marker is set or whose name starts with
overbrainer-, plus every pod recorded inruns/(the run’s pod and itsstray_pods) that the list does not show. Those are looked up together (seelook_up_all) and declared gone only after three 404s in a row and a list without them (never by a delete): the run’s pod is then recordeddeletedinpod.json, and a stray is dropped fromstray_pods. Apod.jsonthat cannot be read is skipped with a warning. - printable
text, from the Runpod API, without what could move the cursor or change the terminal’s state: ANSI escape sequences (CSI, string controls such as OSC or DCS through their terminator, and two-character ones) are dropped, a control character that is whitespace (newline, tab, CR…) becomes a space, and every other one (C0, DEL, C1) is dropped.- provision
- Creates the run’s pod, trying
plan.target.gpu_typesin order (itsautochoices resolved first, seeresolve_target), and waits until it is ready. WithautoGPU types, up to three cheaper types reported out of stock are tried before those in stock, and the catalog is read again after each type that cannot be placed, so the types not tried yet are sorted again. Before the first create call, the pod’s host key is stored as the run’s Runpod secret (seestore_host_key), which every pod of the run refers to; the caller deletes it once no pod of the run is left.record(pod.json) is saved before every create call and after every answer. A pod that dies or stays unreachable is deleted and the next GPU type tried. When provisioning fails after a create call got no clear answer, every pod of the run still listed is deleted (seesweep). - read_
kept - The whole kept file
pathofrun_dir(seeopen_kept);Nonewhen it does not exist. - read_
kept_ from - The bytes of the kept log of
run_dirfromoffset, or from its start when it is now shorter, with where they start;Nonewhen none is kept. - reconnect
- Connects again to the pod of the run
runwithclient, fortrain attachandtrain cancel: looks it up (its public port may have changed), rewrites the run’s ssh config and connects.Nonewhen the pod no longer exists (confirmed by repeated looks, never by a delete), whichpod.jsonthen records. - remove
- Deletes the run’s current pod and waits until the API no longer knows it,
after a last read of its logs into the run directory (see
super::drain), then records it deleted byby, or byDeletedBy::Watchdogwhen it was already gone. Does nothing when there is no pod. The delete is sent even whenpod.jsoncannot be saved first. - remove_
run_ pods - Deletes the pods of the run
run_id: the one in itspod.json(even kept), itsstray_pods, and any other carrying its marker. Every delete is sent and confirmed; a stray is dropped fromstray_podsonce gone, and a pod found by its marker whose delete fails is added to it. Every pod is tried; the first failure is returned at the end. - resolve
targetwith itsautochoices replaced by lists, from the catalog’sgpus, listed for the target’sgpu_count; listed choices are kept as they are.- resolve_
target targetwith itsautochoices resolved from the Runpod catalog (seeresolve_with_floor, withfloor_gb), logged at info level; a target without any is returned as it is, without an API call. Both choices are resolved from the same GPU listing, scoped totarget.gpu_count:catalog/datacentersis never read for this.- resolve_
with_ floor resolve,autoGPU types keeping only those with at leastfloor_gbof VRAM (the estimate of what the run needs, seecrate::train::sizing) when the target sets nomin_vram_gb: an explicitmin_vram_gbwins.- select_
gpus - The GPU types
filterkeeps, cheapest first (seeby_price). - settle_
watch - Acts on what
watch_on_podfound for the runrun_id: past the deadline or the cost cap, deletes the pod and fails the run; after a failed watch, fails the run when its pod is gone. Callers must not drop it midway (the CLI shields it from Ctrl-C), since it may be deleting the pod. - short_
cap_ warning - A warning when
capUSD buys less thanMIN_CAP_TIMEof a pod billedrateUSD an hour: its job is stopped with a snapshotSNAPSHOT_LEADbefore the cap, so it would hardly train.Noneotherwise, and without a positive rate and cap. - snapshot
- Reads what the log stream of the pod
idgives forqueryand stops once it has been silent for 750 ms after its first event, once the server closes it, or aftermax_waitin all (Runpod sends nothing, headers included, until it has a line: a pod with nothing new ends there).sinkgets each batch of lines, redacted, with the event ID they end at. Returns the last event ID seen, orquery’s own. - ssh_
command - The command reaching a kept pod of the run or export
run_idofruns:ssh -F runs/<id>/ssh/config overbrainer-<id>. - ssh_
config - The text of a run’s ssh config.
- start_
pod - Creates the pod of the new run
run(fromruns::create) and waits until it is ready: keys inruns/<id>/ssh/, thenpod.json, then provisioning. When that fails, the run is savedFailedwith the reason (interrupted before the job startedafter Ctrl-C), whatever pod was created is deleted, and once every pod of the run is confirmed deleted, the run’s private client key is removed and its host key secret deleted.vram_floor_gbis the least VRAMautoGPU types need when the target sets nomin_vram_gb(seePodPlan::vram_floor_gb). - stocked_
data_ centers - The data centers with at least one
chosenGPU type in stock, ordered by the cheapest such GPU type they have (seeby_price), ties by ID. - store_
host_ key - Stores
value, the base64 of the pod’s private host key, as the host key secret of the runrun_id: created, or, when the name is taken (a create retried after an answer that got lost), found by name and given the value. From then on the client redacts the value too. - sweep
- Deletes every pod carrying the marker of
run_idbutkeep: a pod left over by an ambiguous create that showed up late. Returns the pods whose deletion could not be confirmed, forpod.json, orNonewhen the pods could not be listed, so nothing is known about leftovers. - sweep_
host_ keys - Sweeps the run host key secrets (
overbrainer_host_key_<run>, oroverbrainer_host_key_<export-id>for an export’s pod) that no pod needs any more, givenrows, the pods of one list of the account (seelisted_rows): a secret whose run has a listed pod is kept, and so is one of a run of this project still in progress (it may be creating its pod) or whose record cannot be read. The secret of an ended run of this project is deleted; one of a run that is not in this project’sruns/only gets a warning saying how to remove it, as its pods would, since another checkout may be starting that run. Returns the warnings. - table
- The rows as the aligned table
pod lsprints, header first; nothing when there is no row. - template_
table - The rows of
overbrainer pod templates, header first, sorted by name; nothing whentemplatesis empty. - volume_
table - The rows of
overbrainer pod volumes, header first, sorted by name; nothing whenvolumesis empty. - watch_
leased watch_on_podfor a client that stays with the job: while the job keeps making progress (a metric in the last 30 minutes), it renews the pod’s lease (LEASE_FILE) every few minutes, somax_hoursdeletes nothing, neither the watchdog nor the client’s own guard. Once the job stalls or the lease cannot be renewed, the lease runs out afterLEASE_TTLand the deadline applies again. It warns once, as information, when the job ends after the deadline. Once the pod has spentSNAPSHOT_SHAREof its cost cap, it asks the job for a snapshot, as the watchdog does. A kept pod has no deadline and needs no lease. The disk policy runs beside it, kept pod or not.- watch_
on_ pod - Watches the started run
recorduntil its job ends or the client’s deadline (the watchdog’s plusDEADLINE_MARGIN; none for a kept pod) passes, and warns once when the job’s pace cannot end it before the watchdog’s deadline. The disk policy runs beside it. It never deletes anything, so dropping it (on Ctrl-C) loses nothing: what it found is acted on bysettle_watch. - watchdog_
script - The watchdog as the pod runs it: the
group_signalhelper of the job scripts, thenwatchdog.sh. - with_
pod_ logs - Runs
workwhile the log of the pod ofpodis kept in its run directory; the capture never endsworkearly. Onlyworkwhen no pod is recorded or it is deleted. - write_
config - Writes the ssh config of a run into
dir(created if needed), withendpointas the pod’s address, and theknown_hostsit points to. Rewritten before every connection, since a pod reset changes its public port. Returns the config’s path. - write_
known_ hosts - Writes
known_hostsintodir: one line pinninghost_publicforalias. Returns its path.