Bug 1612628 - In some error, `oc get` should remove the message No resources found
Summary: In some error, `oc get` should remove the message No resources found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.1.0
Assignee: Maciej Szulik
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On: 1393289
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-06 03:01 UTC by zhou ying
Modified: 2019-06-04 10:40 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: There was no proper error check when returning no resources information. Consequence: No resources found was always printed. Fix: Check other errors before printing no resources found. Result: No resources found is printed only when no other errors were encountered.
Clone Of: 1393289
Environment:
Last Closed: 2019-06-04 10:40:34 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 0 None None None 2018-08-06 03:01:05 UTC
Red Hat Product Errata RHBA-2019:0758 0 None None None 2019-06-04 10:40:41 UTC

Comment 1 Juan Vallejo 2018-08-08 14:29:00 UTC
Looks like a regression. Upstream PR: https://github.com/kubernetes/kubernetes/pull/67137

Will make it into Origin in the next rebase.

Comment 2 Juan Vallejo 2018-08-16 19:06:21 UTC
Upstream PR has merged. Fix will be available in Origin after the next rebase.

Comment 4 Maciej Szulik 2019-02-28 15:42:54 UTC
This has merged with the rebase, moving to qa.

Comment 5 zhou ying 2019-03-01 02:32:29 UTC
The issue has fixed:
[root@dhcp-140-138 ~]# oc version --short
Client Version: v4.0.6
Server Version: v1.12.4+0cbcfc5afe
[root@dhcp-140-138 ~]# oc get users
Error from server (Forbidden): users.user.openshift.io is forbidden: User "pm1" cannot list resource "users" in API group "user.openshift.io" at the cluster scope
[root@dhcp-140-138 ~]# oc get users --loglevel=6
I0301 10:32:00.953222   15895 loader.go:359] Config loaded from file /root/.kube/config
I0301 10:32:00.954370   15895 loader.go:359] Config loaded from file /root/.kube/config
I0301 10:32:00.957514   15895 loader.go:359] Config loaded from file /root/.kube/config
I0301 10:32:00.963325   15895 loader.go:359] Config loaded from file /root/.kube/config
I0301 10:32:01.979722   15895 round_trippers.go:405] GET https://api.qe-yinzhou.qe.devcluster.openshift.com:6443/apis/user.openshift.io/v1/users?limit=500 403 Forbidden in 1016 milliseconds
I0301 10:32:01.980232   15895 helpers.go:201] server response object: [{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "users.user.openshift.io is forbidden: User \"pm1\" cannot list resource \"users\" in API group \"user.openshift.io\" at the cluster scope",
  "reason": "Forbidden",
  "details": {
    "group": "user.openshift.io",
    "kind": "users"
  },
  "code": 403
}]
F0301 10:32:01.980275   15895 helpers.go:119] Error from server (Forbidden): users.user.openshift.io is forbidden: User "pm1" cannot list resource "users" in API group "user.openshift.io" at the cluster scope

Comment 8 errata-xmlrpc 2019-06-04 10:40:34 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:0758


Note You need to log in before you can comment on or make changes to this bug.