I've hit a strange problem with directory ownership for the docker registry a couple of times, and don't understand what is causing this.

The registry was working fine for some time. I'm using a Cinder volume for the registry storage, but don't know if that's relevant. Then something happened that stopped pods pushing to the registry, with the problem being that the registry pod was getting "Permission denied" errors when it was trying to create directories under /registry/docker/registry/v2/repositories.

Looking at the file system the directories were all owned by 1000000000.1000000000 which explains why the registry process (running as user 1001) could not write to these directories. e.g.

sh-4.2$ cd /registry/docker/registry/v2/
sh-4.2$ ls -al
total 0
drwxrwsr-x.  4 1000000000 1000000000  39 Apr 20 15:51 .
drwxrwsr-x.  3 1000000000 1000000000  16 Apr 20 15:51 ..
drwxrwsr-x.  3 1000000000 1000000000  20 Apr 20 15:51 blobs
drwxrwsr-x. 15 1000000000 1000000000 215 May 29 14:14 repositories

Doing a `docker -exec -u 0 <registry-pod> on the infra node and then a `chown -R 1001.0 /registry/docker/registry`  to reset the permissions fixed the problem.

Anyone any idea what's going on here?

Tim

_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to