Bug 2059843

Summary: Special Resource Operator(SRO) - No sro_used_nodes metric
Product: OpenShift Container Platform Reporter: liqcui
Component: Special Resource OperatorAssignee: yevgeny shnaidman <yshnaidm>
Status: CLOSED WONTFIX QA Contact: Udi Kalifon <ukalifon>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.10CC: aos-bugs, bthurber, yshnaidm
Target Milestone: ---   
Target Release: 4.10.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2062713 (view as bug list) Environment:
Last Closed: 2022-08-16 02:37:42 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: 2062713    
Bug Blocks:    

Description liqcui 2022-03-02 07:50:37 UTC
Description of problem:

SRO telemetry metric have issue, missing sro_used_nodes metrics in SRO4.10

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


How reproducible:


Steps to Reproduce:
1. Deploy SRO from source code
git clone https://github.com/openshift/special-resource-operator.git
cd special-resource-operator
export CONTAINER_COMMAND=podman
make local-image-build
TAG=master make deploy

2.Login OCP console, check observe=>metrics, search sro_, only three metrics, expect 4 sro_* metrics

Comment 1 liqcui 2022-03-02 07:52:46 UTC
Expected Metrics
sro_used_nodes
Returns the nodes that are running pods created by a SRO custom resource (CR). This metric is available for DaemonSet and Deployment objects only.
sro_kind_completed_info
Represents whether a kind of an object defined by the Helm Charts in a SRO CR has been successfully uploaded in the cluster (value 1) or not (value 0). Examples of objects are DaemonSet, Deployment or BuildConfig.
sro_states_completed_info
Represents whether the SRO has finished processing a CR successfully (value 1) or the SRO has not processed the CR yet (value 0).
sro_managed_resources_total
Returns the number of SRO CRs in the cluster, regardless of their state.

Comment 6 liqcui 2022-05-06 03:29:35 UTC
It seems sro metric still not cherrypick code from master to release-4.10

Comment 10 yevgeny shnaidman 2022-07-05 11:54:45 UTC
In case SRO is deployed into the openshift-operators namespace, no metrics will be propogated to the Prometheus, since the metrics are disabled for all the operators running in this namespace by the OLM team by design.