Skip to content

Docker 1.8.1 push issue to Registry 2.1.1 with nfs filesystem #15833

Closed

Description

@cmays20

The following issue is occurring while pushing to a 2.1.1 registry with the 1.8.1 client. Pushing works fine from a 1.7 client.

10.228.19.127 - - [24/Aug/2015:21:33:22 +0000] "PATCH /v2/here_cme_techops/onboarding/blobs/uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a?_state=TPtR3EHnTTJvS8W1Y4d9P909abHfq-mzi6OLcmHi5p17Ik5hbWUiOiJoZXJlX2NtZV90ZWNob3BzL29uYm9hcmRpbmciLCJVVUlEIjoiZjQ5YzYwYzYtZmE0Zi00MmQwLTg0MDQtODc3ZTAzMDVhMzNhIiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDE1LTA4LTI0VDIxOjMzOjIyLjg5MjkyOTE0MVoifQ%3D%3D HTTP/1.1" 202 0 "" "docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.10.0-229.el7.x86_64 os/linux arch/amd64"
time="2015-08-24T21:33:23Z" level=warning msg="the ResponseWriter does not implement CloseNotifier" http.request.host=docker.cme.in.here.com http.request.id=9228f638-cbab-430c-9e07-dc6cf77260f7 http.request.method=PUT http.request.remoteaddr="10.228.19.127:44234" http.request.uri="/v2/here_cme_techops/onboarding/blobs/uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a?_state=3_czVRweJjfpzyAbaEnD7p-wR4qKjkqHltBRYAs1qxF7Ik5hbWUiOiJoZXJlX2NtZV90ZWNob3BzL29uYm9hcmRpbmciLCJVVUlEIjoiZjQ5YzYwYzYtZmE0Zi00MmQwLTg0MDQtODc3ZTAzMDVhMzNhIiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0wOC0yNFQyMTozMzoyMloifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.10.0-229.el7.x86_64 os/linux arch/amd64" instance.id=506c18e6-6186-4adc-af49-288afbe7ce23 vars.name="here_cme_techops/onboarding" vars.uuid=f49c60c6-fa4f-42d0-8404-877e0305a33a version=v2.1.1
time="2015-08-24T21:33:23Z" level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/here_cme_techops/onboarding/_uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a\": remove /tmp/registry/docker/registry/v2/repositories/here_cme_techops/onboarding/_uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a: directory not empty" http.request.host=docker.cme.in.here.com http.request.id=9228f638-cbab-430c-9e07-dc6cf77260f7 http.request.method=PUT http.request.remoteaddr="10.228.19.127:44234" http.request.uri="/v2/here_cme_techops/onboarding/blobs/uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a?_state=3_czVRweJjfpzyAbaEnD7p-wR4qKjkqHltBRYAs1qxF7Ik5hbWUiOiJoZXJlX2NtZV90ZWNob3BzL29uYm9hcmRpbmciLCJVVUlEIjoiZjQ5YzYwYzYtZmE0Zi00MmQwLTg0MDQtODc3ZTAzMDVhMzNhIiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0wOC0yNFQyMTozMzoyMloifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.10.0-229.el7.x86_64 os/linux arch/amd64" instance.id=506c18e6-6186-4adc-af49-288afbe7ce23 vars.name="here_cme_techops/onboarding" vars.uuid=f49c60c6-fa4f-42d0-8404-877e0305a33a version=v2.1.1
time="2015-08-24T21:33:23Z" level=error msg="unknown error completing upload: &os.PathError{Op:\"remove\", Path:\"/tmp/registry/docker/registry/v2/repositories/here_cme_techops/onboarding/_uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a\", Err:0x27}" http.request.host=docker.cme.in.here.com http.request.id=9228f638-cbab-430c-9e07-dc6cf77260f7 http.request.method=PUT http.request.remoteaddr="10.228.19.127:44234" http.request.uri="/v2/here_cme_techops/onboarding/blobs/uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a?_state=3_czVRweJjfpzyAbaEnD7p-wR4qKjkqHltBRYAs1qxF7Ik5hbWUiOiJoZXJlX2NtZV90ZWNob3BzL29uYm9hcmRpbmciLCJVVUlEIjoiZjQ5YzYwYzYtZmE0Zi00MmQwLTg0MDQtODc3ZTAzMDVhMzNhIiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0wOC0yNFQyMTozMzoyMloifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.10.0-229.el7.x86_64 os/linux arch/amd64" instance.id=506c18e6-6186-4adc-af49-288afbe7ce23 vars.name="here_cme_techops/onboarding" vars.uuid=f49c60c6-fa4f-42d0-8404-877e0305a33a version=v2.1.1
time="2015-08-24T21:33:23Z" level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/here_cme_techops/onboarding/_uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a\": remove /tmp/registry/docker/registry/v2/repositories/here_cme_techops/onboarding/_uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a/.nfs00000000a18136c600000014: device or resource busy" http.request.host=docker.cme.in.here.com http.request.id=9228f638-cbab-430c-9e07-dc6cf77260f7 http.request.method=PUT http.request.remoteaddr="10.228.19.127:44234" http.request.uri="/v2/here_cme_techops/onboarding/blobs/uploads/f49c60c6-fa4f-42d0-8404-877e0305a33a?_state=3_czVRweJjfpzyAbaEnD7p-wR4qKjkqHltBRYAs1qxF7Ik5hbWUiOiJoZXJlX2NtZV90ZWNob3BzL29uYm9hcmRpbmciLCJVVUlEIjoiZjQ5YzYwYzYtZmE0Zi00MmQwLTg0MDQtODc3ZTAzMDVhMzNhIiwiT2Zmc2V0IjozMiwiU3RhcnRlZEF0IjoiMjAxNS0wOC0yNFQyMTozMzoyMloifQ%3D%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.10.0-229.el7.x86_64 os/linux arch/amd64" instance.id=506c18e6-6186-4adc-af49-288afbe7ce23 vars.name="here_cme_techops/onboarding" vars.uuid=f49c60c6-fa4f-42d0-8404-877e0305a33a version=v2.1.1

The last line shows an nfs file handle as the reason the directory couldn't be cleaned up.

Here are the last couple of lines from the server running the push:

Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.762420755Z" level=debug msg="rendered layer for d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff of [32] size"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.762420755Z" level=debug msg="rendered layer for d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff of [32] size"
Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.778998985Z" level=debug msg="[devmapper] Unmount done"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.778998985Z" level=debug msg="[devmapper] Unmount done"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.779022595Z" level=debug msg="[devmapper] deactivateDevice(d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.779022595Z" level=debug msg="[devmapper] deactivateDevice(d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.779078093Z" level=debug msg="[devmapper] RemoveDeviceDeferred START(docker-253:0-4205-d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.779078093Z" level=debug msg="[devmapper] RemoveDeviceDeferred START(docker-253:0-4205-d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.796983128Z" level=debug msg="[devmapper] RemoveDeviceDeferred END(docker-253:0-4205-d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.797013465Z" level=debug msg="[devmapper] deactivateDevice END(d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.796983128Z" level=debug msg="[devmapper] RemoveDeviceDeferred END(docker-253:0-4205-d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.797013465Z" level=debug msg="[devmapper] deactivateDevice END(d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff)"
Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.797026445Z" level=debug msg="[devmapper] UnmountDevice(hash=d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff) END"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.797026445Z" level=debug msg="[devmapper] UnmountDevice(hash=d1ee9017809a0d7959b96982fecd01a7c33edaa38351eeb21ba8b469a218e1ff) END"
Aug 25 19:43:12 pchivcpbat291 docker[17863]: time="2015-08-25T19:43:12.999716785Z" level=debug msg="Not continuing with error: Received unexpected HTTP status: 500 Internal Server Error"
Aug 25 19:43:12 pchivcpbat291 docker: time="2015-08-25T19:43:12.999716785Z" level=debug msg="Not continuing with error: Received unexpected HTTP status: 500 Internal Server Error"

Please let me know what other info is needed. As I stated above, this works fine in 1.7.

Docker info from server running the push:

uname -a:

Linux pchivcpbat291.lnx.in.here.com 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

docker version:

Client:
Version:      1.8.1
API version:  1.20
Go version:   go1.4.2
Git commit:   d12ea79
Built:        Thu Aug 13 02:19:43 UTC 2015
OS/Arch:      linux/amd64

Server:
Version:      1.8.1
API version:  1.20
Go version:   go1.4.2
Git commit:   d12ea79
Built:        Thu Aug 13 02:19:43 UTC 2015
OS/Arch:      linux/amd64

docker info:

Containers: 2
Images: 97
Storage Driver: devicemapper
 Pool Name: docker-253:0-4205-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 3.526 GB
 Data Space Total: 107.4 GB
 Data Space Available: 81.03 GB
 Metadata Space Used: 5.267 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.142 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.10.0-229.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 4
Total Memory: 15.52 GiB
Name: pchivcpbat291.lnx.in.here.com
ID: 2LHS:WDGG:P2JN:SNYP:B3ZB:YW32:DUMO:2LNO:TFCV:CGYX:NJN4:63D6

Docker info from server running the registry:

uname -a:

Linux pchivcpapp02.lnx.in.here.com 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

docker version:

Client:
 Version:      1.8.1
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   d12ea79
 Built:        Thu Aug 13 02:19:43 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.1
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   d12ea79
 Built:        Thu Aug 13 02:19:43 UTC 2015
 OS/Arch:      linux/amd64

docker info:

Containers: 72
Images: 474
Storage Driver: devicemapper
 Pool Name: docker-253:0-5572-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 15.8 GB
 Data Space Total: 107.4 GB
 Data Space Available: 91.58 GB
 Metadata Space Used: 25 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.122 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.10.0-229.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 24
Total Memory: 47 GiB
Name: pchivcpapp02.lnx.in.here.com
ID: USGU:JHWJ:SXZH:B6O6:IUTL:NR62:UL5F:VOWW:RFQN:ME5J:IH3S:XEPA

Environment Details:
These are physical boxes. You will notice Deferred Removal was turned on. I was hoping it would fix the issue, but it didn't.

How Reproducible:
I haven't seen any other tickets on this, so maybe I am the only one using an NFS mount for the registry. That would be the key here, make sure the registry is pointing at an NFS mounted filesystem.

Activity

  1. cmays20 commented on Aug 25, 2015

    @cmays20
    Author

    I have added more info to the original post. Let me know if you need more.

  2. JohnOmernik commented on Aug 27, 2015

    @JohnOmernik

    I am getting the same issue. Recently cloned and built docker registry, docker 1.8.1 linux 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

    udo docker info
    Containers: 7
    Images: 104
    Storage Driver: aufs
    Root Dir: /var/lib/docker/aufs
    Backing Filesystem: extfs
    Dirs: 118
    Dirperm1 Supported: true
    Execution Driver: native-0.2
    Logging Driver: json-file
    Kernel Version: 3.19.0-25-generic
    Operating System: Ubuntu 14.04.3 LTS
    CPUs: 24
    Total Memory: 125.7 GiB
    Name: hadoopmapr4
    ID: F774:XB2C:IW4N:YOTR:LVT3:I5YQ:4CBB:N2XR:JAWQ:BGOC:VOS4:NJV3
    WARNING: No swap limit support

    I am trying to push images to a directory in nfs, but getting device or resource busy when in reality I can write just fine to it.

  3. jcw9930 commented on Sep 3, 2015

    @jcw9930

    same here, trying to push to registry:2.1.1 which is backed by NFS (via kubernetes). It worked fine with docker-1.7

    [root@yuck jan]# docker info
    Containers: 109
    Images: 349
    Storage Driver: devicemapper
     Pool Name: docker-253:1-1713007-pool
     Pool Blocksize: 65.54 kB
     Backing Filesystem: extfs
     Data file: /dev/loop0
     Metadata file: /dev/loop1
     Data Space Used: 10.1 GB
     Data Space Total: 107.4 GB
     Data Space Available: 20.08 GB
     Metadata Space Used: 23.7 MB
     Metadata Space Total: 2.147 GB
     Metadata Space Available: 2.124 GB
     Udev Sync Supported: true
     Deferred Removal Enabled: false
     Data loop file: /var/lib/docker/devicemapper/devicemapper/data
     Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
     Library Version: 1.02.93 (2015-01-30)
    Execution Driver: native-0.2
    Logging Driver: json-file
    Kernel Version: 4.1.3-201.fc22.x86_64
    Operating System: Fedora 22 (Twenty Two)
    CPUs: 4
    Total Memory: 15.38 GiB
    Name: xxx
    ID: xxx
    Username: xxx
    Registry: https://index.docker.io/v1/
    
    [root@yuck jan]# docker version
    Client:
     Version:      1.8.1.fc22
     API version:  1.20
     Package Version: docker-1.8.1-2.git3c1d7c8.fc22.x86_64
     Go version:   go1.4.2
     Git commit:   3c1d7c8/1.8.1
     Built:        
     OS/Arch:      linux/amd64
    
    Server:
     Version:      1.8.1.fc22
     API version:  1.20
     Package Version: 
     Go version:   go1.4.2
     Git commit:   3c1d7c8/1.8.1
     Built:        
     OS/Arch:      linux/amd64
    
    [root@yuck jan]# uname -a
    Linux yuck 4.1.3-201.fc22.x86_64 #1 SMP Wed Jul 29 19:50:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    
  4. JohnOmernik commented on Sep 3, 2015

    @JohnOmernik

    It looks like it's a very recent thing in the code for Docker Registry. (or in how Docker 1.8.1 pushes to the registry...) Is there anything the folks who are using this can do to help troubleshoot. I am somewhat new to the Docker Ecosystem, but would love to help however I can.

  5. mbulthuis commented on Sep 4, 2015

    @mbulthuis

    I have the same issue. Is there a work around for this issue?

  6. mbulthuis commented on Sep 4, 2015

    @mbulthuis

    it works when I don't mount volume to "//var/lib/registry"
    ("-v /c/Users/myUser/docker/data://var/lib/registry ")

    I still need a solution to persist data.

  7. cmays20 commented on Sep 4, 2015

    @cmays20
    Author

    Using the 1.7 client is all that I have found.

  8. goodwolf commented on Sep 5, 2015

    @goodwolf

    Has anyone been assigned to work on this yet? Registry + NFS usage is an enterprise level feature. If nobody is going to debug this at the moment, then I can spend time tracking down the issue in the code.

  9. tomwillfixit commented on Sep 8, 2015

    @tomwillfixit

    Hitting the same issue. Using registry:2 with nfs backend. Client versions 1.6.2 and 1.7.1 work as expected. 1.8.1, build d12ea79 reports the following on push

    docker push docker-registry-v2.mycompany.net:5000/tools/small_image:v2
    The push refers to a repository [docker-registry-v2.mycompany.net:5000/tools/small_image](len: 1)
    ca76e3530c7e: Pushing [==================================================>] 172 B/172 B
    Received unexpected HTTP status: 500 Internal Server Error

    Logs from the registry

    level=error msg="unknown error completing upload: &os.PathError{Op:"remove", Path:"/var/lib/registry/docker/registry/v2/repositories/tools/small_image/_uploads/0605a8da-12b5-4e89-b3a1-99ca79ad54fe", Err:0x27}"

    level=error msg="unable to delete layer upload resources "/docker/registry/v2/repositories/tools/small_image/_uploads/0605a8da-12b5-4e89-b3a1-99ca79ad54fe": remove /var/lib/registry/docker/registry/v2/repositories/tools/small_image/_uploads/0605a8da-12b5-4e89-b3a1-99ca79ad54fe/.nfs00000000001bd7fe0000000a: device or resource busy" http.request.host="docker-registry-v2.mycompany.net:5000" http.request.id=cc424243-1ba9-43a5-b37f-b249ac287bd2

    level=error msg="response completed with error" err.code=UNKNOWN err.detail="remove /var/lib/registry/docker/registry/v2/repositories/tools/small_image/_uploads/0605a8da-12b5-4e89-b3a1-99ca79ad54fe: directory not empty" err.message="unknown error" http.request.host="docker-registry-v2.mycompany.net:5000" http.request.id=cc424243-1ba9-43a5-b37f-b249ac287bd2 http.request.method=PUT

  10. JohnOmernik commented on Sep 8, 2015

    @JohnOmernik

    So I am not sure that we know if this is a distribution or a docker issue. Looking at the reports, it looks like previous versions of Docker work with latest distribution, it's just the latest version of Docker + registryV2. Makes it a harder issue to track down in that it could be a combination of factors that caused the issue (on both sides.

    In my email alerts, I see some mentions of sync and locking. I hope we are not using locking over NFS in these setups as NFS support of locking is notoriously suspect across multiple NFS servers. We shouldn't be utilizing something that has so much potential for inconsistency. Perhaps something a bit more stable like atomic file creation would suffice? (I am not sure the internals here, I was just doing some background reading on NFS and locking issues).

  11. mindscratch commented on Sep 28, 2015

    @mindscratch

    Same issue here, docker client 1.8.2 with registry 2.1.1 on CentOS and NFS directory.

  12. andrelucas commented on Oct 7, 2015

    @andrelucas

    Confirm exact same symptoms with Ubuntu Trusty Docker 1.7.1 server + Registry 2.1.1 - push broken with 1.8.x client, fine with 1.7.1 client. NFS-mounted registry, but only one registry process at a time mounts the share, as chosen by consul lock.

    I think I'm right to say that all of these reports are for .nfs[0-9a-f]+ files, 'silly unlinks': http://nfs.sourceforge.net/#faq_d2 .

  13. thaJeztah commented on Oct 7, 2015

    @thaJeztah
    Member

    @andrelucas hm, interesting, yes

    @dmp42 is this a known issue? ^^ #15833 (comment)

  14. dmp42 commented on Oct 7, 2015

    @dmp42
    Contributor

    All: some users reported successfully setting up nfs in the past - though there is currently no nfs-specific documentation, it seems to be somewhat tricky, and the core team here has no expertise or experience with it...

    Bottom-line:

    • I would really love to see someone successful here contribute a doc recipe for it
    • unfortunately, I doubt you will receive much help from the core-dev

    We still are available to help on irc over #docker-distribution if you need help debugging the registry itself while poking nfs, so, please reach out.

  15. 4 remaining items

  16. verdel commented on Oct 17, 2015

    @verdel

    In my homelab I use Docker Registry v2 in backed with Nginx. Folder for images persistent storage mount by NFS and I have exact same issue. But today I try to test Docker Registry v2 without Nginx.

    My test environment:
    1. NFS storage
    OS: CentOS 7
    Firewalld is Off

    cat /etc/exports
    /export 10.15.0.0/16(rw,fsid=0,insecure,async,no_subtree_check,no_root_squash)
    /export/docker 10.15.0.0/16(rw,nohide,insecure,async,no_subtree_check,no_root_squash)
    

    _2. Docker Registry v2_
    OS: CentOS 7
    FQDN: hub.solar.lan
    Docker version 1.8.3, build f4bf5c7
    NFS mount:

    10.15.4.15:/docker on /mnt type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.15.4.16,local_lock=none,addr=10.15.4.15)
    

    Registry image version:

    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
    registry            2                   2eafecf5086b        5 days ago          220.6 MB
    

    Registry start string:

    docker run -d -p 443:5000 --name registry -v `pwd`:/certs -v /mnt:/var/lib/registry -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/hub.crt -e REGISTRY_HTTP_TLS_KEY=/certs/hub.key registry:2
    

    _3. Docker Client_
    OS: CentOS 7
    Docker version 1.8.3, build f4bf5c7

    I try to push image hub.solar.lan/btsync build from Dockerbuild file on this machine to Registry on second machine and everything is OK. There was no error! Files of pushed image appeared on NFS storage server.

  17. jstabenow commented on Oct 17, 2015

    @jstabenow

    "docker push imagename" result with Docker 1.8.3 + Reg. 2.1.1
    (Docker 1.7.1 + Reg. 2.1.1 works without problems)

    level=warning msg="the ResponseWriter does not implement CloseNotifier" auth.user.name=user environment=production http.request.host=x.x.x.x http.request.id=3684e0b4-bc46-42c3-a356-589cf3b0713e http.request.method=PUT http.request.remoteaddr="x.x.x.x:xxxx" http.request.uri="/v2/jan/ubuntu/blobs/uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e?_state=cGunx-bsw4TaN6Mx6iq8IZePCMLzzZ8wjihktn8MeTx7Ik5hbWUiOiJqYW4vdWJ1bnR1IiwiVVVJRCI6ImMzMmY1NmJhLTZjYjctNGJmNi05NzVkLTFlMjRiMWU1OTk0ZSIsIk9mZnNldCI6MzIsIlN0YXJ0ZWRBdCI6IjIwMTUtMTAtMTdUMjA6NDU6NDZaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/4.1.10-boot2docker os/linux arch/amd64" instance.id=4895394a-c536-4827-b836-e7f723d3ac15 service=registry vars.name="jan/ubuntu" vars.uuid=c32f56ba-6cb7-4bf6-975d-1e24b1e5994e version=v2.1.1 
    level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/jan/ubuntu/_uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e\": remove /var/lib/registry/docker/registry/v2/repositories/jan/ubuntu/_uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e: directory not empty" auth.user.name=user environment=production http.request.host=x.x.x.x http.request.id=3684e0b4-bc46-42c3-a356-589cf3b0713e http.request.method=PUT http.request.remoteaddr="x.x.x.x:xxxx" http.request.uri="/v2/jan/ubuntu/blobs/uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e?_state=cGunx-bsw4TaN6Mx6iq8IZePCMLzzZ8wjihktn8MeTx7Ik5hbWUiOiJqYW4vdWJ1bnR1IiwiVVVJRCI6ImMzMmY1NmJhLTZjYjctNGJmNi05NzVkLTFlMjRiMWU1OTk0ZSIsIk9mZnNldCI6MzIsIlN0YXJ0ZWRBdCI6IjIwMTUtMTAtMTdUMjA6NDU6NDZaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/4.1.10-boot2docker os/linux arch/amd64" instance.id=4895394a-c536-4827-b836-e7f723d3ac15 service=registry vars.name="jan/ubuntu" vars.uuid=c32f56ba-6cb7-4bf6-975d-1e24b1e5994e version=v2.1.1 
    level=error msg="unknown error completing upload: &os.PathError{Op:\"remove\", Path:\"/var/lib/registry/docker/registry/v2/repositories/jan/ubuntu/_uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e\", Err:0x27}" auth.user.name=user environment=production http.request.host=x.x.x.x http.request.id=3684e0b4-bc46-42c3-a356-589cf3b0713e http.request.method=PUT http.request.remoteaddr="x.x.x.x:xxxx" http.request.uri="/v2/jan/ubuntu/blobs/uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e?_state=cGunx-bsw4TaN6Mx6iq8IZePCMLzzZ8wjihktn8MeTx7Ik5hbWUiOiJqYW4vdWJ1bnR1IiwiVVVJRCI6ImMzMmY1NmJhLTZjYjctNGJmNi05NzVkLTFlMjRiMWU1OTk0ZSIsIk9mZnNldCI6MzIsIlN0YXJ0ZWRBdCI6IjIwMTUtMTAtMTdUMjA6NDU6NDZaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/4.1.10-boot2docker os/linux arch/amd64" instance.id=4895394a-c536-4827-b836-e7f723d3ac15 service=registry vars.name="jan/ubuntu" vars.uuid=c32f56ba-6cb7-4bf6-975d-1e24b1e5994e version=v2.1.1 
    level=error msg="unable to delete layer upload resources \"/docker/registry/v2/repositories/jan/ubuntu/_uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e\": remove /var/lib/registry/docker/registry/v2/repositories/jan/ubuntu/_uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e/.nfs0000000002b81b2700000070: device or resource busy" auth.user.name=user environment=production http.request.host=x.x.x.x http.request.id=3684e0b4-bc46-42c3-a356-589cf3b0713e http.request.method=PUT http.request.remoteaddr="x.x.x.x:xxxx" http.request.uri="/v2/jan/ubuntu/blobs/uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e?_state=cGunx-bsw4TaN6Mx6iq8IZePCMLzzZ8wjihktn8MeTx7Ik5hbWUiOiJqYW4vdWJ1bnR1IiwiVVVJRCI6ImMzMmY1NmJhLTZjYjctNGJmNi05NzVkLTFlMjRiMWU1OTk0ZSIsIk9mZnNldCI6MzIsIlN0YXJ0ZWRBdCI6IjIwMTUtMTAtMTdUMjA6NDU6NDZaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/4.1.10-boot2docker os/linux arch/amd64" instance.id=4895394a-c536-4827-b836-e7f723d3ac15 service=registry vars.name="jan/ubuntu" vars.uuid=c32f56ba-6cb7-4bf6-975d-1e24b1e5994e version=v2.1.1 
    level=error msg="error canceling upload after error: remove /var/lib/registry/docker/registry/v2/repositories/jan/ubuntu/_uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e/.nfs0000000002b81b2700000070: device or resource busy" auth.user.name=user environment=production http.request.host=x.x.x.x http.request.id=3684e0b4-bc46-42c3-a356-589cf3b0713e http.request.method=PUT http.request.remoteaddr="x.x.x.x:xxxx" http.request.uri="/v2/jan/ubuntu/blobs/uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e?_state=cGunx-bsw4TaN6Mx6iq8IZePCMLzzZ8wjihktn8MeTx7Ik5hbWUiOiJqYW4vdWJ1bnR1IiwiVVVJRCI6ImMzMmY1NmJhLTZjYjctNGJmNi05NzVkLTFlMjRiMWU1OTk0ZSIsIk9mZnNldCI6MzIsIlN0YXJ0ZWRBdCI6IjIwMTUtMTAtMTdUMjA6NDU6NDZaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/4.1.10-boot2docker os/linux arch/amd64" instance.id=4895394a-c536-4827-b836-e7f723d3ac15 service=registry vars.name="jan/ubuntu" vars.uuid=c32f56ba-6cb7-4bf6-975d-1e24b1e5994e version=v2.1.1 
    level=error msg="response completed with error" auth.user.name=user environment=production err.code=UNKNOWN err.detail="remove /var/lib/registry/docker/registry/v2/repositories/jan/ubuntu/_uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e: directory not empty" err.message="unknown error" http.request.host=x.x.x.x http.request.id=3684e0b4-bc46-42c3-a356-589cf3b0713e http.request.method=PUT http.request.remoteaddr="x.x.x.x:xxxx" http.request.uri="/v2/jan/ubuntu/blobs/uploads/c32f56ba-6cb7-4bf6-975d-1e24b1e5994e?_state=cGunx-bsw4TaN6Mx6iq8IZePCMLzzZ8wjihktn8MeTx7Ik5hbWUiOiJqYW4vdWJ1bnR1IiwiVVVJRCI6ImMzMmY1NmJhLTZjYjctNGJmNi05NzVkLTFlMjRiMWU1OTk0ZSIsIk9mZnNldCI6MzIsIlN0YXJ0ZWRBdCI6IjIwMTUtMTAtMTdUMjA6NDU6NDZaIn0%3D&digest=sha256%3Aa3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/4.1.10-boot2docker os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=32.171187ms http.response.status=500 http.response.written=208 instance.id=4895394a-c536-4827-b836-e7f723d3ac15 service=registry vars.name="jan/ubuntu" vars.uuid=c32f56ba-6cb7-4bf6-975d-1e24b1e5994e version=v2.1.1 
    
  18. michaelsauter commented on Oct 19, 2015

    @michaelsauter

    @verdel Interesting. I'm using just the registry, no NGINX in front.

  19. verdel commented on Oct 19, 2015

    @verdel

    @michaelsauter I try with NGINX now and everything is ok too.
    Usually I use standalone server with Ubuntu 14.04 on board to export share with NFS. In this case I have the exact issue with registry and lock.
    For test I use virtual machines on vsphere esxi. Virtual machine specification I listed above. I will spend some more tests and write the result here. Maybe I change OS from Ubuntu 14.04 to Centos 7 on my standalone server.

  20. bchanan03 commented on Oct 20, 2015

    @bchanan03

    Same issue here :(
    Any fix?

    When I try to push to registry:v2.1.1 - issue still exists
    When I try to push to registry:v2 - same issue again
    Now when trying to push to registry:v0.9.1 - same issue am stuck :(

  21. tdterry commented on Oct 22, 2015

    @tdterry

    I have the same issue. I'm mapping an NFS mounted volume into the container. I do not have the problem when mapping a local drive.

    OS: Ubuntu 14
    Driver: aufs
    Command use to launch the registry:

    docker --tls -H docker_host:2376 run -d -v /data/registry-v2:/var/lib/registry --name registry-v2 -p 5001:5000 registry:2
    

    Edit: I had previously said I wasn't using NFS. It turns out the volume I was mapping into the container was mounted on NFS. I do not have the problem when mapping a local drive.

  22. rncry commented on Oct 23, 2015

    @rncry

    We have exactly the same problem.

  23. bings commented on Oct 23, 2015

    @bings

    Here too, with docker 1.7.1 on CentOS 7.1 it works, with docker 1.8.3 on CentOS7.1 not.

  24. psigen commented on Nov 2, 2015

    @psigen

    (I posted this in distribution/distribution#1116 (comment), but since it suggests a code fix perhaps here is a better place.)

    I just checked using lsof and determined that the registry itself is holding the stale file handle:

    registry  1161 1179             root    6r      REG               0,39        32      49743 /var/lib/registry/docker/registry/v2/repositories/test_image/_uploads/5ac646c9-dc2b-4378-87e0-4ec45c646192/.nfs000000000000c24f00000003

    This handle is kept around until I do another docker push, at which point it is promptly deleted, and a stale handle for the new image is now created:

    registry  1161 1179             root    6r      REG               0,39        32      49745 /var/lib/registry/docker/registry/v2/repositories/test_image2/_uploads/395cb041-4b23-4c60-8bc1-bca7e89ce952/.nfs000000000000c25100000004

    One cause of NFS stale file handles is when a file handle is still open when an OS call attempts to delete the file. Is it possible that the reference to the file handle used for the upload is still in scope in the registry when the subsequent step of deleting the _uploads/ directory occurs?

    On a normal filesystem, this probably doesn't cause any issues because the OS can simply hang onto the inode, but since NFS creates an undeletable busy resource in the same directory when the file is deleted, it fails the directory delete operation.

    If this is the case, adjusting the scope of the upload file handle might resolve the issue.

  25. thaJeztah commented on Nov 2, 2015

    @thaJeztah
    Member

    ping @dmp42 ^^

  26. dmp42 commented on Nov 2, 2015

    @dmp42
    Contributor

    cc @docker/distribution-maintainers for the record

    NFS is not officially supported - I know some people had it working, not sure how.
    Either way, I'm not sure why this bug is opened here (assuming this is about registry support for NFS).

  27. stevvooe commented on Nov 2, 2015

    @stevvooe
    Contributor

    Fixed this issue with distribution/distribution#1149. Registry was holding extra resources open that interacted poorly with nfs mounts. Closing this in favor of the distribution/distribution#1116 since this is clearly a registry bug.

  28. bings commented on Nov 2, 2015

    @bings

    @stevvooe Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distribution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions