Return codes
The same for all eight commands.
| Code | Meaning | Server state |
|---|---|---|
|
Success |
Changed as shown in the plan. |
|
General error |
Depends on the failure point, see the log. |
|
Command-line key error |
Not changed. |
|
Prechecks failed |
Not changed. |
|
Canceled by the operator |
Not changed. |
|
Error in the apply phase |
Changed. The log shows which action completed last. |
|
Remote host connection error |
Not changed. |
The main distinction is between 3 and 5. Code 3 means the installer refused to start: insufficient permissions, image not found, OS not supported. Code 5 means it started and could not finish.
This code also terminates a run in which the platform itself reported an initialization error. The installer completed, the container started, but the platform did not start — for the deployment scenario this is the same failure, and a zero code would hide it. The absence of a report within the allotted time remains a warning: the container may simply have been starting slowly.
This code also terminates a run in which the action queue reached the end but the "what changed on the server" form showed [FAIL]: the change was not made completely — say, the NFS directory did not mount.
Such steps intentionally do not interrupt installation — the form is printed precisely so that their failure does not go unnoticed.
The [warn] label does not affect the return code: the server works, albeit not completely.
See era_installer/install-local.adoc#era-installer-install-local-changes.
After code 5, a repeated run with the same answers file is safe: the actions are idempotent and bring the installation to completion. Before repeating, it is worth looking at the log and understanding the cause — otherwise the repeat will hit the same thing.
In scripts
rc=0
bash era/scripts/install.sh --non-interactive --answers-file=srv.params || rc=$?
case $rc in
0) printf 'installed\n' ;;
3) printf 'prechecks failed, server untouched\n' ;;
5) printf 'WARNING: server partially changed, analysis needed\n' ;;
*) printf 'failure, code %s\n' "$rc" ;;
esac