Bug 2127038

Summary: grafana pcp plugin is wiped from rpmostree /var during install in rhel edge
Product: Red Hat Enterprise Linux 9 Reporter: Ilkka Tengvall <ikke>
Component: grafana-pcpAssignee: Andreas Gerstmayr <agerstmayr>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: unspecified Docs Contact: Jacob Taylor Valdez <jvaldez>
Priority: unspecified    
Version: 9.0CC: agerstmayr, fweimer, jkurik, nathans, obudai, walters
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: grafana-pcp-5.0.0-4.el9 Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:29:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2116848    

Description Ilkka Tengvall 2022-09-15 07:19:00 UTC
Description of problem:

It seems rpmostree in rhel9 edge doesn't install files under /var/lib/grafana/plugins directory. That's where grafana-pcp tries to drop the plugin. This causes that plugin won't work in grafana on rhel edge.

Version-Release number of selected component (if applicable):

grafana-pcp-3.2.0-2.el9_0.x86_64


How reproducible:

every time

Steps to Reproduce:
1. create edge image with grafana-pcp in it
2. find /var/lib/grafana/plugins -type f
3. rpm -V grafana-pcp

Actual results:

There are no files in place, rpm -V also shows them missing

Expected results:

plugin to work in grafana

Additional info:

grafana-pcp probably should install them elsewhere, and it should be made sure /etc/grafana/grafana.ini plugins= clause would point correct place. Like /usr/share/grafana/plugins or smth. It should be a place one can install grafana plugins from gui too, so grafana needs write access to directory. I don't see grafana.ini taking plugins= multiple times, that would also take care of it.

Comment 1 Ondřej Budai 2022-09-16 12:47:13 UTC
If I'm not mistaken, /usr is mounted read-only on edge images, so making /usr/share/grafana/plugins writeable is not possible.

Comment 2 Andreas Gerstmayr 2022-09-16 15:00:01 UTC
My current plan is to leave the plugin dir to the default of /var/lib/grafana/plugins, so that custom plugins can be installed with the GUI.
I'll install the grafana-pcp files in /usr/share/grafana-pcp, and use systemd-tmpfiles to create a symlink from /var/lib/grafana/plugins to that folder in /usr.

Comment 3 Colin Walters 2022-09-26 19:08:08 UTC
> If I'm not mistaken, /usr is mounted read-only on edge images, so making /usr/share/grafana/plugins writeable is not possible.

It's writable at image build time, that's where data that is shipped as part of the ostree commit (image) should go.

Comment 9 errata-xmlrpc 2023-05-09 07:29:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: grafana-pcp security and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2177