Bug 2064627

Summary: In the perf counter data for ceph mon instead of "prioritycache" key returns empty string "" as key
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Asma Syed Hameed <asyedham>
Component: Ceph-Mgr PluginsAssignee: Laura Flores <lflores>
Ceph-Mgr Plugins sub component: status QA Contact: Sunil Angadi <sangadi>
Status: CLOSED ERRATA Docs Contact: Akash Raj <akraj>
Severity: high    
Priority: unspecified CC: adking, akraj, ceph-eng-bugs, jraju, kdreyer, lflores, tserlin, vereddy, vumrao, yhatuka
Version: 5.0Keywords: Rebase, TestBlocker
Target Milestone: ---Flags: lflores: needinfo+
lflores: needinfo+
Target Release: 5.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-16.2.8-2.el8cp Doc Type: Bug Fix
Doc Text:
.The missing pointer is added to the `PriorityCache` perf counters builder and perf output returns the `prioritycache` key name Previously, the PriorityCache perf counters builder was missing a necessary pointer, causing the perf counter output, `ceph tell _DAEMON_TYPE_._DAEMON_ID_ perf dump` and `ceph tell _DAEMON_TYPE_._DAEMON_ID_ perf schema`, to return an empty string instead of the `prioritycache` key. This missing key caused a failure in the `collectd-ceph` plugin. With this fix, the missing pointer is added to the `PriorityCache` perf counters builder. The perf output returns the `prioritycache` key name.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-09 17:37:39 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: 2102272    

Description Asma Syed Hameed 2022-03-16 10:04:36 UTC
Description of problem:
When testing OSP 17 with RHCS 5 we notice that collectd-ceph plugin was failing 

collectd.log
```
[2022-03-16 09:27:45] [warning] ceph plugin: cconn_handle_event(name=mon.controller-0,i=0,st=4): error 1
[2022-03-16 09:27:55] [error] ceph plugin: ds .targetBytes was not properly initialized.
[2022-03-16 09:27:55] [error] ceph plugin: JSON handler failed with status -1.
[2
```

After evaluating the perf counter schema we notice that instead proritycache key an empty string is returned.


[ceph: root@controller-0 /]# ceph daemon mon.controller-0 perf schema     
{
    "": {
        "target_bytes": {
            "type": 2,
            "metric_type": "gauge",
            "value_type": "integer",
            "description": "target process memory usage in bytes",
            "nick": "t",
            "priority": 8,
            "units": "bytes"
        },
        "mapped_bytes": {
            "type": 2,
            "metric_type": "gauge",
            "value_type": "integer",
            "description": "total bytes mapped by the process",
            "nick": "m",
            "priority": 8,
            "units": "bytes"
        },
        "unmapped_bytes": {
            "type": 2,
            "metric_type": "gauge",
            "value_type": "integer",
            "description": "unmapped bytes that the kernel has yet to reclaimed",
            "nick": "u",
            "priority": 8,
            "units": "bytes"
        },
        "heap_bytes": {
            "type": 2,
            "metric_type": "gauge",
            "value_type": "integer",
            "description": "aggregate bytes in use by the heap",
            "nick": "h",
            "priority": 8,
            "units": "bytes"
        },
        "cache_bytes": {
            "type": 2,
            "metric_type": "gauge",
            "value_type": "integer",
            "description": "current memory available for caches.",
            "nick": "c",
            "priority": 8,
            "units": "bytes"
        }
    },


Version-Release number of selected component (if applicable):
[ceph: root@controller-0 /]# ceph --version
ceph version 16.2.7-14.el8cp (1b7a9737ab205b421860c013d0ed4766b0bfe0da) pacific (stable)


How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP 17 with RHCS 5


Actual results:
{
    "": {
        "target_bytes": {
            "type": 2,
            "metric_type": "gauge",
            "value_type": "integer",
            "description": "target process memory usage in bytes",
            "nick": "t",
            "priority": 8,
            "units": "bytes"
        },

Expected results:
{
    "prioritycache": {
        "target_bytes": {
            "type": 2,
            "metric_type": "gauge",
            "value_type": "integer",
            "description": "target process memory usage in bytes",
            "nick": "t",
            "priority": 8,
            "units": "bytes"
        },

Comment 1 RHEL Program Management 2022-03-16 10:04:42 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 3 Yaarit Hatuka 2022-03-23 12:33:23 UTC
When adding the perf channel to telemetry we noticed that some collections have empty keys, so we fixed it with: https://github.com/ceph/ceph/pull/42074/commits/9e07175b3c9a5c69b8694bc05e0baa26a351582d.

Laura, looks like this commit should be backported to pacific. Can you please take a look?

Comment 4 Laura Flores 2022-03-23 15:09:26 UTC
Yes, I'll stage the backport PR.

Comment 6 Laura Flores 2022-03-28 15:44:05 UTC
The upstream fix has been merged.

Comment 10 Ken Dreyer (Red Hat) 2022-05-24 23:11:29 UTC
https://github.com/ceph/ceph/pull/45588 is in v16.2.8 upstream.

Comment 20 errata-xmlrpc 2022-08-09 17:37:39 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: Red Hat Ceph Storage Security, Bug Fix, 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-2022:5997

Comment 21 Laura Flores 2022-08-09 19:32:31 UTC
@akraj the doc text looks good.

Comment 22 Red Hat Bugzilla 2023-09-15 01:52:53 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days