GitHub
Skip to content

Migrating from the bash heavy

What changes for agents, scripts and config when fleetjobs replaces the bash heavy script, and how to compare the two on your own logs.

fleetjobs keeps the command line of the bash heavy. heavy <cmd> and heavy --light <cmd> work as before, and so do status, night and the variables below. What changes is that jobs queue and no longer give up.

Bash heavyfleetjobs
Waits HEAVY_WAIT seconds for a slot, then exits 75Queues the job with no limit. HEAVY_WAIT does nothing
One process per call, killed with its shellA detached job. heavy wait <id> picks it up again
No way to queue and returnheavy submit <cmd> prints a job id
Hosts in ~/.config/heavy/remotes, or in HEAVY_REMOTEShosts in ~/.config/fleetjobs/config.json. HEAVY_REMOTES does nothing
Slot counts fixed in the scriptlocal in the config file
Logs in ~/.cache/heavy.logOne JSON record for each job in log/jobs.jsonl in the store
Every remote failure runs here againOnly suspect ones, by the trust table
HEAVY_DIR defaulted to ~/.cacheIt defaults to ~/.local/state/fleetjobs

A full queue no longer gives exit 75. A job exits 75 only when nobody has waited for it for 10 minutes, or 60 if it came from heavy submit. HEAVY_ABANDON changes the 10 minutes.

The scope names, HEAVY_SLICE and the retry after an out-of-memory kill stay the same, so a tool that watches them keeps working.

heavy replay reads the old logs and runs the scheduler over them, so you can see what the queue would have done:

heavy replay --policy bash
heavy replay --policy default --host build-box:2

The first run checks that the replay reproduces your logged waits. The second shows waits under the new scheduler with a host of two slots. See replay.

  1. Install fleetjobs and put its heavy ahead of the old script on PATH.
  2. Move the lines of ~/.config/heavy/remotes into hosts. See Remote hosts.
  3. Let the old jobs drain. Both versions share the host slots in ~/overflow while they do.
  4. Point agents at the For agents page.