Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690236 - Get imagestreamimages failed with error: Unable to list {"image.openshift.io" "v1" "imagestreamimages"}: the server could not find the requested resource
Summary: Get imagestreamimages failed with error: Unable to list {"image.openshift.io"...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 4.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Michal Fojtik
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-19 06:00 UTC by Liang Xia
Modified: 2019-03-25 13:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-25 13:39:50 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Liang Xia 2019-03-19 06:00:18 UTC
Description of problem:
In the CLI, run command "oc get imagestreamimages", got error:
Error from server (NotFound): Unable to list {"image.openshift.io" "v1" "imagestreamimages"}: the server could not find the requested resource

If we have resource type imagestreamimages, then show the resource info.
If not, then show proper error message as below.
$ oc get should-not-exist-resource-type
error: the server doesn't have a resource type "should-not-exist-resource-type"


Version-Release number of selected component (if applicable):
Client Version: version.Info{Major:"4", Minor:"0+", GitVersion:"v4.0.22", GitCommit:"d14915559e", GitTreeState:"", BuildDate:"2019-03-14T21:55:38Z", GoVersion:"", Compiler:"", Platform:""}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.4+4fee69b", GitCommit:"4fee69b", GitTreeState:"clean", BuildDate:"2019-03-18T19:16:21Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
4.0.0-0.alpha-2019-03-18-221255

How reproducible:
Always

Steps to Reproduce:
1. oc get imagestreamimages


Actual results:
$ oc get imagestreamimages
Error from server (NotFound): Unable to list {"image.openshift.io" "v1" "imagestreamimages"}: the server could not find the requested resource


Expected results:
If we have resource type imagestreamimages, then show the resource info.
If not, then show proper error message as below.
$ oc get should-not-exist-resource-type
error: the server doesn't have a resource type "should-not-exist-resource-type"

Additional info:
$ oc get imagestreamimages --loglevel=9
I0319 13:25:36.285807   11412 loader.go:359] Config loaded from file /home/lxia/test/0319/auth/kubeconfig
I0319 13:25:36.286081   11412 round_trippers.go:386] curl -k -v -XGET  -H "Accept: application/json;as=Table;v=v1beta1;g=meta.k8s.io, application/json" -H "User-Agent: oc/v1.12.4+d14915559e (linux/amd64) kubernetes/d149155" 'https://xxx-qe-cluster-xxx:6443/apis/image.openshift.io/v1/namespaces/default/imagestreamimages?limit=500'
I0319 13:25:37.923180   11412 round_trippers.go:405] GET https://xxx-qe-cluster-xxx:6443/apis/image.openshift.io/v1/namespaces/default/imagestreamimages?limit=500 404 Not Found in 1637 milliseconds
I0319 13:25:37.923216   11412 round_trippers.go:411] Response Headers:
I0319 13:25:37.923224   11412 round_trippers.go:414]     Cache-Control: no-store
I0319 13:25:37.923234   11412 round_trippers.go:414]     Cache-Control: no-store
I0319 13:25:37.923242   11412 round_trippers.go:414]     Content-Type: application/json
I0319 13:25:37.923250   11412 round_trippers.go:414]     Date: Tue, 19 Mar 2019 05:25:37 GMT
I0319 13:25:37.923260   11412 round_trippers.go:414]     Content-Length: 174
I0319 13:25:37.923267   11412 round_trippers.go:414]     Audit-Id: 7ce474a5-e1fb-42ae-b996-41b8c2cd31c1
I0319 13:25:37.923300   11412 request.go:942] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}
I0319 13:25:37.923599   11412 helpers.go:201] server response object: [{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "Unable to list {\"image.openshift.io\" \"v1\" \"imagestreamimages\"}: the server could not find the requested resource",
  "reason": "NotFound",
  "details": {},
  "code": 404
}]
F0319 13:25:37.923629   11412 helpers.go:119] Error from server (NotFound): Unable to list {"image.openshift.io" "v1" "imagestreamimages"}: the server could not find the requested resource

Comment 1 Michal Fojtik 2019-03-25 13:39:50 UTC
imagestreamimages does not support list, they are virtual resources.


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