Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update etcd stores to use DefaultQualifiedResource #15721

Merged

Conversation

enj
Copy link
Contributor

@enj enj commented Aug 10, 2017

This field replaces QualifiedResource and serves as the default group resource info when the request does not provide that data.

Signed-off-by: Monis Khan mkhan@redhat.com

xref: #15213 #15006 kubernetes/kubernetes/pull/49868

@openshift-merge-robot openshift-merge-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 10, 2017
@bparees
Copy link
Contributor

bparees commented Aug 10, 2017

/unassign

@simo5 simo5 mentioned this pull request Aug 10, 2017
67 tasks
@enj enj force-pushed the enj/u/request_info_err/49868 branch from 1527c37 to b226b76 Compare August 10, 2017 15:56
@enj
Copy link
Contributor Author

enj commented Aug 10, 2017

@mfojtik can you help me debug the github.com/openshift/origin/test/integration.TestV2RegistryGetTags failure: https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_integration/5723

Locally it fails in the same way:

I0810 11:44:08.836364   15433 wrap.go:42] POST /oapi/v1/namespaces/integration/localsubjectaccessreviews: (1.772307ms) 201 [[integration.test/v3.6.0 (linux/amd64) openshift/1527c37] 127.0.0.1:43784]
time="2017-08-10T11:44:08.837198137-04:00" level=info msg="Using \"127.0.0.1:5000\" as Docker Registry URL" go.version=go1.8.3 instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.logger=registry 
time="2017-08-10T11:44:08.837253868-04:00" level=debug msg=PutImageManifest go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.837306353-04:00" level=warning msg="the ResponseWriter does not implement CloseNotifier (type: *context.instrumentedResponseWriter)" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.837583504-04:00" level=debug msg="(*pullthroughManifestService).Put: enabling remote blob access check" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.837626848-04:00" level=debug msg="(*manifestService).Put" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.838022093-04:00" level=debug msg="(*pullthroughBlobStore).Stat: starting with dgst=sha256:3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.838082429-04:00" level=debug msg="(*blobDescriptorService).Stat: starting with digest=sha256:3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.838215112-04:00" level=debug msg="inmemory.GetContent(\"/docker/registry/v2/repositories/integration/otherrepo/_layers/sha256/3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f/link\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=36.377µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).GetContent" trace.id=68f02894-5ea5-4203-8649-f266acb82504 trace.line=82 vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.838349687-04:00" level=debug msg="inmemory.Stat(\"/docker/registry/v2/blobs/sha256/33/3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f/data\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=24.58µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=96138b07-5f7b-4fb4-86a7-9d2e8bdb6f70 trace.line=137 vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.838418408-04:00" level=debug msg="(*manifestStore).Put" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.838457003-04:00" level=debug msg="(*signedManifestHandler).Put" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.838940915-04:00" level=debug msg="inmemory.Stat(\"/docker/registry/v2/blobs/sha256/db/db9c5fc83b4263b94b58d83248a5663bfe37a75c041ddbea67653a2657aacf4c/data\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=20.56µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=7f55f850-7822-4c90-85c4-2c0394068afb trace.line=137 vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.839063724-04:00" level=debug msg="inmemory.PutContent(\"/docker/registry/v2/blobs/sha256/db/db9c5fc83b4263b94b58d83248a5663bfe37a75c041ddbea67653a2657aacf4c/data\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=34.231µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=52b144c6-2d85-4303-a3fe-daca0e76fd9e trace.line=95 vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.839196125-04:00" level=debug msg="inmemory.PutContent(\"/docker/registry/v2/repositories/integration/otherrepo/_manifests/revisions/sha256/db9c5fc83b4263b94b58d83248a5663bfe37a75c041ddbea67653a2657aacf4c/link\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=33.452µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=fe4e91d1-4eed-4f84-ab27-95c13c28db6b trace.line=95 vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.839304544-04:00" level=debug msg="inmemory.PutContent(\"/docker/registry/v2/repositories/integration/otherrepo/_manifests/revisions/sha256/db9c5fc83b4263b94b58d83248a5663bfe37a75c041ddbea67653a2657aacf4c/link\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=21.808µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent" trace.id=65779599-d4be-4c8c-bea6-421ada1595b7 trace.line=95 vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.839883464-04:00" level=debug msg="(*pullthroughBlobStore).Stat: starting with dgst=sha256:3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.839935931-04:00" level=debug msg="(*blobDescriptorService).Stat: starting with digest=sha256:3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.840053222-04:00" level=debug msg="inmemory.GetContent(\"/docker/registry/v2/repositories/integration/otherrepo/_layers/sha256/3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f/link\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=32.853µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).GetContent" trace.id=f539f50f-0dde-4c71-8b34-72bba22cff3a trace.line=82 vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.840176639-04:00" level=debug msg="inmemory.Stat(\"/docker/registry/v2/blobs/sha256/33/3338741912250e909ffb744cb122f277ebc26608a50ad24859d386758dbf290f/data\")" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry trace.duration=20.795µs trace.file="/home/mkhan/aos/origin/src/github.com/openshift/origin/_output/local/go/src/github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/openshift/origin/vendor/github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=10e2db47-49cc-4107-b398-21e7ea5bf71e trace.line=137 vars.name="integration/otherrepo" vars.reference=latest 
I0810 11:44:08.841298   15433 handler.go:160] kube-aggregator: POST "/oapi/v1/namespaces/integration/imagestreammappings" satisfied by nonGoRestful
I0810 11:44:08.841317   15433 pathrecorder.go:253] kube-aggregator: "/oapi/v1/namespaces/integration/imagestreammappings" satisfied by NotFoundHandler
I0810 11:44:08.841330   15433 handler.go:160] kube-apiserver: POST "/oapi/v1/namespaces/integration/imagestreammappings" satisfied by nonGoRestful
I0810 11:44:08.841338   15433 pathrecorder.go:253] kube-apiserver: "/oapi/v1/namespaces/integration/imagestreammappings" satisfied by NotFoundHandler
I0810 11:44:08.841350   15433 handler.go:150] openshift-apiserver: POST "/oapi/v1/namespaces/integration/imagestreammappings" satisfied by gorestful with webservice /oapi/v1
I0810 11:44:08.843371   15433 wrap.go:42] POST /oapi/v1/namespaces/integration/imagestreammappings: (2.479599ms) 404 [[integration.test/v3.6.0 (linux/amd64) openshift/1527c37] 127.0.0.1:43776]
time="2017-08-10T11:44:08.843612664-04:00" level=error msg="error creating ImageStreamMapping: imagestreammappings \"otherrepo\" not found" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
time="2017-08-10T11:44:08.843742439-04:00" level=error msg="response completed with error" err.code=unknown err.detail="imagestreammappings \"otherrepo\" not found" err.message="unknown error" go.version=go1.8.3 http.request.host="127.0.0.1:5000" http.request.id=6dad5d81-5b62-4204-bd13-42bf1f7baf86 http.request.method=PUT http.request.remoteaddr="127.0.0.1:60464" http.request.uri="/v2/integration/otherrepo/manifests/latest" http.request.useragent="Go-http-client/1.1" http.response.contenttype="application/json; charset=utf-8" http.response.duration=15.922506ms http.response.status=500 http.response.written=263 instance.id=0187019c-2975-467c-a0d0-5b71b72d49fc openshift.auth.user=admin openshift.auth.userid=bed0715b-7de2-11e7-9d2c-507b9dac97ff openshift.logger=registry vars.name="integration/otherrepo" vars.reference=latest 
127.0.0.1 - - [10/Aug/2017:11:44:08 -0400] "PUT /v2/integration/otherrepo/manifests/latest HTTP/1.1" 500 263 "" "Go-http-client/1.1"
--- FAIL: TestV2RegistryGetTags (8.68s)
	v2_docker_registry_test.go:244: otherStream=&image.ImageStream{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{sec:0, nsec:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:image.ImageStreamSpec{LookupPolicy:image.ImageLookupPolicy{Local:false}, DockerImageRepository:"", Tags:map[string]image.TagReference(nil)}, Status:image.ImageStreamStatus{DockerImageRepository:"", PublicDockerImageRepository:"", Tags:map[string]image.TagEventList(nil)}}, err=imagestreams "otherrepo" not found
	v2_docker_registry_test.go:256: unexpected put status code: 500
		{"errors":[{"code":"UNKNOWN","message":"unknown error","detail":{"ErrStatus":{"metadata":{},"status":"Failure","message":"imagestreammappings \"otherrepo\" not found","reason":"NotFound","details":{"name":"otherrepo","kind":"imagestreammappings"},"code":404}}}]}
		
	etcd.go:141: dumping etcd to "/tmp/openshift/test-integration/etcd-dump-TestV2RegistryGetTags-v2.json"
	etcd.go:190: Unable to dump etcd2: open /tmp/openshift/test-integration/etcd-dump-TestV2RegistryGetTags-v2.json: permission denied
	etcd.go:195: Unable to dump etcd3: open /tmp/openshift/test-integration/etcd-dump-TestV2RegistryGetTags-v3.json: permission denied
FAIL
hack/test-integration.sh took 41 seconds

…ect APIVersion

Signed-off-by: Monis Khan <mkhan@redhat.com>
This field replaces QualifiedResource and serves as the default
group resource info when the request does not provide that data.

Signed-off-by: Monis Khan <mkhan@redhat.com>
@enj enj force-pushed the enj/u/request_info_err/49868 branch from b226b76 to e8e4e46 Compare August 10, 2017 18:51
status.Details.Name != m.repo.name {
kind := strings.ToLower(status.Details.Kind)
isValidKind := kind == "imagestream" /*pre-1.2*/ || kind == "imagestreams" /*1.2 to 1.6*/ || kind == "imagestreammappings" /*1.7+*/
if !isValidKind || status.Code != http.StatusNotFound || status.Details.Name != m.repo.name {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@legionus @mfojtik PTAL

This change is required because in pkg/image/registry/imagestreammapping/rest.go:

// findStreamForMapping retrieves an ImageStream whose DockerImageRepository matches dockerRepo.
func (s *REST) findStreamForMapping(ctx apirequest.Context, mapping *imageapi.ImageStreamMapping) (*imageapi.ImageStream, error) {
	if len(mapping.Name) > 0 {
		// Since ctx is passed through here, this returns a NotFound error for imagestreammappings now
		return s.imageStreamRegistry.GetImageStream(ctx, mapping.Name, &metav1.GetOptions{})
	}
...
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@enj
Copy link
Contributor Author

enj commented Aug 11, 2017

@smarterclayton @mfojtik all green now, just waiting on your approval.

@legionus
Copy link
Contributor

/approve

1 similar comment
@deads2k
Copy link
Contributor

deads2k commented Aug 11, 2017

/approve

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2017
@@ -153,7 +153,7 @@ os::test::junit::declare_suite_start "cmd/deployments/setdeploymenthook"
arg="-f test/integration/testdata/test-deployment-config.yaml"
os::cmd::expect_failure_and_text "oc set deployment-hook" "error: one or more deployment configs"
os::cmd::expect_failure_and_text "oc set deployment-hook ${arg}" "error: you must specify one of --pre, --mid, or --post"
os::cmd::expect_failure_and_text "oc set deployment-hook ${arg} -o yaml --pre -- mycmd" 'deploymentconfigs.apps.openshift.io "test-deployment-config" not found'
os::cmd::expect_failure_and_text "oc set deployment-hook ${arg} -o yaml --pre -- mycmd" 'deploymentconfigs "test-deployment-config" not found'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os::cmd::expect_failure_and_text 'oadm groups new errorgroup -o blah' 'error: output format "blah" not recognized'
os::cmd::expect_failure_and_text 'oc get groups/errorgroup' 'groups.user.openshift.io "errorgroup" not found'
os::cmd::expect_failure_and_text 'oc get groups/errorgroup' 'groups "errorgroup" not found'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -116,9 +116,9 @@ os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/groups"
os::cmd::expect_success_and_text 'oadm groups new shortoutputgroup -o name' 'groups/shortoutputgroup'
os::cmd::expect_failure_and_text 'oadm groups new shortoutputgroup' 'groups.user.openshift.io "shortoutputgroup" already exists'
os::cmd::expect_failure_and_text 'oadm groups new shortoutputgroup' 'groups "shortoutputgroup" already exists'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deads2k
Copy link
Contributor

deads2k commented Aug 11, 2017

Those changes look to be due to the preference for oapi. I think its fine.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, enj, legionus

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@enj
Copy link
Contributor Author

enj commented Aug 12, 2017

/retest

2 similar comments
@enj
Copy link
Contributor Author

enj commented Aug 12, 2017

/retest

@enj
Copy link
Contributor Author

enj commented Aug 12, 2017

/retest

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 12, 2017

@enj: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_conformance_gce e8e4e46 link /test extended_conformance_gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 15581, 15721)

@openshift-merge-robot openshift-merge-robot merged commit 281ccf2 into openshift:master Aug 13, 2017
openshift-merge-robot added a commit that referenced this pull request Aug 17, 2017
Automatic merge from submit-queue

Migrate to Kubernetes RBAC

Trello xref: https://trello.com/c/n3bR3Ys9

Fixes #12303
Fixes #13549
Fixes #13432
Fixes #15338
Fixes #14168
Fixes #10056

Need to investigate:

- [x] ...

Dependencies:

- [x] Prerequisite #15342
- [x] Requires openshift/openshift-ansible/pull/4933 @sdodson 
- [x] Blocked on openshift/openshift-ansible/issues/4967
- [x] Prerequisite kubernetes/kubernetes#50639

Followups:
- [ ] #15412
- [ ] #13316
- [ ] #13156
- [ ] #13430
- [ ] Should delete with proxy return details?
- [ ] Make project creation use RBAC instead of proxy endpoints?
- [ ] Remove policy objects from bootstrap roles
- [ ] Check if delegated_test.go can be revived
- [ ] Check to see if the deleted unit tests are reflected upstream and fix gaps
- [ ] Open issue to remove `openshiftSubjectLocator`
- [ ] Open issue to revisit forbidden message maker
- [ ] Update upstream `subject_locator_test` with origin's extensive testing
- [ ] Fix proxied create: ` _ bool is includeUnintialized, which we should really be passing through to the underlying API... it's odd there's not a CreateOptions parameter to Create`
- [ ] Fix proxied update: `if initializers use Update() to initialize objects (which I think they do), we may need to pass GetOptions{IncludeUninitialized: true} here...`
- [ ] Fix panics() in Convert...OrDie() functions
- [ ] glog.Fatal on post stark hook error
- [ ] Remove `TestPolicyCache`?
- [ ] Use discovery API based gating?
- [ ] upstream rules have always required a group. followup issue to remove getAPIGroupLegacy from `pkg/authorization/authorizer/scope/converter.go`
- [ ] issue to remove "normalizeResources" from `pkg/cmd/server/bootstrappolicy/policy.go`
- [ ] issue to  find callers of `clusterpolicyregistry "github.com/openshift/origin/pkg/authorization/registry/clusterpolicy"` and move to point of use
- [ ] issue to switch our encoding to rbac in `pkg/cmd/server/admin/create_bootstrappolicy_file.go`
- [ ] Exercise proxied endpoints
- [ ] hack/test-cmd.sh of gated overwrite bootstrap policy
- [ ] Delete unused legacy policy registry code
- [ ] Make RBAC discovery rule authoritative `pkg/authorization/apis/authorization/types.go`
- [ ] Fix `ignoreError` in `pkg/oc/admin/router/router.go`
- [ ] Confirm changes to `TestAuthorizationResolution` and `TestAuthorizationResourceAccessReview` in `test/integration/authorization_test.go`

Done:

- Store ClusterRoles as native RBAC Objects via Kubernetes.
- Provides backwards compatible API for the old policy based roles.
- Use Kubernetes authorizer

TODO:

- [x] Delete policy end points
- [x] Decide what to do with overwrite policy
- [x] Remove or gate `oc create policybinding`
- [x] Move new impersonation code to `pkg/auth/client/impersonate.go`
- [x] Remove any unnecessary conversions
- [x] Review new `proxy.go` files
- [x] Remove reason logic `allowed by rule in ...`
- [x] Add interface assertion to proxy files
- [x] Confirm we need `pkg/authorization/util/convert/convert.go`
- [x] Confrim we need to expose some of the private conversion functions
- [x] Add protect/autoupdate annotation conversion to general conversion functions
- [x] ~~Support watch on proxied endpoints~~
- [x] Cherry pick kubernetes/kubernetes#49868 -> #15721
- [x] Fix upstream commits
- [x] Restore and version gate `NewCmdMigrateAuthorization`
- [x] ~~Wrap other errors in proxy files?~~ Remove all error wrapping
- [x] Make `NewImpersonatingRBACFromContext` more generic
- [x] Kube authorizer's reason on deny contains evaluation errors - do we want to preserve those?
- [x] Review `ImpersonatingRESTClient` in `pkg/auth/client/impersonate.go`
- [ ] Review `pkg/project/auth/cache.go` and ` pkg/project/auth/cache_test.go`
- [ ] Review ` pkg/authorization/authorizer/scope/converter_test.go`
- [ ] Review `k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request.go`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants