grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.33k stars 182 forks source link

Can't install RPM on Fedora CoreOS #487

Open kurczynski opened 1 year ago

kurczynski commented 1 year ago

After setting up the Grafana repo in Fedora CoreOS, I am unable to install the Grafana Agent RPM using rpm-ostree:

rpm-ostree install grafana-agent

This fails and tells me:

error: Running %post for grafana-agent: bwrap(/bin/sh): Child process killed by signal 12; run `journalctl -t 'rpm-ostree(grafana-agent.post)'` for more information

Then the contents of journalctl -t 'rpm-ostree(grafana-agent.post)' says:

useradd.rpmostreesave: cannot create directory /var/lib/grafana-agent

There is an issue in the rpm-ostree project that suggests adding a workaround to rpm-ostree, but the RPM seems fundamentally flawed (for Fedora CoreOS at least).

I've installed the Grafana Agent RPM on my Fedora Workstation with no trouble at all, it would be great to be able to do it on Fedora CoreOS as well.

rfratto commented 1 year ago

I'm not really sure what it would mean to support Fedora CoreOS. Do you have any extra info you can provide for what we'd need to do to make the postinstall script work there?

kurczynski commented 1 year ago

Ah, I thought it might just have been me that didn't know. I don't but I can find out.

rfratto commented 5 months ago

Hi there :wave:

On April 9, 2024, Grafana Labs announced Grafana Alloy, the spirital successor to Grafana Agent and the final form of Grafana Agent flow mode. As a result, Grafana Agent has been deprecated and will only be receiving bug and security fixes until its end-of-life around November 1, 2025.

To make things easier for maintainers, we're in the process of migrating all issues tagged variant/flow to the Grafana Alloy repository to have a single home for tracking issues. This issue is likely something we'll want to address in both Grafana Alloy and Grafana Agent, so just because it's being moved doesn't mean we won't address the issue in Grafana Agent :)

kurczynski commented 4 months ago

I've started moving over to Alloy and can confirm this is still an issue. However, I found the underlying problem. Apparently rpm-ostree does not allow RPMs to modify user data and anything under /var is considered user data. Not sure what the solution is, but the CoreOS Github says not to have RPMs modify anything under var.

rfratto commented 4 months ago

Hm, that's unfortunate. It sounds like we need to figure out:

  1. Where should Alloy store its data if not /var
  2. Should we change the data directory for all Linux installs (e.g., not just distros using rpm-ostree)
    • If yes, how can we migrate existing installs gracefully without needing to call this a breaking change?

Thanks for tracking down the underlying problem!