Bug 1332944 - Different errors when trying to modify pod's .spec.container.resources
Summary: Different errors when trying to modify pod's .spec.container.resources
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Derek Carr
QA Contact: weiwei jiang
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-04 12:02 UTC by Maciej Szulik
Modified: 2016-10-30 22:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-09-27 09:31:52 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Description Maciej Szulik 2016-05-04 12:02:18 UTC
Description of problem:
Different errors when trying to modify pod's .spec.container.resources.

Version-Release number of selected component (if applicable):
OpenShift Master:
Kubernetes Master:

How reproducible:

Steps to Reproduce:
1. Go to pods list
2. Choose one pod (eg. current deployment)
3. Click edit yaml
4. Try to modify container.resources.limits or container.resources.requests

Actual results:
Failed to update django-10-30bqb.
pods "django-10-30bqb" is forbidden: Unable to update quota status: compute-resources ResourceQuota "compute-resources" is invalid: [status.used[limits.cpu]: Invalid value: "-800m": must be greater than or equal to 0, status.used[limits.memory]: Invalid value: "-212Mi": must be greater than or equal to 0]

Expected results:
The same as from invoking oc edit pod/jango-10-30bqb:

# pods "django-10-30bqb" was not valid:
# * spec: Forbidden: pod updates may not change fields other than `containers[*].image` or `spec.activeDeadlineSeconds`

Comment 1 Jordan Liggitt 2016-05-06 14:03:28 UTC
Derek, should the resourcequota admission plugin even be processing the pod spec on update, since the spec isn't mutable?

Comment 2 Derek Carr 2016-05-06 14:21:56 UTC
ResourceQuota will ignore pod updates in kube 1.3+ with this PR:


Updating a pod container's resources will still cause a validation error.

Comment 3 Jordan Liggitt 2016-05-06 17:18:33 UTC
thanks, can you move to ON_QA once we pull in a level with this fix?

Comment 4 Derek Carr 2016-05-06 17:19:16 UTC
sure thing

Comment 6 weiwei jiang 2016-08-09 09:36:34 UTC
Checked with 
# openshift version 
openshift v3.3.0.17
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git
and console got the same error message 
Pod "pod-request-limit-valid-3" is invalid: spec: Forbidden: pod updates may not change fields other than `containers[*].image` or `spec.activeDeadlineSeconds`
with oc edit

Comment 8 errata-xmlrpc 2016-09-27 09:31:52 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.


Note You need to log in before you can comment on or make changes to this bug.