| Summary: | Can not update pod's mutable field when project later creates quota or limitrange | ||
|---|---|---|---|
| Product: | OKD | Reporter: | Xingxing Xia <xxia> |
| Component: | Pod | Assignee: | Derek Carr <decarr> |
| Status: | CLOSED WONTFIX | QA Contact: | DeShuai Ma <dma> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, decarr, 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: | 2017-06-02 20:21:14 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: | |
|
Description
Xingxing Xia
2016-04-15 10:23:46 UTC
Step 5: The LimitRanger is intercepting CREATE and UPDATE operations for pods. The code is evaluating the updated pod against any active LimitRange(s) that are now present in the project. It is merging the default resource requirements in an UPDATE operation, and since the pod did not previously have resource requirements, and we do not yet allow dynamically updating a pods resource requirements, the UPDATE operation is causing an error. There had been a fix to have LimitRange ignore UPDATE operations for pods, but that appears to have regressed: https://github.com/kubernetes/kubernetes/pull/18477/files#diff-e3f052839796781484de133fea5d5b5dR62 I opened the upstream issue to track a fix: https://github.com/kubernetes/kubernetes/issues/24351 Step 7: The quota system is intercepting the CREATE and UPDATE operations. Since we do not yet support mutation of a pod's resource requirements on UPDATE, it should be safe to ignore pod updates all together. https://github.com/kubernetes/kubernetes/blob/master/pkg/quota/evaluator/core/pods.go#L50 I opened the upstream issue to track a fix: https://github.com/kubernetes/kubernetes/issues/24352 A correction to a previous comment on LimitRange and regression: >>There had been a fix to have LimitRange ignore UPDATE operations for pods, but that appears to have regressed: https://github.com/kubernetes/kubernetes/pull/18477/files#diff-e3f052839796781484de133fea5d5b5dR62 The above PR never merged into the code base, so there is no actual regression on LimitRange behavior to my knowledge, but a fix should still be made. I do not think this should be a release blocker as best-practice should be to create a quota prior to creating resources in the project. Similar discussion on issues that can arise if a quota is added post project creation is here: https://github.com/kubernetes/kubernetes/issues/22509 for the error reported in step 5, we will not update a limit range. right now, the presence of limit range precludes the ability to run pods that dont make resource requirements. for the error reported in step 7, the quota system has evolved to now let you write a quota that tracks pods that are NotBestEffort via scopes. for the quota in question for this scenario, the quota would not have rejected the pod if it had the scope NotBestEffort applied. |