From 842b60c5b206fa81c500bf1915c6731d96c9534c Mon Sep 17 00:00:00 2001 From: Konstantin Renner Date: Tue, 7 Jul 2026 09:08:00 +0200 Subject: [PATCH] =?UTF-8?q?edge-host:=20fix=20edge-alloy=20ExecStart=20?= =?UTF-8?q?=E2=80=94=20Arch=20binary=20is=20grafana-alloy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #114 pointed the edge-alloy.service unit at /usr/bin/alloy, but the Arch `grafana-alloy` package installs the binary as /usr/bin/grafana-alloy. The unit crash-looped with status=203/EXEC ("Unable to locate executable /usr/bin/alloy"). Make the path a variable (edge_alloy_bin) and default it to the real path. Verified on edge-1: the binary runs (v1.13.2), the alloy user exists (in systemd-journal), and the deployed config parses cleanly — only the ExecStart path was wrong. Co-Authored-By: Claude Opus 4.8 (1M context) --- ansible/roles/edge-host/defaults/main.yml | 1 + ansible/roles/edge-host/templates/edge-alloy.service.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/edge-host/defaults/main.yml b/ansible/roles/edge-host/defaults/main.yml index 9614956d..50e3c803 100644 --- a/ansible/roles/edge-host/defaults/main.yml +++ b/ansible/roles/edge-host/defaults/main.yml @@ -16,6 +16,7 @@ edge_docker_log_driver: journald # container stdout -> journal, no json log # is the authenticated cluster ingress (Traefik basic-auth). edge_alloy_config_file: /etc/alloy/edge.alloy edge_alloy_http_port: 12345 +edge_alloy_bin: /usr/bin/grafana-alloy # Arch `grafana-alloy` pkg names the binary this, not `alloy` edge_loki_push_url: "https://loki.renner.uno/loki/api/v1/push" edge_loki_username: edge-1 edge_alloy_labels: diff --git a/ansible/roles/edge-host/templates/edge-alloy.service.j2 b/ansible/roles/edge-host/templates/edge-alloy.service.j2 index 830925b2..1eb79aa3 100644 --- a/ansible/roles/edge-host/templates/edge-alloy.service.j2 +++ b/ansible/roles/edge-host/templates/edge-alloy.service.j2 @@ -13,7 +13,7 @@ SupplementaryGroups=systemd-journal # WAL + positions on tmpfs so the agent never writes to the eMMC. %t is the # runtime dir root (/run); RuntimeDirectory creates /run/alloy owned by us. RuntimeDirectory=alloy -ExecStart=/usr/bin/alloy run \ +ExecStart={{ edge_alloy_bin }} run \ --server.http.listen-addr=127.0.0.1:{{ edge_alloy_http_port }} \ --storage.path=%t/alloy \ {{ edge_alloy_config_file }} -- 2.54.0