Bug 1409225
Summary: | cannot patch a value to empty string | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | raffaele spazzoli <rspazzol> |
Component: | Node | Assignee: | Derek Carr <decarr> |
Status: | CLOSED NOTABUG | QA Contact: | DeShuai Ma <dma> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.3.1 | CC: | aos-bugs, jokerman, mmccomas, xxia |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-01-04 17:58:00 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
raffaele spazzoli
2016-12-30 12:58:46 UTC
(In reply to raffaele spazzoli from comment #0) > here is an example: > oc patch project glusterfs --patch '{ "metadata":{"annotation": { > "openshift.io/node-selector": "" }}}' Thanks for the report. Try plural "annotations", it works: Before empty patch: $ oc get namespace xxia-proj -o yaml | grep openshift.io/node-selector openshift.io/node-selector: region=primary Now empty patch: $ oc patch namespace xxia-proj --patch '{ "metadata":{"annotations": {"openshift.io/node-selector": "" }}}' # Run via cluster-admin After empty patch: $ oc get namespace xxia-proj -o yaml | grep openshift.io/node-selector openshift.io/node-selector: "" Also, should use "oc patch namespace ... " instead of "oc patch project ...". The latter will show "metadata.annotations[openshift.io/node-selector] ... field is immutable, try updating the namespace" (As for this, see bug 1386401) As for your report, see related bug 1267454 The command: $ oc patch namespace xxia-proj --patch '{ "metadata":{"annotations": {"openshift.io/node-selector": "" }}}' # Run via cluster-admin works as described. Closing as not a bug. (In reply to Derek Carr from comment #2) > Closing as not a bug. Right. But IMO, at the beginning I didn't notice comment 0 uses singular "annotation" and just copied its command to reproduce, nearly thinking it as regression bug. Singular "annotation" is kind of "non-existing field" said in bug 1267454, which causes UX problem and makes user confusion like the reporter of this bug. Looking forward to the fix of bug 1267454 |