Sync and drift
The servers of a group can differ. landfall calls that drift.
lf sites info shows it, and lf sync or lf deploy fixes it.
Drift
lf sites info compares each server with the primary and warns about what differs:
| warning | what differs |
|---|---|
release | another release is live. |
scale | another number of containers per service. |
env | another .env (compared by checksum). |
missing | the site is not on that server. |
outside | a server that left the group still runs the site, and serves its domains. lf sites info marks it outside group. |
edge | the edge does not send requests to a server of the group, or sends them to one outside it. lf edge add again fixes it. |
landfall knows a group's servers from site.json on each of them: a group deploy writes them there, with the servers that left.
lf sites info checks those servers too, if this machine knows them (lf server ls).
Remove the site there, or put the server back in servers:
# take blog off vps3, which left the group
lf sites rm blog -s vps3The group's health is ok when every server answers, runs the site and matches the primary.
It is drift when they differ, and down when a server is unreachable or the site is not running there.
landfall compares .env by checksum; it never reads the values into the view.
A .env your login cannot read is not compared.
To fix drift, sync the group, or deploy to it again:
# copy what the primary runs to the others
lf sync
# bring every server to this folder's code
lf deploy
# or deploy only to vps2
lf deploy -s vps2 --partialSync a group
lf sync brings every server in line with the primary.
It copies what the primary runs. It does not deploy anything new.
# show what differs, ask, then copy it
lf sync blog
# the group as vps1,vps2; vps1 is the primary
lf sync blog -s vps1,vps2- It copies the release (files and built images),
.env, scale, weights and autoscale rules. - A service the primary autoscales keeps each server's own count. The rule sets it there.
- A release a server lacks is fetched once from the primary and sent to it.
- The servers must share one platform when the release has built images.
- A server without the site is skipped with a warning. Run
lf deployto put the site there. A first deploy claims its domains and volumes; a copy does not. - When only such servers differ, sync fails.
- Adopted sites are refused.
- A server that runs a newer release than the primary is refused: sync would take that release back. Name that server first, as in
lf sync -s vps2,vps1. lf undo <run id>reverts the sync on every server.- It copies and switches under the primary's deploy lock. A group deploy started meanwhile is refused.
- When the site changed on the primary after sync read it, sync stops. Run it again.