Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1334866 - metadata.deletionTimestamp settable during update
metadata.deletionTimestamp settable during update
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master (Show other bugs)
3.2.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jordan Liggitt
weiwei jiang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-10 12:57 EDT by Jordan Liggitt
Modified: 2016-10-30 18:54 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, it was possible to set the metadata.deletionTimestamp parameter during the update of an object. However, deletionTimestamp and deletionGracePeriodSeconds fields should only be able to be set as a result of a delete API operation. This bug fix ensures that the parameter cannot be set during update, and any attempts now produce a "field is immutable; may only be changed via deletion" error.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-27 11:07:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1343 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 3.2.1.1 bug fix and enhancement update 2016-06-27 15:04:05 EDT

  None (edit)
Description Jordan Liggitt 2016-05-10 12:57:48 EDT
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:
Comment 1 Jordan Liggitt 2016-05-10 12:59:27 EDT
Fixed in https://github.com/openshift/ose/pull/193
Comment 3 weiwei jiang 2016-06-06 06:16:46 EDT
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?
Comment 4 Jordan Liggitt 2016-06-06 09:50:49 EDT
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
Comment 5 weiwei jiang 2016-06-06 22:08:20 EDT
(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.
Comment 7 errata-xmlrpc 2016-06-27 11:07:06 EDT
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

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