Description of problem: Default 'Name of the container in the registry' is always equal to 'ID for the container'. 'ID for the container' can be alphanumerics, _, and - only. But on https://registry.access.redhat.com Container Image can have '.' in its name and most Containers have '/'. Therefore, default 'Name of the container in the registry' is never* good one and pressing 'Enter' prompts a user for a different one. *Actually I didn't see Container named with alphanumerics, _, and - only, but maybe there are some. Version-Release number of selected component (if applicable): ISO 20161109 How reproducible: always Steps to Reproduce: 1. add a RH docker repo Actual results: 1) Use only alphanumerics, _, and - for container ID rhui (repo) => ad Unique ID for the container (alphanumerics, _, and - only): jboss-eap-7 Name of the container in the registry: [jboss-eap-7]: Could not find jboss-eap-7 on registry https://registry.access.redhat.com, please make sure that the name is valid Name of the container in the registry: [jboss-eap-7]: 2) Try to enter ID as it's on https://registry.access.redhat.com Unique ID for the container (alphanumerics, _, and - only): jboss-eap-7/eap70-openshift Only alphanumerics, underscore (_), and hyphen (-) are valid in a repository ID. Unique ID for the container (alphanumerics, _, and - only): Expected results: Default 'Name of the container in the registry' allows [ENTER] or there is no any Default Additional info: There are 2 ways to fix it: 1) Allow '.' and '/' in ID of RH docker repos and other possible symbols, so repo ID will match actual Containers' names on https://registry.access.redhat.com 2) Remove default value for 'Name of the container in the registry', prompt an user to enter Container name.
Wait, there *are* containers whose names in the registry only contain the characters that are only valid in the unique ID. Not many, but still... See here: https://access.redhat.com/search/#/container-images?q=&p=6&sort=relevant&rows=12&srch=any&documentKind=ImageRepository (scroll down to the first one, named simply "rhel"). And this is how one of these containers can be added conveniently: ==== rhui (repo) => ad Unique ID for the container (alphanumerics, _, and - only): rhel7 Name of the container in the registry: [rhel7]: Display name for the container: [rhel7]: Red Hat Enterprise Linux 7 The following container will be added: Container Id: rhel7 Display Name: Red Hat Enterprise Linux 7 Upstream Container Name: rhel7 Proceed? (y/n) y Successfully added container Red Hat Enterprise Linux 7 ==== Let's not remove this feature. Patrick?
We do need to update the validation scheme for a docker 'repository'. It should match the same validation scheme pulp itself utilizes for this situation. We will update the validation with what is done in the pulp-docker plugin
There is an issue with characters such as '/' in a pulp repo id. I made changes to prompt the user for the registry name first, and have the default id be registry name with '/' replaced with '_'
I'm not talking about the validation scheme. It's the summary of this bug report, "Default 'Name of the container in the registry' is always wrong" plus the statement that the default name is never good (and therefore it's meaningless to offer it in the first place) that turn out to be incorrect. Since there are containers with simple "alphanumeric-and-dot-only" names, it makes sense for the wizard to offer the entered unique ID as a potential/default name of a container at registry.redhat.com so that the user doesn't have to re-type the name of such a container.
(In reply to bizhang from comment #5) > There is an issue with characters such as '/' in a pulp repo id. I made > changes to prompt the user for the registry name first, and have the default > id be registry name with '/' replaced with '_' I like your solution! Thanks!
Hm.. what about 'dot'? Name of the container in the registry: rhel7.3 Unique ID for the container (alphanumerics, _, and - only): [rhel7.3] [ENTER] Only alphanumerics, underscore (_), and hyphen (-) are valid in a repository ID. Unique ID for the container (alphanumerics, _, and - only): [rhel7.3] Can it maybe be replaced with '_' too? Replacement of '/' with '_' works fine: rhui (repo) => ad Name of the container in the registry: rhcertification/redhat-certification Unique ID for the container (alphanumerics, _, and - only): [rhcertification_redhat-certification] [ENTER] Display name for the container: [rhcertification_redhat-certification]: RH Certification Docker The following container will be added: Container Id: rhcertification_redhat-certification Display Name: RH Certification Docker Upstream Container Name: rhcertification/redhat-certification Proceed? (y/n) y Successfully added container RH Certification Docker
Good point. I'll make the change to also replace '.' in the 11/22 build
ISO 20161122 >> rhui (repo) => ad Name of the container in the registry: rhel7.0 Unique ID for the container (alphanumerics, _, and - only) [rhel7_0]: Display name for the container [rhel7_0]: rhel7.o Docker The following container will be added: Container Id: rhel7_0 Display Name: rhel7.o Docker Upstream Container Name: rhel7.0 Proceed? (y/n) y Successfully added container rhel7.o Docker
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:0367