Bug 1764147

Summary: [Compatibility] 4.1 client "oc edit scc restricted" against 4.2 env always report error oc
Product: OpenShift Container Platform Reporter: xiyuan
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.zCC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.1.z   
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-12-04 12:32:15 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:
Bug Depends On: 1707679    
Bug Blocks:    

Description xiyuan 2019-10-22 11:19:37 UTC
Description of problem:
[Compatibility] 4.1 client "oc edit scc restricted" against 4.2 env always report error

Version-Release number of selected component (if applicable):
Cluster version is 4.2.0-0.nightly-2019-10-18-063630
$ oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.21", GitCommit:"27e6c2888", GitTreeState:"clean", BuildDate:"2019-10-15T11:37:41Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.6+2fdcb45", GitCommit:"2fdcb45", GitTreeState:"clean", BuildDate:"2019-10-17T19:08:40Z", GoVersion:"go1.12.8", Compiler:"gc", Platform:"linux/amd64"}


How reproducible:
Steps to Reproduce:
1. oc version 4.1
2. try "oc edit scc restricted", modify value of allowPrivilegeEscalation from "true" to "false"
3.

Actual results:
$ oc edit scc restricted
error: securitycontextconstraints.security.openshift.io "restricted" could not be patched: the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json

Expected results:
$ oc edit scc restricted
securitycontextconstraints.security.openshift.io/restricted edited


Additional info:

Comment 3 zhou ying 2019-11-22 05:09:41 UTC
confirmed with latest version, the issue has fixed:

[root@dhcp-140-138 ~]# oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.25", GitCommit:"a54a5ba90", GitTreeState:"clean", BuildDate:"2019-11-21T15:27:52Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.6+d84b4ad", GitCommit:"d84b4ad", GitTreeState:"clean", BuildDate:"2019-11-21T10:14:51Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

[root@dhcp-140-138 ~]# oc edit scc restricted 
securitycontextconstraints.security.openshift.io/restricted edited

Comment 5 errata-xmlrpc 2019-12-04 12:32:15 UTC
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-2019:3956