Exit status#
The exit statuses of eb-pipeline, what leads to each, how run picks one when several apply, and how it reads the exit statuses of the tools it starts.
The constants are in eb_pipeline::exit.
Statuses#
Status |
Constant |
Meaning |
|---|---|---|
0 |
|
All requested work completed. |
1 |
|
Work was attempted and failed: a line or a phase. The result file says which. |
2 |
|
A usage error, an invalid site file, or a tool below its minimum version. Nothing was built. |
75 |
|
A resource is temporarily unavailable or a step is pending; run again later. |
78 |
|
A precondition, admission or |
130 |
|
Interrupted by |
143 |
|
Interrupted by |
The exit status is never a sum or a count; the result file holds the count of lines per status.
An error that ends a command is written to stderr as ERROR [main] -: MESSAGE.
What leads to each status#
0#
check,schema,init,explain,targetsandplandid what they were asked.run --dry-runprinted its commands.run: no line failed, was refused or is pending, and no phase failed. A deselected line, a phase that is not configured, anunshardedshard phase and alogsphase that another rotation madeskippedall leave the status at 0.
1#
run: theeboreb-staged-rebuild runcommand of a line exited with a status that is not 0 and does not mean refused or pending; the line isfailed.run: the source prefetch of a line failed; the line isfailedand is not built.run:eb-stack stack shardexited with a status other than 0, 2 andshards.planner_exit_unsharded, or its plan could not be read; the run ends.run:eb-stack stack admitexited with a status other than 0, 2 and 78; the run ends.run:[caches].commandexited with a status other than 0.run:eb-keep-logs rotateexited with a status other than 0 and 75.run: a log file, a log directory, the list of selected lines or the result file could not be written.plan: the shard plan given to--shard-plancould not be read, or the plan could not be written to--out.
A failed eb-keep-logs failed after a failed line leaves the status as it is, with a WARN line.
2#
The command line has an unknown option, lacks a required one, or gives a value that is not allowed, such as a
--log-stampthat is not a date and time in Coordinated Universal Time (UTC).The site file cannot be read, is not valid, or is not valid after the
EB_PIPELINE__variables are applied.The target is not one of the site file’s.
The list cannot be read, holds no line, or has a quote that is not closed.
run, andcheck --probe-tools: a tool that needs amin_versioncannot be started, prints no version, or prints one below the minimum.check --probe-toolsalso checks the tools without amin_version.init: the template is unknown, or the--outfile cannot be created, as when it exists.run:eb-stack stack shardoreb-stack stack admitexited 2.
75#
run:eb-staged-rebuild runexited 75 for a line; the line ispending.
78#
run: every problem the site file has is in[licences].run:admission.requiredistruebutadmission.quota_cmdoradmission.reservationsis missing.run:admission.quota_cmdandadmission.reservationsare set, and the variable thatadmission.job_id_envnames is unset or not a positive integer without a leading zero.run: a variable thatshards.installed_modules_dirs_from_envnames is unset.run: a unit has CPU-role commands that the target’s route wraps, and the variabletargets.route.receipt_digest_envnames is unset or empty.run:eb-stack stack admitstill refused afteradmission.attemptsattempts. The lines of that unit areskipped, with the noteadmission refused, and those of every later unit withan earlier unit was refused.run:eb-staged-rebuild runexited 2 for a line, such as when the lock of its state root was still held after[rebuild] lock_timeoutseconds; the line isrefused.
The refusals before the first build leave every line unbuilt.
130 and 143#
run passes the signal to the running command and waits for it to end.
It starts no other command, records the phase as interrupted, writes the result file and exits 130 for SIGINT or 143 for SIGTERM.
When several apply#
A signal ends a run with 130 or 143, and a usage error with 2, whatever else happened before. Otherwise the first of these that applies is the status of the run:
a line or a phase failed: 1;
a line or admission was refused: 78;
a line is pending: 75;
none of these: 0.
A run in which one line failed and another was refused exits 1.
Exit statuses of the tools a run starts#
Command |
Status |
What the run does |
|---|---|---|
|
0 |
The line is |
|
any other |
The line is |
|
0 |
The run builds the units of the shard plan. |
|
|
The planner built the plan unsharded; the shard phase is |
|
2 |
The shard phase is |
|
any other |
The shard phase is |
|
0 |
The unit is admitted and builds. |
|
78 |
Refused: the run waits and asks again, as |
|
2 |
The admission phase is |
|
any other |
The admission phase is |
|
0 |
The line is |
|
2 |
A refusal: the line is |
|
75 |
The line is |
|
any other |
The line is |
|
0 |
The |
|
75 |
Another rotation holds |
|
any other |
The |
|
any other than 0 |
A |
|
any other than 0 |
The |
any command that cannot start |
127 |
Recorded as the command’s status; its log says why it could not start. |
See also#
The plan and result files, for the status of each line and phase in the result file
How a run goes through its phases, for the order of the statuses