Give the backup unit network access so its heartbeat ping can leave
CI / tests (Python 3.11) (pull_request) Successful in 28s
CI / tests (Python 3.10) (pull_request) Successful in 29s
CI / tests (Python 3.12) (pull_request) Successful in 25s
CI / tests (Python 3.13) (pull_request) Successful in 26s
CI / lint (pull_request) Successful in 2s
CI / tests (Python 3.11) (pull_request) Successful in 28s
CI / tests (Python 3.10) (pull_request) Successful in 29s
CI / tests (Python 3.12) (pull_request) Successful in 25s
CI / tests (Python 3.13) (pull_request) Successful in 26s
CI / lint (pull_request) Successful in 2s
kernelwatch-backup.service still had PrivateNetwork=yes and
RestrictAddressFamilies=AF_UNIX from before scheduled-backup pinged
backup_heartbeat_url. Every nightly ping failed DNS inside the sandbox
("heartbeat request failed (URLError)"); the backup itself succeeded, so
the only symptom was the heartbeat monitor going down after a day.
Allow AF_INET/AF_INET6 like the alerts unit, and add a test that every
unit running a command that sends requests (check-alerts,
scheduled-backup, notify-backup-failure) keeps network access.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
669f1dc545
commit
f9d9660f71
3 files changed
+31
-2
No files matched your search
@@ -33,8 +33,8 @@ RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
RestrictAddressFamilies=AF_UNIX
|
||||
PrivateNetwork=yes
|
||||
# Network only for the backup_heartbeat_url ping after a successful backup.
|
||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
UMask=0077
|
||||
Reference in new issue
Block a user