-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
NAME_UNKNOWN when listing tags of partially pushed image #777
Comments
ping @pdevine |
@so0k It looks like there may be a bug here. Could you provide us a full output of tree? I'd like to see how "valid" There really isn't a strong guarantee that the repository exists if listed. From the specification:
Albeit, even this wording isn't strongly guaranteed. Proper client code should be handle the |
The catalog just looks to see if there are _layers directory in the directory walk and makes the assumption that if it exists, it's a valid repository. @stevvooe, is there a way of guaranteeing that each of the layers have been pushed and that everything is consistent? (Would we want that?) |
@pdevine The paths are documented here. A valid repository would have either "_layers" or "_manifests". The correct return for the tags API might be to have no tags, rather than |
running in the same bug, but my images are fully pushed - so maybe either the curl is buggy or the registry is bogus curl -v http://localhost:5000/v2/smt/tags/list
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> GET /v2/smt/tags/list HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:5000
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Docker-Distribution-Api-Version: registry/2.0
< Date: Fri, 31 Jul 2015 09:59:09 GMT
< Content-Length: 111
< Content-Type: text/plain; charset=utf-8
<
{"errors":[{"code":"NAME_UNKNOWN","message":"repository name not known to registry","detail":{"name":"smt"}}]}
* Connection #0 to host localhost left intact /data/registry/docker/registry/v2/repositories # tree -d -L 6
.
└── smt
├── ingest_preview
│ ├── _layers
│ │ └── sha256
│ │ ├── 6e471a4b88178d29a20e9a2caaa1aac06ff9c62b97a0c882a5d97f99fc138cc4
│ │ ├── a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
│ │ ├── c78d17052e177eee6518903c9ee885c5980fbaad5d42777b1521b6417c00398b
│ │ └── da24b8f756263014a24b9d1676b6153dd573a4cd56a5039bf744dc698d01bba3
│ ├── _manifests
│ │ ├── revisions
│ │ │ └── sha256
│ │ │ └── ccb90a206b4ef40fee0fa8f334001f0a6923fb0df3a712f94af9e2b5a9adb7b0
│ │ └── tags
│ │ └── 01b0a80
│ │ ├── current
│ │ └── index
│ └── _uploads
└── videoengine_preview
├── _layers
│ └── sha256
│ ├── 22b5bc0143d369d3361379a947edddacf12e6a446df5e4354b29971265e83c50
│ ├── a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
│ └── e31ae55786c2adb12ce73d0460f778db38af1d7506ab848f83366d2b138263c5
├── _manifests
│ ├── revisions
│ │ └── sha256
│ │ └── 402a423e72414f2bf4bdbe182f12d8cefda8b0cbe26c3023377040a640b6d529
│ └── tags
│ └── v0.1
│ ├── current
│ └── index
└── _uploads
update: registry started with registry:
image: registry:2
restart: always
ports:
- 127.0.0.1:5000:5000
environment:
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data/registry
volumes:
- /data/registry:/data/registry
|
@Deshke This is not the same issue, nor is it a bug. The curl command You need to either request |
@stevvooe ah ok, then i missed the documentation on that part |
Sorry for not providing you the exact folder structure of my registry storage as I had fixed the issue by pushing the problem image again. I will try to reproduce by doing another push and aborting mid-way. |
I got the same error "NAME_UNKNOWN" when listing tags of one repository which had not been pushed completely, but catalog API can list it. |
There is no guarantee that a partially uploaded repository is valid due to the current storage system. This particular case is being tracked in #936 and I'm going to close this issue in favour of that. |
/v2/_catalog
end point returned the repository but upon listing the tags I received:I fixed it by pushing the repository and making sure the push completed. Not sure what expected behavior is?
The text was updated successfully, but these errors were encountered: