Bug 1334866
| Summary: | metadata.deletionTimestamp settable during update | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Jordan Liggitt <jliggitt> |
| Component: | Master | Assignee: | Jordan Liggitt <jliggitt> |
| Status: | CLOSED ERRATA | QA Contact: | weiwei jiang <wjiang> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.2.0 | CC: | adellape, aos-bugs, jokerman, mmccomas, tdawson, wsun |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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 15:07:06 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: | |
| Embargoed: | |||
|
Description
Jordan Liggitt
2016-05-10 16:57:48 UTC
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 |