proxmox-backup/src/tools
Dominik Csapak d7c6ad60dd daemon: add hack for sd_notify
sd_notify is not synchronous, iow. it only waits until the message
reaches the queue not until it is processed by systemd

when the process that sent such a message exits before systemd could
process it, it cannot be associated to the correct pid

so in case of reloading, we send a message with 'MAINPID=<newpid>'
to signal that it will change. if now the old process exits before
systemd knows this, it will not accept the 'READY=1' message from the
child, since it rejects the MAINPID change

since there is no (AFAICS) library interface to check the unit status,
we use 'systemctl is-active <SERVICE_NAME>' to check the state until
it is not 'reloading' anymore.

on newer systemd versions, there is 'sd_notify_barrier' which would
allow us to wait for systemd to have all messages from the current
pid to be processed before acknowledging to the child, but on buster
the systemd version is to old...

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-11 09:43:00 +01:00
..
disks various typo fixes 2020-08-25 18:52:31 +02:00
systemd avoid chrono dependency, depend on proxmox 0.3.8 2020-09-15 07:12:57 +02:00
acl.rs more clippy fixups 2020-10-14 13:58:35 +02:00
apt.rs apt: allow changelog retrieval from enterprise repo 2020-11-09 17:28:58 +01:00
async_channel_writer.rs tools: add AsyncChannelWriter 2020-10-21 10:04:22 +02:00
async_io.rs async_io: require Unpin for EitherStream and HyperAccept 2020-11-10 14:18:45 +01:00
borrow.rs tools: borrow: implement Deref for Tied 2019-02-13 11:03:09 +01:00
broadcast_future.rs typo fixes all over the place 2020-05-30 16:39:08 +02:00
cert.rs refactor CertInfo to tools 2020-07-10 11:08:53 +02:00
daemon.rs daemon: add hack for sd_notify 2020-11-11 09:43:00 +01:00
disks.rs various typo fixes 2020-08-25 18:52:31 +02:00
file_logger.rs tools: file logger: avoid some possible unwraps in log method 2020-11-02 19:32:22 +01:00
format.rs proxmox-backup-client: use HumanByte to render snapshot size 2020-10-20 11:43:48 +02:00
fs.rs backup: use shared flock for base snapshot 2020-10-15 07:09:34 +02:00
fuse_loop.rs more clippy fixups 2020-10-14 13:58:35 +02:00
http.rs HttpsConnector: include destination on connect errors 2020-11-10 11:58:19 +01:00
logrotate.rs log rotate: only add .zst to new file after second rotation 2020-11-04 17:16:55 +01:00
loopdev.rs loopdev: add module doc 2020-10-08 08:34:39 +02:00
lru_cache.rs lru_cache: restrict and annotate Send impl 2020-06-19 09:37:34 +02:00
nom.rs fix typo 2020-06-26 09:12:29 +02:00
parallel_handler.rs src/tools/parallel_handler.rs: remove lifetime hacks, require 'static 2020-10-01 14:52:48 +02:00
process_locker.rs typo fixes all over the place 2020-05-30 16:39:08 +02:00
runtime.rs tools::runtime: pin_mut instead of unsafe block 2020-11-10 14:18:45 +01:00
socket.rs tools: socket: fix typo in comment 2020-10-28 21:26:11 +01:00
statistics.rs statistics: covariance(): avoid allocation 2020-06-09 13:57:27 +02:00
std_channel_writer.rs switch from failure to anyhow 2020-04-17 18:43:30 +02:00
subscription.rs apt auth: add newline to the end 2020-10-27 17:41:30 +01:00
systemd.rs add test for escape_unit 2020-10-21 11:31:24 +02:00
ticket.rs avoid chrono dependency, depend on proxmox 0.3.8 2020-09-15 07:12:57 +02:00
wrapped_reader_stream.rs add AsyncReaderStream 2020-06-23 06:33:31 +02:00
xattr.rs tools/xattr: a char from C is not universally a rust i8 2020-07-19 19:46:27 +02:00
zip.rs tools/zip: fix doc tests 2020-10-21 14:20:16 +02:00