Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1704358

Summary: [DOCS] oc patch on config objects does not seem to work
Product: OpenShift Container Platform Reporter: Eric Rich <erich>
Component: DocumentationAssignee: Kathryn Alexander <kalexand>
Status: CLOSED CURRENTRELEASE QA Contact: ge liu <geliu>
Severity: low Docs Contact: Vikram Goyal <vigoyal>
Priority: low    
Version: 4.1.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-17 19:28:51 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:
Bug Depends On:    
Bug Blocks: 1704381    

Description Eric Rich 2019-04-29 15:47:19 UTC
Description of problem: patch seems to fail with config/operator resource types 

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

$ oc get clusterversion -o wide
NAME      VERSION      AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.1.0-rc.0   True        False         3d21h   Cluster version is 4.1.0-rc.0

How reproducible: 100% 

Steps to Reproduce:
1. $ oc patch configs.imageregistry.operator.openshift.io/cluster -p '{"spec":{"defaultRoute":true}}'

Actual results:

> Error from server (UnsupportedMediaType): the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json

Expected results:

This should create a default route for the image-registry

Additional info:

Comment 1 Eric Rich 2019-04-29 16:02:02 UTC
Fixed with `--type merge`

> $ oc patch configs.imageregistry.operator.openshift.io/cluster --type merge -p '{"spec":{"defaultRoute":false}}'

Comment 2 Eric Rich 2019-04-29 16:07:16 UTC
We need to document this limited capability with patching CRD's 

https://access.redhat.com/solutions/4093671 is a good start

Comment 3 Kathryn Alexander 2019-05-15 16:53:31 UTC
The `--type merge` option is already in the install docs: https://docs.openshift.com/container-platform/4.1/installing/installing_bare_metal/installing-bare-metal.html#installation-registry-storage-non-production_installing-bare-metal

I'm proposing a change to the CLI guide here: https://github.com/openshift/openshift-docs/pull/14863

@Ge Liu, will you PTAL?

Comment 4 Kathryn Alexander 2019-05-15 16:53:32 UTC
The `--type merge` option is already in the install docs: https://docs.openshift.com/container-platform/4.1/installing/installing_bare_metal/installing-bare-metal.html#installation-registry-storage-non-production_installing-bare-metal

I'm proposing a change to the CLI guide here: https://github.com/openshift/openshift-docs/pull/14863

@Ge Liu, will you PTAL?

Comment 5 Kathryn Alexander 2019-05-16 13:45:45 UTC
Thanks! I've merged this change and am waiting for it to go live.