| Summary: | Container resources override doesn't happen due to incorrect master configuration | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Qixuan Wang <qixuan.wang> |
| Component: | Pod | Assignee: | Stefanie Forrester <dakini> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Qixuan Wang <qixuan.wang> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 3.x | CC: | aos-bugs, jokerman, lmeyer, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-03-22 15:24:10 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: | |
(In reply to Qixuan Wang from comment #0) > ClusterResourceOverride have been configured on master with Ops's help. I > enabled override in project and create a pod with memory limit specified. FWIW you don't have to enable it per-project, you only have to avoid disabling it. > kubernetesMasterConfig: > admissionConfig: > pluginOrderOverride: > - RunOnceDuration > - NamespaceLifecycle > - OriginPodNodeEnvironment ClusterResourceOverride should go in this list right here. > - LimitRanger > - ServiceAccount > - SecurityContextConstraint > - ResourceQuota > - SCCExecRestrictions This is related to https://github.com/openshift/online/issues/62#issuecomment-198146929 - I've added a comment there. Manually added the change for now, and updated ops docs to get this into the next build (later this week). Verified on dev-preview-int, the configuration bug has been fixed. Thanks.
Limits:
memory: 200Mi
cpu: 390m
Requests:
cpu: 24m
memory: 120Mi
Feel free to reopen if it returns. |
Description of problem: ClusterResourceOverride have been configured on master with Ops's help. I enabled override in project and create a pod with memory limit specified. But Container resources were not override by limits.memory. This configuration can't work on Origin either. Version-Release number of selected component (if applicable): dev-preview-int How reproducible: Always Steps to Reproduce: 1. Check master configuration # cat master-config.yaml <------------snip-------------------> kubernetesMasterConfig: admissionConfig: pluginOrderOverride: - OriginNamespaceLifecycle - BuildByStrategy - ProjectRequestLimit pluginConfig: ProjectRequestLimit: configuration: apiVersion: v1 kind: ProjectRequestLimitConfig limits: - selector: admin: "true" - maxProjects: 1 kubernetesMasterConfig: admissionConfig: pluginOrderOverride: - RunOnceDuration - NamespaceLifecycle - OriginPodNodeEnvironment - LimitRanger - ServiceAccount - SecurityContextConstraint - ResourceQuota - SCCExecRestrictions pluginConfig: RunOnceDuration: configuration: apiVersion: v1 kind: RunOnceDurationConfig activeDeadlineSecondsOverride: 3600 ClusterResourceOverride: configuration: apiVersion: v1 kind: ClusterResourceOverrideConfig limitCPUToMemoryPercent: 200 cpuRequestToLimitPercent: 6 memoryRequestToLimitPercent: 60 <------------snip-------------------> 2. Check project override enabled [root@qwang online]# oc describe project qwangquota | grep openshift.io Annotations: openshift.io/description= openshift.io/display-name= openshift.io/requester=system:admin openshift.io/sa.scc.mcs=s0:c47,c39 openshift.io/sa.scc.supplemental-groups=1002240000/10000 openshift.io/sa.scc.uid-range=1002240000/10000 quota.openshift.io/cluster-resource-override-enabled=true 3. Create a pod with request and limit # vi pod-limit-memory.yaml apiVersion: v1 kind: Pod metadata: name: pod-limit-memory labels: name: pod-limit-memory spec: containers: - name: pod-limit-memory image: openshift/mysql-55-centos7:latest env: - name: MYSQL_USER value: userSUM name: MYSQL_PASSWORD value: P5J6s8wf name: MYSQL_DATABASE value: root name: MYSQL_ROOT_PASSWORD value: W5J6s8wf resources: limits: memory: "200Mi" 4. Check cpu/memory limit/request # oc describe pod pod-limit-memory Actual results: 4. Limits: memory: 200Mi Requests: memory: 200Mi Expected results: Other resources should be overrode by memory limit and calculated by master configuration. So Limits.memory=200Mi, Limits.cpu=390m, Requests.memory=120Mi, Requests.cpu=24m Additional info: