Bug 2179660 - [HCO] Metric names fail in metrics name linter
Summary: [HCO] Metric names fail in metrics name linter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Metrics
Version: 4.13.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.14.0
Assignee: Shirly Radco
QA Contact: Debarati Basu-Nag
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-19 16:04 UTC by Aviv Litman
Modified: 2023-11-08 14:05 UTC (History)
7 users (show)

Fixed In Version: hco-bundle-registry-container-v4.14.0.rhel9-1560
Doc Type: Release Note
Doc Text:
Metrics names are updated: - `kubevirt_hco_out_of_band_modifications_count` to `kubevirt_hco_out_of_band_modifications_total`. - `kubevirt_hco_unsafe_modification_count` to `kubevirt_hco_number_of_unsafe_modifications`.
Clone Of:
Environment:
Last Closed: 2023-11-08 14:05:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt hyperconverged-cluster-operator pull 2358 0 None Merged Update metrics names to meet naming conventions 2023-08-10 15:44:52 UTC
Red Hat Issue Tracker CNV-27054 0 None None None 2023-03-19 16:06:31 UTC
Red Hat Product Errata RHSA-2023:6817 0 None None None 2023-11-08 14:05:48 UTC

Description Aviv Litman 2023-03-19 16:04:27 UTC
Description of problem:
We added a metric name linter, that will check if the metric name meets the best practices requirements see: https://github.com/kubevirt/hyperconverged-cluster-operator/pull/2291.
The linter failed with the following errors:

- kubevirt_hco_out_of_band_modifications_count: counter metrics should have 'total' suffix.
- kubevirt_hco_out_of_band_modifications_count: non-histogram and non-summary metrics should not have 'count' or 'sum' 
- kubevirt_hco_unsafe_modification_count: non-histogram and non-summary metrics should not have 'count' or 'sum' suffix.

We should updates the names:
- `kubevirt_hco_out_of_band_modifications_count` to `kubevirt_hco_out_of_band_modifications_total`.

- `kubevirt_hco_unsafe_modification_count` to `kubevirt_hco_number_of_unsafe_modifications`. 

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

How reproducible:
100%

Steps to Reproduce:
1. open a pr
2. see the sanity check  
3. see the metric name linter errors

Actual results:
metric names are not valid.

Expected results:
metrics names are valid.

Comment 1 Krzysztof Majcher 2023-03-21 13:40:46 UTC
Please rememeber to doublecheck if documentation will autogenerate.
In first pass of the fix please consider deprecating 'old' names and introduce new ones to finally get rid of the 'old' names in the following release.
Please also remember to check if 'old' names are not used to show any of the metrics somewhere in the UI.

Comment 2 Audrey Spaulding 2023-05-08 19:06:09 UTC
@sradco, Is this a Known Issue or a Changed Feature for the 4.13 release notes? Thanks.

Comment 3 Shirly Radco 2023-05-24 07:45:49 UTC
@aspauldi The inconsistencies were found when we run the new metrics name linter.
We consider this as a bug. There should be a deprecation notice for the metrics listed in this bug.

Comment 6 Debarati Basu-Nag 2023-08-15 18:47:15 UTC
As of CNV-v4.14.0.rhel9-1576, I see  `kubevirt_hco_unsafe_modification_count` has been renamed to `kubevirt_hco_unsafe_modifications ` and 
`kubevirt_hco_out_of_band_modifications_count` has been renamed to `kubevirt_hco_out_of_band_modifications_total`. However, the doc text field values are not correct (see the first rename).

Comment 9 errata-xmlrpc 2023-11-08 14:05:05 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: OpenShift Virtualization 4.14.0 Images security and bug fix 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:6817


Note You need to log in before you can comment on or make changes to this bug.