Description of problem: The docker registry does not work well with special volume Version-Release number of selected component (if applicable): openshift v1.1.3-194-gbe12c82 kubernetes v1.2.0-alpha.7-703-gbc4550d etcd 2.2.5 How reproducible: Always Steps to Reproduce: 1. Start OpenShift; 2. Create integrated docker registry with special volume: `oadm registry --create --credentials=openshift.local.config/master/openshift-registry.kubeconfig --config=openshift.local.config/master/admin.kubeconfig --volume='/registrytest'` 3. Login OpenShift and do STI build Actual results: Expected results: 3. The build will failed with error:Failed to push image. Response from registry is: Received unexpected HTTP status: 500 Internal Server Error Check the registry's log, has error too: time="2016-02-24T03:09:05.564311255Z" level=error msg="response completed with error" err.code=UNKNOWN err.detail="filesystem: mkdir /registry/docker: permission denied" err.message="unknown error" go.version=go1.4.2 http.request.host="172.30.56.122:5000" http.request.id=40b90277-65f5-4b7c-9bb3-3ae6482988f6 http.request.method=POST http.request.remoteaddr="172.18.8.43:49950" http.request.uri="/v2/zhouyt/origin-ruby-sample/blobs/uploads/" http.request.useragent="docker/1.8.2-el7 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=164.2573ms http.response.status=500 http.response.written=156 instance.id=6ab02965-bc4a-4dba-8d9f-298398055696 vars.name="zhouyt/origin-ruby-sample" Additional info: The registry with special volume works well .
Using --volume means that you're trying to change the default directory for storage. This should be accompanied by a change in the config.yaml for the image or a change in the deployment config to add the env var - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY value: /registrytest otherwise, it will continue to try to use the default /registry as the basedir and it will not be mounted as an emptydir volume which includes the correct write permissions. That is what is giving the "permission denied" error.
Hi Paul: Thanks ! I add the env var by: `oc env dc/docker-registry REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/registrytest` works well . Will update the cases.