Bug 2480773

Summary: The /run/gluster/metrics directory should be defined as %ghost
Product: [Fedora] Fedora Reporter: Rostislav Krasny <rostiprodev>
Component: glusterfsAssignee: Benson Muite <benson_muite>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 44CC: amarts, anoopcs, benson_muite, congxueyang, jonathansteffan, ndevos, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-11.2-8.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-06-14 04:30:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rostislav Krasny 2026-05-22 17:18:35 UTC
Right after install or reinstall of the glusterfs package the /run/gluster/metrics is created by the script in the RPM spec. Later this directory is removed by the system and glusterfs already supports recreation of this directory when needed. See following:

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1624006
[2] https://github.com/gluster/glusterfs/commit/b78f18c24d9860472a2e76bbcf72720889b8af3c

Also in libglusterfs/src/glusterfs/monitoring.h (related to [2])

#define GLUSTER_METRICS_DIR "/var/run/gluster/metrics"

I'm preparing a pull request for Fedora 44 and will add a link to this PR here in a comment soon.

This issue exists in Fedora 43 and thould be back-ported there as well.

Reproducible: Always

Steps to Reproduce:
1. install or reinstall glusterfs package
2. run sudo rpm -Va
3. reboot
4. run sudo rpm -Va again
Actual Results:
following line in the rpm -Va output

missing     /run/gluster/metrics

Expected Results:
No line like following in the rpm -Va output

missing     /run/gluster/metrics

Comment 1 Rostislav Krasny 2026-05-22 17:21:04 UTC
Following is my pull request with proposed fix. Please review and merge. I don't have permissions to merge by myself.

https://src.fedoraproject.org/rpms/glusterfs/pull-request/11

Comment 2 Rostislav Krasny 2026-05-22 17:24:07 UTC
My PR removes following line:

mkdir -p %{buildroot}%{_rundir}/gluster/metrics

Maybe this is not a fully correct change and instead of removing it should be changed to the following one:

mkdir -p %{buildroot}%{_rundir}/gluster

Comment 3 Rostislav Krasny 2026-05-22 17:49:32 UTC
(In reply to Rostislav Krasny from comment #2)

Yes, that remove of the "mkdir -p" line was incorrect and the automatic build of the PR failed.
I've amended my commit in my PR.

Comment 4 Benson Muite 2026-06-14 04:30:38 UTC
Thanks for the pull request. Have merged it.  Will also incorporate changes in:
https://github.com/gluster/glusterfs/pull/4597

Comment 5 Fedora Update System 2026-06-14 04:36:38 UTC
FEDORA-2026-eea04834e4 (glusterfs-11.2-8.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-eea04834e4

Comment 6 Rostislav Krasny 2026-06-14 10:18:42 UTC
Thank you very much Benson! I will test FEDORA-2026-eea04834e4 soon.

I think it's worth porting this to Fedora 43 as well.

Comment 7 Fedora Update System 2026-06-15 01:26:36 UTC
FEDORA-2026-eea04834e4 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-eea04834e4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-eea04834e4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2026-06-17 08:43:37 UTC
FEDORA-2026-eea04834e4 (glusterfs-11.2-8.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.