mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-22 12:16:52 +00:00
187b641726
Symmetric to the openvswitch-switch ordering: ensures ovn-controller shutdown waits for spinifex-daemon's instance teardown, the correct general invariant for VM cleanup since logical port programming flows through OVN. PR1a flagged this as optional follow-up. Bead: mulga-siv-20.1 Plan: docs/development/bugs/orphan-tap-on-launch-race.md (PR1a)
56 lines
1.6 KiB
Desktop File
56 lines
1.6 KiB
Desktop File
[Unit]
|
|
Description=Spinifex Daemon (VM Orchestration)
|
|
PartOf=spinifex.target
|
|
After=spinifex-nats.service spinifex-viperblock.service openvswitch-switch.service ovn-controller.service
|
|
Wants=spinifex-nats.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=spinifex-daemon
|
|
Group=spinifex
|
|
ExecStartPre=/var/lib/spinifex/wait-for-nats.sh
|
|
ExecStart=/usr/local/bin/spx service spinifex start
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
OOMScoreAdjust=-500
|
|
Environment=SPINIFEX_CONFIG_PATH=/etc/spinifex/spinifex.toml
|
|
Environment=SPINIFEX_BASE_DIR=/var/lib/spinifex/spinifex/
|
|
Environment=SPINIFEX_WAL_DIR=/var/lib/spinifex/spinifex/
|
|
|
|
# Filesystem access — NoNewPrivileges omitted (daemon uses sudo for ip, ovs-vsctl)
|
|
ProtectSystem=full
|
|
PrivateDevices=no
|
|
DevicePolicy=closed
|
|
DeviceAllow=/dev/kvm rw
|
|
DeviceAllow=/dev/net/tun rw
|
|
ReadOnlyPaths=/etc/spinifex/spinifex.toml /etc/spinifex/server.pem /etc/spinifex/server.key /etc/spinifex/ca.pem
|
|
ReadWritePaths=/var/lib/spinifex/spinifex /var/log/spinifex /run/spinifex /run/spinifex/nbd
|
|
|
|
# Hardening
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
RestrictSUIDSGID=yes
|
|
LockPersonality=yes
|
|
RestrictRealtime=yes
|
|
RestrictNamespaces=yes
|
|
ProtectClock=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectKernelModules=yes
|
|
ProtectKernelLogs=yes
|
|
ProtectControlGroups=yes
|
|
ProtectProc=invisible
|
|
SystemCallArchitectures=native
|
|
MemoryDenyWriteExecute=yes
|
|
# DHCP lease acquisition moved to spinifex-vpcd (see dhcp-allocate-error.md);
|
|
# the daemon no longer needs AF_PACKET or the softened kernel protections.
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
|
|
ProtectHostname=yes
|
|
KeyringMode=private
|
|
RemoveIPC=yes
|
|
LimitCORE=0
|
|
LimitNOFILE=65536
|
|
LimitNPROC=4096
|
|
|
|
[Install]
|
|
WantedBy=spinifex.target
|