Bug 2321765

Summary: Ceph Exporter: Does not manage Linux signals SIGINT/SIGTERM
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Juan Miguel Olmo <jolmomar>
Component: Ceph-MetricsAssignee: Juan Miguel Olmo <jolmomar>
Status: CLOSED ERRATA QA Contact: Sayalee <saraut>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0CC: ceph-eng-bugs, cephqe-warriors, kdeb, tserlin, vdas
Target Milestone: ---   
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-19.2.1-122.el9cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-26 12:18:07 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:

Description Juan Miguel Olmo 2024-10-25 12:48:43 UTC
Description of problem:
Ceph exporter does not implement properly SIGTERM and SIGINT signals exiting with an error when these signals are sent to the Ceph exporter.



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

How reproducible:

Example:
terminal A ==========
$ ./ceph-exporter c /home/jolmomar/Code/ceph/build/ceph.conf --sock-dir /home/jolmomar/Code/ceph/build/asok
2024-10-23T12:37:54.538+0200 7f1c4fe990c0 -1 WARNING: all dangerous and experimental features are enabled.
2024-10-23T12:37:54.543+0200 7f1c4fe990c0 -1 WARNING: all dangerous and experimental features are enabled.
2024-10-23T12:37:54.543+0200 7f1c4fe990c0 -1 WARNING: all dangerous and experimental features are enabled.
system:0
...
system:0
Terminated
$ echo $?
143 <--- 128 + 15(SIGTERM)

terminal B ==========
$ ps ef | grep exporter
jolmomar 116727 105597 1 12:37 pts/1 00:00:00 ./ceph-exporter -c /home/jolmomar/Code/ceph/build/ceph.conf --sock-dir /home/jolmomar/Code/ceph/build/asok
jolmomar 116812 109376 0 12:38 pts/2 00:00:00 grep --color=auto exporter
jolmomar:~/.../build/bin$ kill -15 116727 <--- SEND SIGTERM

Steps to Reproduce:
1. launch Ceph exporter
2. terminate Ceph exporter sending SIGTERM/SIGINT signals
3. Check process exit status is different from 0

Also possible to test, stopping the exporter service/or ceph exporter daemons using orchestrator commands example: "ceph orch stop exporter"
After execution the stop command, the ceph exporter will appear in the list of services or daemons with status "error"

Actual results:
Exit status different from 0 when SIGINT/SIGTERM signals are sent to the process.
"Ceph orch stop" command does not produce ceph exporter daemon/service with "error" status.

Expected results:
when sent SIGTERM/SIGINT, process exit code must be 0

Additional info:

Comment 1 Storage PM bot 2024-10-25 12:48:54 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 11 errata-xmlrpc 2025-06-26 12:18:07 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 (Important: Red Hat Ceph Storage 8.1 security, bug fix, and enhancement updates), 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-2025:9775