Bug 2080547

Summary: Metrics kubevirt_hco_out_of_band_modifications_count, does not reflect correct modification count when label is added to priorityclass/kubevirt-cluster-critical in a loop
Product: Container Native Virtualization (CNV) Reporter: Debarati Basu-Nag <dbasunag>
Component: MetricsAssignee: Nahshon Unna-Tsameret <nunnatsa>
Status: CLOSED ERRATA QA Contact: Satyajit Bulage <sbulage>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.11.0CC: cnv-qe-bugs, kmajcher, nunnatsa, stirabos
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.11.0-462 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2091972 (view as bug list) Environment:
Last Closed: 2022-09-14 19:31:19 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: 2091972    

Comment 1 Nahshon Unna-Tsameret 2022-06-01 10:29:04 UTC
There is no way to update the PriorityClass (it's emutable). So in case of update, HCO delete and recreate it. 

I guess since it's modified in loops, there is some timing issue that causes HCO to fail to read the priority class in the next loop, and then it fails and miss the metric update. I'm not sure it worth to fix this issue. 

@stirabos - what do you think?

Comment 2 Simone Tiraboschi 2022-06-15 10:04:09 UTC
The proposed fix looks safe and robust.

Comment 4 Satyajit Bulage 2022-06-24 09:56:18 UTC
I have added label to priority class --> kubevirt-cluster-critical, waited to 15+mins to reconcile. But it didn't happened.
Also, count didn't get increased.

Comment 5 Satyajit Bulage 2022-06-24 14:03:33 UTC
Tried on another cluster and worked as expected.
Component: priorityclass/kubevirt-cluster-critical is reconciling and count is updating properly.
Verifying BZ.

Comment 8 errata-xmlrpc 2022-09-14 19:31:19 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.11.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-2022:6526