Description of problem: If '_', [space], '(', ')', '@', etc and non English characters are used in the container's name to search for in the registry, an unexpected error occurs and a traceback is in logs. The error is the same if the entered container's name is alphanumeric (with possible '.', '-' or '/') but doesn't exist in the registry. Version-Release number of selected component (if applicable): iso 20161206 How reproducible: always Steps to Reproduce: 1. 'ad' add a new Red Hat docker container 2. type 'test' or 'rhel10' when prompted for name of the container in the registry 3. also try names with non alphanumeric characters beside '.', '-' and '/' Actual results: >> rhui (repo) => ad Name of the container in the registry: rhel10 An unexpected error has occurred during the last operation. More information can be found in /root/.rhui/rhui.log. 2016-12-07 07:11:48,022 - <type 'exceptions.NameError'> 2016-12-07 07:11:48,023 - Unexpected error caught at the shell level Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 88, in safe_listen self.listen(clear=first_run) File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 127, in listen Shell.listen(self) File "/usr/lib/python2.7/site-packages/rhui/common/shell.py", line 186, in listen item.func(*args, **item.kwargs) File "/usr/lib/python2.7/site-packages/rhui/tools/screens/repo.py", line 205, in add_docker if docker_utils.is_valid_docker_upstream(upstream_name): File "/usr/lib/python2.7/site-packages/rhui/common/docker_utils.py", line 13, in is_valid_docker_upstream LOG.debug(_('Failed to connect to upstream registry %s' % url )) NameError: global name '_' is not defined >> rhui (repo) => ad Name of the container in the registry: rhel7(rpms) An unexpected error has occurred during the last operation. More information can be found in /root/.rhui/rhui.log. Expected results: "There is no such container in the registry."
This appears to have been fixed as a side effect for BZ1393801
iso 20161215 >> ad Name of the container in the registry: test Could not find test on registry https://registry.access.redhat.com, please make sure that the name is valid Name of the container in the registry: rhel10 Could not find rhel10 on registry https://registry.access.redhat.com, please make sure that the name is valid Name of the container in the registry: rhel*y Could not find rhel*y on registry https://registry.access.redhat.com, please make sure that the name is valid Name of the container in the registry: rhel@6 Could not find rhel@6 on registry https://registry.access.redhat.com, please make sure that the name is valid Name of the container in the registry: rhel7(rpms) Could not find rhel7(rpms) on registry https://registry.access.redhat.com, please make sure that the name is valid Name of the container in the registry:
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