mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-19 07:50:43 +01:00
Root cause: The systemd service hardening blocked AF_NETLINK sockets, preventing IP address discovery on standalone nodes. The proxy could only discover hostnames, causing node_not_cluster_member rejections when users configured Pulse with IP addresses. Changes: 1. Add AF_NETLINK to RestrictAddressFamilies in all systemd services - pulse-sensor-proxy.service - install-sensor-proxy.sh (both modes) - pulse-sensor-cleanup.service 2. Replace shell-based 'ip addr' with Go native net.Interfaces() API - More reliable and doesn't require external commands - Works even with strict systemd restrictions - Properly filters loopback, link-local, and down interfaces 3. Improve error logging and user guidance - Warn when no IP addresses can be discovered - Provide clear instructions about allowed_nodes workaround - Include address counts in logs for debugging This fix ensures standalone Proxmox nodes can properly validate temperature requests by IP address without requiring manual allowed_nodes configuration.
32 lines
810 B
Desktop File
32 lines
810 B
Desktop File
[Unit]
|
|
Description=Pulse Sensor Cleanup Service
|
|
Documentation=https://github.com/rcourtman/Pulse
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/local/bin/pulse-sensor-cleanup.sh
|
|
User=root
|
|
Group=root
|
|
WorkingDirectory=/var/lib/pulse-sensor-proxy
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=pulse-sensor-cleanup
|
|
|
|
# Security hardening (less restrictive than the proxy since we need SSH access)
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ReadWritePaths=/var/lib/pulse-sensor-proxy /root/.ssh
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
PrivateTmp=true
|
|
RestrictSUIDSGID=true
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
|
LimitNOFILE=1024
|
|
|
|
[Install]
|
|
# This service is triggered by the .path unit, no need to enable it directly
|