diff options
| author | tv <tv@krebsco.de> | 2026-11-20 01:26:11 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-20 01:26:11 +0000 |
| commit | f02b09eae7e806f2fe9caa26b4975b94351d7e27 (patch) | |
| tree | c043f6443dac2cfb73446bba993cb9ac3b58c300 /pkgs/populate/src/rsync.rs | |
| parent | 61840ec59bc13b9b2ae6d29fff7276c849684941 (diff) | |
populate: fail when losing the lock, keepalives for the ssh connection
The command holding the lock can end while populate runs: killed on the
target, e.g. by the OOM killer, or with the shared ssh connection, e.g.
when its master gets killed, after which populate's next command would
start a new one, and go on without the lock. When that command ends, so
does what populate runs it with, ssh or sh, which populate's child is.
So Context::shell, which every command on the target goes through,
before what it changes, and before the record, checks that the child is
still running, failing otherwise. A run that wasn't locked throughout
doesn't get recorded, and its journal stays, so the next record tells
what it changed. Context keeps the lock, which clean_up releases.
The keepalives end the shared connection, and with it the command
holding the lock on the target, about a minute after the target stops
answering, e.g. when the network fails, instead of when TCP gives up,
which may take hours.
lock-lost kills the command holding the lock from a pipe source.
Diffstat (limited to 'pkgs/populate/src/rsync.rs')
0 files changed, 0 insertions, 0 deletions
