Bug 1905330

Summary: openshift-monitoring init-textfile is not requesting required resources: cpu, memory
Product: OpenShift Container Platform Reporter: W. Trevor King <wking>
Component: MonitoringAssignee: Damien Grisonnet <dgrisonn>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: alegrand, anpicker, dgrisonn, erooth, kakkoyun, lcosic, pkrupa, surbania
Target Milestone: ---Keywords: UpcomingSprint
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:41:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description W. Trevor King 2020-12-08 03:38:04 UTC
This bug was initially created as a copy of Bug #1905298, but for monitoring.  Per Clayton, initContainers must set both of these going forward [1], while [2] is showing:

openshift-monitoring/node-exporter-5ch44 container initContainers[0] (init-textfile) is not requesting required resources: cpu, memory
openshift-monitoring/node-exporter-bthk6 container initContainers[0] (init-textfile) is not requesting required resources: cpu, memory
openshift-monitoring/node-exporter-fwmgb container initContainers[0] (init-textfile) is not requesting required resources: cpu, memory
openshift-monitoring/node-exporter-g4jsj container initContainers[0] (init-textfile) is not requesting required resources: cpu, memory
openshift-monitoring/node-exporter-pttgx container initContainers[0] (init-textfile) is not requesting required resources: cpu, memory
openshift-monitoring/node-exporter-zndft container initContainers[0] (init-textfile) is not requesting required resources: cpu, memory
openshift-monitoring/telemeter-client-f649b8b5b-jn5xr container containers[0] (telemeter-client) is not requesting required resources: memory
openshift-monitoring/telemeter-client-f649b8b5b-jn5xr container containers[1] (reload) is not requesting required resources: memory

as part of failing:

  [sig-arch] Managed cluster should ensure control plane containers have requests set for cpu and memory [Suite:openshift/conformance/parallel]

origin/25747 is in flight to transition an existing, but overly relaxed, test-case to explicitly require both requests on all containers.  Any components which have not been fixed after an initial pass will have temporary exceptions linked to their tracking bugs when the stricter test lands.

[1]: https://github.com/openshift/enhancements/blob/master/CONVENTIONS.md#resources-and-limits
[2]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/25747/pull-ci-openshift-origin-master-e2e-gcp/1336048716389289984

Comment 9 Junqi Zhao 2021-01-22 02:30:04 UTC
tested with 4.7.0-0.nightly-2021-01-21-172657, cpu/memory requests are added to telemeter-client containers and initContainers of daemonset node-exporter

# oc -n openshift-monitoring get daemonset node-exporter -o go-template='{{range.spec.template.spec.containers}}{{"Container Name: "}}{{.name}}{{"\r\nresources: "}}{{.resources}}{{"\n"}}{{end}}'
Container Name: node-exporter
resources: map[requests:map[cpu:8m memory:180Mi]]
Container Name: kube-rbac-proxy
resources: map[requests:map[cpu:1m memory:30Mi]]

# oc -n openshift-monitoring get daemonset node-exporter -o go-template='{{range.spec.template.spec.initContainers}}{{"Container Name: "}}{{.name}}{{"\r\nresources: "}}{{.resources}}{{"\n"}}{{end}}'
Container Name: init-textfile
resources: map[requests:map[cpu:1m memory:1Mi]]

# oc -n openshift-monitoring get deploy telemeter-client -o go-template='{{range.spec.template.spec.containers}}{{"Container Name: "}}{{.name}}{{"\r\nresources: "}}{{.resources}}{{"\n"}}{{end}}'
Container Name: telemeter-client
resources: map[requests:map[cpu:1m memory:40Mi]]
Container Name: reload
resources: map[requests:map[cpu:1m memory:10Mi]]
Container Name: kube-rbac-proxy
resources: map[requests:map[cpu:1m memory:20Mi]]

Comment 13 errata-xmlrpc 2021-02-24 15:41:14 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: OpenShift Container Platform 4.7.0 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-2020:5633