Bug 1493368

Summary: Code error of resources.limits.memory for prometheus prom-proxy container
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: InstallerAssignee: Zohar Gal-Or <zgalor>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: low    
Version: 3.7.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.7.0   
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: 2017-11-28 22:11:25 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:

Description Junqi Zhao 2017-09-20 03:35:55 UTC
Description of problem:
Code error of resources.limits.memory for prometheus prom-proxy container

Set resource limits for oauth_proxy
openshift_prometheus_oauth_proxy_cpu_limit=200m
openshift_prometheus_oauth_proxy_memory_limit=200Mi
openshift_prometheus_oauth_proxy_cpu_requests=200m
openshift_prometheus_oauth_proxy_memory_requests=200Mi

Get following pod info, resources.limits.memory is not shown in prom-proxy container.
containers
name: prom-proxy
ports:
- containerPort: 8443
name: web
protocol: TCP
resources:
limits:
cpu: 200m
requests:
cpu: 200m
memory: 200Mi

name: alerts-proxy
ports:
- containerPort: 9443
name: web
protocol: TCP
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 200m
memory: 200Mi


Checked code in https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_prometheus/templates/prometheus_deployment.j2#L41
it should be
{% if openshift_prometheus_oauth_proxy_memory_limit is defined and openshift_prometheus_oauth_proxy_memory_limit is not none %}

Version-Release number of selected component (if applicable):
# rpm -qa | grep openshift-ansible
openshift-ansible-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-roles-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-docs-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-callback-plugins-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-filter-plugins-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-playbooks-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch
openshift-ansible-lookup-plugins-3.7.0-0.126.4.git.0.3fc2b9b.el7.noarch


How reproducible:
Always

Steps to Reproduce:
1. Set resource limits for oauth_proxy in inventory file and deploy prometheus.
2.
3.

Actual results:
Missed resources.limits.memory for prom-proxy container.

Expected results:
resources.limits.memory should be in prom-proxy container.

Additional info:

Comment 1 Zohar Gal-Or 2017-10-18 15:20:34 UTC
Fixed:
https://github.com/openshift/openshift-ansible/pull/5789

Comment 2 Junqi Zhao 2017-10-23 01:48:12 UTC
Please change to ON_QA, issue is fixed, resources.limits.memory is in prom-proxy container now

# rpm -qa | grep openshift-ansible*
openshift-ansible-3.7.0-0.174.0.git.0.01932ad.el7.noarch
openshift-ansible-roles-3.7.0-0.174.0.git.0.01932ad.el7.noarch
openshift-ansible-docs-3.7.0-0.174.0.git.0.01932ad.el7.noarch
openshift-ansible-lookup-plugins-3.7.0-0.174.0.git.0.01932ad.el7.noarch
openshift-ansible-filter-plugins-3.7.0-0.174.0.git.0.01932ad.el7.noarch
openshift-ansible-playbooks-3.7.0-0.174.0.git.0.01932ad.el7.noarch
openshift-ansible-callback-plugins-3.7.0-0.174.0.git.0.01932ad.el7.noarch

Comment 3 Junqi Zhao 2017-10-25 00:21:27 UTC
set it to VERIFIED as per Comment 2

Comment 7 errata-xmlrpc 2017-11-28 22:11:25 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, 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-2017:3188