host-agent template: drop rslave from root mount (Unraid incompatible)

`docker start host-agent` failed on unraid-1 with:
  Error response from daemon: path / is mounted on / but it is not a
  shared or slave mount

Unraid's root filesystem mount has "private" propagation by default and
rejects rslave from a container's volume spec. The static view of host
mounts (without rslave) is fine for an unraid box where the array is
mounted before host-agent starts — we lose the ability to see *future*
host mounts inside the container, which we never use anyway.

Container stays in Created state until this is fixed: user runs
install.sh + re-Applies my-host-agent template in Unraid UI.
This commit is contained in:
2026-05-19 08:27:44 -07:00
parent 2f3b324518
commit ab44f2f1d8
+2 -2
View File
@@ -34,7 +34,7 @@
<WebUI/>
<TemplateURL/>
<Icon>https://raw.githubusercontent.com/prometheus/prometheus/main/web/ui/static/img/prometheus_logo_grey.svg</Icon>
<ExtraParams>--restart=unless-stopped --cgroupns=host -v /:/host:ro,rslave --label com.centurylinklabs.watchtower.enable=true</ExtraParams>
<ExtraParams>--restart=unless-stopped --cgroupns=host -v /:/host:ro --label com.centurylinklabs.watchtower.enable=true</ExtraParams>
<PostArgs/>
<CPUset/>
<DateInstalled/>
@@ -45,7 +45,7 @@ host-agent: single container, s6-supervised, bundles per-host metrics + Dell fan
On unraid-1 (consumer hardware): fan-controller + ipmi_exporter + nvidia_gpu_exporter self-disable. node_exporter (CPU/mem/disk/net), cadvisor (per-container), smartctl_exporter (drive SMART), and vmagent (remote_write) run and push to your Prometheus.
The root mount (/:/host:ro,rslave) is wired via ExtraParams since Unraid's Path config doesn't expose mount propagation flags; rslave is required for node_exporter's rootfs view to track later host mounts.
The root mount (/:/host:ro) is wired via ExtraParams since Unraid's Path config doesn't expose `-v` syntax. rslave propagation was dropped because Unraid's root mount is "private" by default and rejects rslave with "path / is mounted on / but it is not a shared or slave mount"; static-view is fine for an Unraid box where the array is mounted before the container starts.
</Description>
<Config Name="/sys" Target="/sys" Default="/sys" Mode="ro" Description="Required: cadvisor reads /sys/fs/cgroup directly (its own cgroup ns is just /, even with --privileged)." Type="Path" Display="advanced" Required="true" Mask="false">/sys</Config>