cannot create docker repository with repo-registry-id containing "--" or "__"
pulp-admin docker repo create --repo-id=docker-foo6 --repo-registry-id="foo--foo"
A validation error occurred.
The value specified for repo-registry-id: 'foo--foo' is invalid. Registry id
must contain only lower case letters, integers, hyphens, periods, and may
include a single slash.
This worked on pulp 2.8, but is no longer working. Ina blamed this commit for breaking it: https://github.com/pulp/pulp_docker/commit/c9cce34beef567d3a37048e04e8e7c20ff7d9ddc
#2 Updated by email@example.com about 4 years ago
I commented on the BZ but perhaps discussion here is better.
Due to previous versions of katello having names that will violate this regexp, perhaps the best solution is to make the validation optional. It could be on by default in pulp itself but overridden by katello. In this way katello could optionally and incrementally enforce validation in its frontend. (Going forward, some way to better customize the registry names is needed by katello.)
#4 Updated by firstname.lastname@example.org about 4 years ago
from irc discussion:
(04:59:43 PM) ipanova: asmacdo: we have 2 options 1) be close as possible to docker specs, but because previously he had a bug which allowed more things and was not matching docker specs some of the repos would break after the upgrade 2) we relax validation to how it was previously but we are not conform docker specs. (05:32:49 PM) mhrivnak: Is there discussion or reference somewhere about how allow "--" was a bug? (05:50:18 PM) ipanova: it was a bug because we had wrong regexpr not conforming docker specs of which we came aware just now
#7 Updated by email@example.com almost 4 years ago
I did some more research, unfortunately we will need to match the exact regexp specified in the docker specs, otherwise the client will just refuse to pull from such repos. This is a requirement for v2 protocol and it should be followed because this regexp is used in docker registry api same for docker client code.
#8 Updated by firstname.lastname@example.org almost 4 years ago
i looked into the docker code, turns out they changed the regexp without updating the docs.
I disabled the validation in pulp, and checked that the client with docker pull is able to fetch from repositories:
I hope you won't need to use triple underscore because that does not work.
docker pull localhost:1234/aaa___aaa
Error parsing reference: "localhost:1234/aaa___aaa" is not a valid repository/tag
1) update regexp in pulp to match the one i found in the docker CODE
2) as a bonus report a docs issue to docker/distribution so they would update the docs and not confuse poor people
Please register to edit this issue