Bug 1763929

Summary: 4.x oc client is not compatible with OCP 3.11 for some resources
Product: OpenShift Container Platform Reporter: Priyanka Kanthale <pkanthal>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.zCC: aos-bugs, eparis, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1772463 (view as bug list) Environment:
Last Closed: 2020-01-23 11:08:30 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: 1772463, 1772467    

Description Priyanka Kanthale 2019-10-22 01:41:46 UTC
Description of problem:

The open shift 4.1 CLI can't get SecurityContextConstraints from 3.11 openshift.


# oc get SecurityContextConstraints restricted -o name
error: attempt to print an ungroupified object: /v1, Kind=SecurityContextConstraints

oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.18-201909201915+53a7fbd-dirty", GitCommit:"53a7fbd", GitTreeState:"dirty", BuildDate:"2019-09-21T03:15:55Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2019-09-12T23:41:09Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}


Actual results: Error is encountered. 


Expected results:
 # oc get SecurityContextConstraints restricted -o name
securitycontextconstraints.security.openshift.io/restricted



Additional info:

Comment 5 Maciej Szulik 2019-11-19 20:17:56 UTC
The PR merged, moving to MODIFIED.

Comment 7 zhou ying 2019-11-21 09:05:17 UTC
Confirmed with 4.3 oc , the issue has fixed:

[zhouying@dhcp-140-138 Glai]$ oc get SecurityContextConstraints restricted -o name
Error from server (Forbidden): securitycontextconstraints "restricted" is forbidden: User "zhouy" cannot get securitycontextconstraints at the cluster scope: RBAC: [clusterrole.rbac.authorization.k8s.io "system:admin" not found, clusterrole.rbac.authorization.k8s.io "clusteradmin" not found]

[zhouying@dhcp-140-138 Glai]$ oc get SecurityContextConstraints restricted -o name
securitycontextconstraints.security.openshift.io/restricted

[zhouying@dhcp-140-138 Glai]$ oc version
Client Version: v4.3.0
Kubernetes Version: v1.11.0+d4cacc0

Comment 9 errata-xmlrpc 2020-01-23 11:08:30 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-2020:0062

Comment 10 Red Hat Bugzilla 2023-09-14 05:44:48 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days