Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1504034

Summary: Add pod uid label on Prometheus metrics
Product: OpenShift Container Platform Reporter: Yaacov Zamir <yzamir>
Component: RFEAssignee: Derek Carr <decarr>
Status: CLOSED WONTFIX QA Contact: Xiaoli Tian <xtian>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: aos-bugs, ccoleman, decarr, fsimonce, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-12 11:54:38 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:
Attachments:
Description Flags
missing uid label on OCP-3.7 Prometheus none

Description Yaacov Zamir 2017-10-19 11:00:27 UTC
Created attachment 1340681 [details]
missing uid label on OCP-3.7 Prometheus

Description of problem:

OCP 3.7 will use Prometheus metrics. It is impossible to query metrics using the uid label because it is missing.
 
How reproducible:

reproducible on systems using:
#> oc version
oc v3.7.0-alpha.1+b10446e-1184
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://192.168.122.165:8443
openshift v3.7.0-alpha.1+b10446e-1184
kubernetes v1.7.6+a08f5eeb62

Steps to Reproduce:
1. Install OCP 3.7
2. Install Prometheus metrics
3. Query for metrics about a pod with specific uid

Actual results:
query:
container_cpu_system_seconds_total{container_name="POD",pod_name="registry-console-1-pf3dr"}
results:
0.01

query:
container_cpu_system_seconds_total{container_name="POD",pod_name="registry-console-1-pf3dr"}
results:
0.01

query:
container_cpu_system_seconds_total{container_name="POD",pod_uid="8a549ee4-b49a-11e7-b060-525400bd8690")
results:
NO RESULT

Expected results:

query:
container_cpu_system_seconds_total{container_name="POD",pod_name="registry-console-1-pf3dr"}
results:
0.01

query:
container_cpu_system_seconds_total{container_name="POD",pod_name="registry-console-1-pf3dr"}
results:
0.01

query:
container_cpu_system_seconds_total{container_name="POD",pod_uid="8a549ee4-b49a-11e7-b060-525400bd8690")
results:
0.01


Additional info:

when querying cAdvisor endpoint, the uid is already missing:

url:
https://prometheus.example.com:10250/metrics/cadvisor
response:
...
container_cpu_system_seconds_total{container_name="POD",id="/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod8c53e55a_b49a_11e7_b060_525400bd8690.slice/docker-99c275627fe90a5863bcf14eb6535b29b57438517c995243ddfe057fd0590714.scope",image="openshift/origin-pod:v3.7.0-alpha.1",name="k8s_POD_registry-console-1-pf3dr_default_8c53e55a-b49a-11e7-b060-525400bd8690_0",namespace="default",pod_name="registry-console-1-pf3dr"} 0.01
...

Comment 3 Federico Simoncelli 2017-10-19 13:16:23 UTC
This should be assigned to an OpenShift Node component, which I couldn't find.
I saw that other Kubelet/cAdvisor issues were previously assigned to the Pod component, so I am moving this there.

Comment 4 Seth Jennings 2017-10-20 16:39:01 UTC
Too late in the cycle to be adding features as fixes.  Moving to RFE.

Comment 5 Yaacov Zamir 2017-10-31 12:14:39 UTC
I can see PR:
https://github.com/kubernetes/kubernetes/pull/48125

Does that fix this BZ ?

If it does, in what version of kubernetes will we have pod_uid in the cAdvisor endpoint ?

Comment 7 Kirsten Newcomer 2019-06-12 11:54:38 UTC
With the introduction of OpenShift 4, Red Hat has delivered or roadmapped a substantial number of features based on feedback by our customers.  Many of the enhancements encompass specific RFEs which have been requested, or deliver a comparable solution to a customer problem, rendering an RFE redundant.

This bz (RFE) has been identified as a feature request not yet planned or scheduled for an OpenShift release and is being closed. 

If this feature is still an active request that needs to be tracked, Red Hat Support can assist in filing a request in the new JIRA RFE system, as well as provide you with updates as the RFE progress within our planning processes. Please open a new support case: https://access.redhat.com/support/cases/#/case/new 

Opening a New Support Case: https://access.redhat.com/support/cases/#/case/new 

As the new Jira RFE system is not yet public, Red Hat Support can help answer your questions about your RFEs via the same support case system.