digint/btrbk

btrbk.timer runs too soon during boot process

開放

#486 建立於 2022年7月22日

 (8 則留言) (0 個反應) (0 位負責人)Perl (137 個分叉)batch import
help wanted

倉庫指標

星標
 (2,137 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

As is, btrbk.timer runs so early during the boot process that the hostname hasn't even been assigned yet. This also happens long before vital services are started.

To demonstrate, shut the backup server down before midnight and boot after midnight. Then run:

journalctl --since 0:0:0

Notice that btrbk runs in the midst of everything slowly being started up. On my fedora-36 system the hostname was still the temporary boot placeholder name of "fedora" instead of its actual hostname. The network wasn't up and dns wouldn't have been working either. I'm not sure what one is supposed to wait for boot to finish under systemd.

edit: I had thought OnActiveSec=2min in addition to OnCalendar=daily would take the union of the two constraints, but that doesn't appear to be the case.

貢獻者指南