Issue #3118
closedcannot create docker repository with repo-registry-id containing "--" or "__"
Description
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
Updated by tomckay@redhat.com about 7 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.)
Updated by dalley about 7 years ago
- Priority changed from Normal to High
- Sprint/Milestone set to 47
- Triaged changed from No to Yes
Updated by ipanova@redhat.com about 7 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
Updated by ipanova@redhat.com almost 7 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.
Updated by ipanova@redhat.com almost 7 years ago
Update:
i looked into the docker code, turns out they changed the regexp without updating the docs.
https://github.com/docker/distribution/commit/6bd5b8c24e66ba67a54541d72f1ad8d5cc17e677#diff-1a3e973fb67c04d3672d188529c6afcdR14
I disabled the validation in pulp, and checked that the client with docker pull is able to fetch from repositories:
foo-foo
foo--foo
foo_foo
foo__foo
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
Next steps:
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
Updated by ipanova@redhat.com almost 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
Updated by ipanova@redhat.com almost 7 years ago
- Status changed from ASSIGNED to POST
Added by ipanova@redhat.com almost 7 years ago
Added by ipanova@redhat.com almost 7 years ago
Revision d3b6055e | View on GitHub
Update regexp so it would allow repeated dash and double underscore.
Added by ipanova@redhat.com almost 7 years ago
Revision d3b6055e | View on GitHub
Update regexp so it would allow repeated dash and double underscore.
Added by ipanova@redhat.com almost 7 years ago
Revision d3b6055e | View on GitHub
Update regexp so it would allow repeated dash and double underscore.
Updated by ipanova@redhat.com almost 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset d3b6055e68f6d00d5b272266bc16a00b00e200b3.
Added by ipanova@redhat.com almost 7 years ago
Revision 6c794a57 | View on GitHub
Update regexp so it would allow repeated dash and double underscore.
closes #3118 https://pulp.plan.io/issues/3118
(cherry picked from commit d3b6055e68f6d00d5b272266bc16a00b00e200b3)
Added by ipanova@redhat.com almost 7 years ago
Revision 6c794a57 | View on GitHub
Update regexp so it would allow repeated dash and double underscore.
closes #3118 https://pulp.plan.io/issues/3118
(cherry picked from commit d3b6055e68f6d00d5b272266bc16a00b00e200b3)
Updated by ipanova@redhat.com almost 7 years ago
Applied in changeset 6c794a5760e198e7697b38061643eefc29955476.
Updated by pcreech almost 7 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Update regexp so it would allow repeated dash and double underscore.
closes #3118 https://pulp.plan.io/issues/3118