Description of problem: During update of an object, metadata.deletionTimestamp can be set. deletionTimestamp and deletionGracePeriodSeconds fields should only be able to be set as a result of a delete API operation. Upstream issue: https://github.com/kubernetes/kubernetes/issues/24828 Upstream fix: https://github.com/kubernetes/kubernetes/pull/24839 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Fixed in https://github.com/openshift/ose/pull/193
Checked with atomic-openshift-3.2.1.1-1.git.0.96f9555.el7, and the deletionTimestamp is an immutable field now. # oc edit dc php # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this file will be # reopened with the relevant failures. # # deploymentconfigs "php" was not valid: # * metadata.deletionTimestamp: Invalid value: "2016-06-06T09:52:05Z": field is immutable; may only be changed via deletion # * metadata.deletionTimestamp: Invalid value: "2016-06-06T09:52:05Z": field is immutable; may only be changed via deletion # apiVersion: v1 kind: DeploymentConfig metadata: annotations: openshift.io/generated-by: OpenShiftWebConsole creationTimestamp: 2016-06-06T09:51:05Z deletionTimestamp: 2016-06-06T09:52:05Z # oc patch dc php -p '{"metadata":{"deletionTimestamp":"2016-06-06T09:52:05Z"}}' The DeploymentConfig "php" is invalid. * metadata.deletionTimestamp: Invalid value: "2016-06-06T09:52:05Z": field is immutable; may only be changed via deletion * metadata.deletionTimestamp: Invalid value: "2016-06-06T09:52:05Z": field is immutable; may only be changed via deletion But why display the message twice?
validation of core object metadata fields is done centrally on update of all objects. some object update validation also calls this method, which means that errors it produces could be seen twice. this occurs if you try to change the name, uid, or other immutable fields inside metadata as well. this isn't related to this bug, so moving back to ON_QA
(In reply to Jordan Liggitt from comment #4) > validation of core object metadata fields is done centrally on update of all > objects. some object update validation also calls this method, which means > that errors it produces could be seen twice. > > this occurs if you try to change the name, uid, or other immutable fields > inside metadata as well. > > this isn't related to this bug, so moving back to ON_QA Since the issue in this bug has been fixed, so move to verified.
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/RHBA-2016:1343