Self-update
moirad runs as a stack in the deploy folder, so you can update it like any other service:
moira update edge/moirad/moiradA daemon can’t recreate its own container and report the result at the same time, so for
actions that would replace or restart it, moirad hands the work to a helper.
How the hand-off works
Section titled “How the hand-off works”- The daemon starts a detached, auto-removing container from its own image (or
MOIRAD_HELPER_IMAGE). The helper gets the Docker socket, the deploy folder at the same path and the registry config. - The job ends in state
handed-off. The helper holds the stack lock until it exits, also across the daemon’s replacement. - The helper runs the action:
updatepulls the tag in the compose file and runsup -dif the pull succeeded;applyrunsup -d;restartandstartact on the selected containers. - The client polls the host every 2 seconds for up to 2 minutes:
- the version changed, or the daemon came back after being unreachable → exit
0; - the daemon stayed up with the same version → warning
handed off; no daemon restart observed, exit0; - still unreachable at the deadline → warning, exit
1.
- the version changed, or the daemon came back after being unreachable → exit
The helper’s own output isn’t available through the jobs API. If an update seems stuck, check
the host with docker ps -a --filter label=moira.helper=self-update and docker logs moirad.
- Stop is refused. Stopping
moirador its whole stack over the API returns an error. Use SSH. - The
:stabletag in the compose file makesupdatefollow releases. Use a version tag such as:0.3or:0.3.0to hold a host back. - Self-detection. The daemon finds its own container automatically. If detection fails, it
logs a warning and refuses stack actions until you set
MOIRAD_SELF_CONTAINERto the container name and restart it.
Image tags
Section titled “Image tags”| Tag | Moves on |
|---|---|
:stable |
The highest final release (v0.3.0) |
:0.3 |
The highest patch of that minor series |
:0.3.0 |
Never |
:0.3.1-rc.1 |
Never (prerelease) |
:edge, :sha-<short> |
Every push to main |