carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1# The db-read worker (db region forward spec §8.3): one instance per
2# connection to carlos-dbread.socket. It writes one forwarded read's planned
3# LTX files into its own private /var/tmp, restores them, checks the copy,
4# and runs the member's one read-only statement. Everything that decodes
5# tenant bytes runs here, as a DynamicUser with no network; the agent only
6# moves bytes. systemd removes /tmp and /var/tmp when the unit stops,
7# however it stops.
8#
9# StandardInput/StandardOutput=socket: with Accept=yes systemd passes the
10# connection as a descriptor and puts it on stdin only when told to. The
11# claim-bound template's StandardOutput=file: line is deliberately absent.
12#
13# LimitFSIZE is the default restored-size cap (CARLOS_DB_READ_MAX_BYTES,
14# 2 GiB). A box that raises the cap needs a drop-in raising this too.
15[Unit]
16Description=carlos db-read worker
17
18[Service]
19ExecStart=/opt/carlos/carlos system db-worker
20StandardInput=socket
21StandardOutput=socket
22StandardError=journal
23DynamicUser=yes
24PrivateNetwork=yes
25RestrictAddressFamilies=AF_UNIX
26TemporaryFileSystem=/data:ro /var/lib:ro /opt/carlos:ro /run/carlos:ro
27BindReadOnlyPaths=/opt/carlos/carlos
28InaccessiblePaths=/etc/carlos -/run/carlos-control
29PrivateTmp=yes
30ProtectSystem=strict
31ProtectHome=yes
32PrivateDevices=yes
33ProtectProc=invisible
34ProcSubset=pid
35ProtectKernelTunables=yes
36ProtectKernelModules=yes
37ProtectKernelLogs=yes
38ProtectClock=yes
39ProtectHostname=yes
40ProtectControlGroups=yes
41RemoveIPC=yes
42LockPersonality=yes
43RestrictRealtime=yes
44RestrictNamespaces=yes
45RestrictSUIDSGID=yes
46NoNewPrivileges=yes
47CapabilityBoundingSet=
48SystemCallFilter=@system-service
49SystemCallArchitectures=native
50MemoryDenyWriteExecute=yes
51MemoryMax=512M
52CPUQuota=100%
53TasksMax=16
54LimitFSIZE=2147483648
55RuntimeMaxSec=20min
56