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

DELETING_REPO_ERROR #181

Closed
Jean-Baptiste-Lasselle opened this issue Apr 12, 2019 · 2 comments
Closed

DELETING_REPO_ERROR #181

Jean-Baptiste-Lasselle opened this issue Apr 12, 2019 · 2 comments

Comments

@Jean-Baptiste-Lasselle
Copy link

Jean-Baptiste-Lasselle commented Apr 12, 2019

Hi,
Thank you so much for your work first, its so prettier a web UI, compared to what I found, n yet simple.

Given #145 "Deleting repositories enhancement", I assume the "DELETE" button I found on ech repo, with checkbox to select which tagsto delete, came up recently.

I today discovered your app, so started doing all I can do with it. And trying to delete a successfully pushed tagged image, here is what happens :

  • the version is not deleted on the registry side (I run another webclient that just reads same registry, to counter check)
  • As the docker logs -f that I get, when Iclick the delete button, here you go :
$ docker logs -f docker-registry-manager
time="2019-04-12T01:23:36Z" level=info msg="Using registries located in /app with file name registries"
time="2019-04-12T01:23:36Z" level=info msg="Added new registry: lol-demo-vinse"
time="2019-04-12T01:24:06Z" level=error msg="Failed to delete digest." Digest="sha256:804789e1a1d1383060bb980cfeb13c5bb36230dc73d9e7053513cf9606d71ce7" Error="Delete http://poste-devops-typique:5000/v2/conduite.io/website/manifests/sha256:804789e1a1d1383060bb980cfeb13c5bb36230dc73d9e7053513cf9606d71ce7: http: non-successful response (status=405 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"UNSUPPORTED\\\",\\\"message\\\":\\\"The operation is unsupported.\\\"}]}\\n\")" file=tags.go line=55 source=app
time="2019-04-12T01:24:07Z" level=error msg="Failed to delete digest." Digest="sha256:804789e1a1d1383060bb980cfeb13c5bb36230dc73d9e7053513cf9606d71ce7" Error="Delete http://poste-devops-typique:5000/v2/conduite.io/website/manifests/sha256:804789e1a1d1383060bb980cfeb13c5bb36230dc73d9e7053513cf9606d71ce7: http: non-successful response (status=405 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"UNSUPPORTED\\\",\\\"message\\\":\\\"The operation is unsupported.\\\"}]}\\n\")" file=tags.go line=55 source=app
time="2019-04-12T01:24:07Z" level=error msg="Failed to delete digest." Digest="sha256:804789e1a1d1383060bb980cfeb13c5bb36230dc73d9e7053513cf9606d71ce7" Error="Delete http://poste-devops-typique:5000/v2/conduite.io/website/manifests/sha256:804789e1a1d1383060bb980cfeb13c5bb36230dc73d9e7053513cf9606d71ce7: http: non-successful response (status=405 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"UNSUPPORTED\\\",\\\"message\\\":\\\"The operation is unsupported.\\\"}]}\\n\")" file=tags.go line=55 source=app

  • As of the docker registry am using : docker pull registry:2

It looks like the registry server registry:2 does receive the http request from the docker-registry-manager container, and answers the server answers that docker-registry-manager wants to use an un-existing operation.

Perhaps I should use a different registry-server?

Update info

In my browser, I get a 404 answer to the HTTP call trigger by clicking the DELETE button. The
http request sent is :

http://poste-devops-typique:8081/registries/lol-demo-vinse/repositories/conduite.io/website/tags/0.0.7/delete

poste-devops-typique is a correctly resolved net hostname in my lab context, plus I checked that http://poste-devops-typique:8081/registries/lol-demo-vinse/repositories/conduite.io/website/tags/0.0.7/
does drive me to a bigo flow management page, so no network issue here, and the issue is not between your backend, and the docker-registry, but between your client! and server. Again I assume delete feature is under dev.

last Info, maybe not least

I have to mention that I named my repositories, with slash character in the names, example conduite.io/website. I feel it might trigger an exception being then thrown.

I still llke the UI, plus de mult-registry festure. I did felt there are issues about log files archiving /downloading / ... Won't dig into logs issues they are minor to me compared to CRUD on entries. I Hope you keep on working on that one, keeping it simple, with clear uses cases.

Bon courage.

@Jean-Baptiste-Lasselle
Copy link
Author

Jean-Baptiste-Lasselle commented Apr 12, 2019

More Update

Hi, I have news, I add info, I am still investigating.
I have search registry:2 config doc, and I have added the option to enbale deletions of digests.
Now here is what I got on registry server side :

172.17.0.1 - - [12/Apr/2019:16:15:35 +0000] "GET /v2/pegasus-devops.io/gastby-website/tags/list HTTP/1.1" 200 69 "" "Go-http-client/1.1"
time="2019-04-12T16:15:35.66855491Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="poste-devops-typique:5000" http.request.id=a47d6139-87a6-4100-bde9-1048cdf5dbe7 http.request.method=GET http.request.remoteaddr="172.17.0.1:53496" http.request.uri="/v2/pegasus-devops.io/gastby-website/tags/list" http.request.useragent="Go-http-client/1.1" http.response.contenttype="application/json; charset=utf-8" http.response.duration="831.224µs" http.response.status=200 http.response.written=69 
time="2019-04-12T16:15:35.671018519Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="poste-devops-typique:5000" http.request.id=42d6be63-d977-4dac-90bf-5c3ed2574b34 http.request.method=GET http.request.remoteaddr="172.17.0.1:53496" http.request.uri="/v2/pegasus-devops.io/gastby-website/manifests/0.0.1" http.request.useragent="Go-http-client/1.1" http.response.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.response.duration=1.934719ms http.response.status=200 http.response.written=736 
172.17.0.1 - - [12/Apr/2019:16:15:35 +0000] "GET /v2/pegasus-devops.io/gastby-website/manifests/0.0.1 HTTP/1.1" 200 736 "" "Go-http-client/1.1"
172.17.0.1 - - [12/Apr/2019:16:15:35 +0000] "GET /v2/pegasus-devops.io/gastby-website/blobs/sha256:3f47014aadcb01ccc230869d3c384823782c0105b191464e7670d4f57a39251a HTTP/1.1" 200 2375 "" "Go-http-client/1.1"
time="2019-04-12T16:15:35.673326342Z" level=info msg="response completed" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v1+json" http.request.host="poste-devops-typique:5000" http.request.id=0c383c49-8d17-4ab2-a28f-d5a34ea06aad http.request.method=GET http.request.remoteaddr="172.17.0.1:53496" http.request.uri="/v2/pegasus-devops.io/gastby-website/blobs/sha256:3f47014aadcb01ccc230869d3c384823782c0105b191464e7670d4f57a39251a" http.request.useragent="Go-http-client/1.1" http.response.contenttype="application/octet-stream" http.response.duration=1.61941ms http.response.status=200 http.response.written=2375 
172.17.0.1 - - [12/Apr/2019:16:15:35 +0000] "GET /v2/pegasus-devops.io/gastby-website/manifests/0.0.2 HTTP/1.1" 200 736 "" "Go-http-client/1.1"
time="2019-04-12T16:15:35.680647036Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="poste-devops-typique:5000" http.request.id=40f86f20-cb01-43d3-a31d-8b764c8d87df http.request.method=GET http.request.remoteaddr="172.17.0.1:53496" http.request.uri="/v2/pegasus-devops.io/gastby-website/manifests/0.0.2" http.request.useragent="Go-http-client/1.1" http.response.contenttype="application/vnd.docker.distribution.manifest.v2+json" http.response.duration=1.108933ms http.response.status=200 http.response.written=736 
time="2019-04-12T16:15:35.683302781Z" level=info msg="response completed" go.version=go1.11.2 http.request.contenttype="application/vnd.docker.distribution.manifest.v1+json" http.request.host="poste-devops-typique:5000" http.request.id=b62f4c42-0c83-49ba-8288-9f62d58ef098 http.request.method=GET http.request.remoteaddr="172.17.0.1:53496" http.request.uri="/v2/pegasus-devops.io/gastby-website/blobs/sha256:d3bb9638194099499830694e5d762b3aace5fe8687708a41e89a54596b24dcb4" http.request.useragent="Go-http-client/1.1" http.response.contenttype="application/octet-stream" http.response.duration=1.624638ms http.response.status=200 http.response.written=2373 
172.17.0.1 - - [12/Apr/2019:16:15:35 +0000] "GET /v2/pegasus-devops.io/gastby-website/blobs/sha256:d3bb9638194099499830694e5d762b3aace5fe8687708a41e89a54596b24dcb4 HTTP/1.1" 200 2373 "" "Go-http-client/1.1"

Final Update and success : My regsitry server config

was the issue, and now deletion works like charm with registry server config as such :

$ docker exec -it registry-srv sh -c "cat /etc/docker/registry/config.yml"
version: 0.1
log:
  fields:
    service: registry
storage:
  cache:
    blobdescriptor: inmemory
  filesystem:
    rootdirectory: /var/lib/registry
  delete:
    enabled: true
http:
  addr: :5000
  headers:
    X-Content-Type-Options: [nosniff]
health:
  storagedriver:
    enabled: true
    interval: 10s
    threshold: 3

Conclusion

I leave my notes for future users, thank you so much for your work, i really like the UI, n simple usage.

@Jean-Baptiste-Lasselle
Copy link
Author

Jean-Baptiste-Lasselle commented May 28, 2019

Additional Update

Instead of using the config.yml file to set the delete config. option to true, I now use the inferred docker / docker-compose env variable REGISTRY_STORAGE_DELETE_ENABLED=true (So I basicallly just add that to the docker-compose version 3 file, in the environment section of the docker registry service)

https://docs.docker.com/registry/configuration/#override-specific-configuration-options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant