Description of problem: RHUI allows to create a custom repo, and if to list repos after, an unexpected error message is shown and a traceback is in logs. If one wants to do anth after, e.g. to manage the certs, admin user should logout and login again. Version-Release number of selected component (if applicable): appears on both RHEL6 and RHEL7 iso'es build on 20160517 abd 20160531 How reproducible: always Steps to Reproduce: 1. repo screen -> create custom repo 2. list repos Actual results: ------------------------------------------------------------------------------ rhui (home) => r ----------------------------------------------------------------------------- -= Red Hat Update Infrastructure Management Tool =- -= Repository Management =- l list repositories currently managed by the RHUI i display detailed information on a repository a add a new Red Hat content repository c create a new custom repository (RPM content only) d delete a repository from the RHUI u upload content to a custom repository (RPM content only) p list packages in a repository (RPM content only) Connected: host ------------------------------------------------------------------------------ rhui (repo) => l No repositories are currently managed by the RHUI ------------------------------------------------------------------------------ rhui (repo) => c Unique ID for the custom repository (alphanumerics, _, and - only): testrepo Display name for the custom repository [testrepo]: Path at which the repository will be served [testrepo]: Algorithm to use when calculating the checksum values for repository metadata: * Select "sha256" for RHEL6: * Select "sha1" for either RHEL5 or RHEL6: 1 - sha256 2 - sha1 Enter value (1-2) or 'b' to abort: 1 Should the repository require an entitlement certificate to access? (y/n) n Should the repository require clients to perform a GPG check and verify packages are signed by a GPG key? (y/n) n The following repository will be created: ID: testrepo Name: testrepo Path: testrepo GPG Check No Red Hat GPG Key: No Proceed? (y/n) y Successfully created repository testrepo ------------------------------------------------------------------------------ rhui (repo) => l An unexpected error has occurred during the last operation. More information can be found in /root/.rhui/rhui.log. >> less /root/.rhui/rhui.log 2016-06-08 15:27:20,591 - Successfully connected to [host] 2016-06-08 15:28:33,120 - <type 'exceptions.KeyError'> 2016-06-08 15:28:33,120 - Unexpected error caught at the shell level Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 88, in safe_listen self.listen(clear=first_run) File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 122, in listen Shell.listen(self) File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 186, in listen item.func(*args, **item.kwargs) File "/usr/lib/python2.6/site-packages/rhui/tools/screens/repo.py", line 62, in list custom_repos = self.pulp.custom_repo_list() File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 278, in custom_repo_list repo = self.repo(id) File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 178, in repo repo['scheduled_syncs'] = importer['scheduled_syncs'] KeyError: 'scheduled_syncs 'testrepo' was really created: >> pulp-admin -u admin -p admin rpm repo list +----------------------------------------------------------------------+ RPM Repositories +----------------------------------------------------------------------+ Id: testrepo Display Name: testrepo Description: testrepo Content Unit Counts: Extra info: If to 'logout', and login after then it's possible to display e.g. the certificates, but as soon as a 'list repos' request is sent an unexpected error occurs, and any other actions display the same error. rhui (repo) => logout login here ------------------------------------------------------------------------------ rhui (entitlements) => l Red Hat Entitlements No Red Hat entitlements found. ------------------------------------------------------------------------------ rhui (entitlements) => home rhui (home) => r rhui (repo) => l An unexpected error has occurred during the last operation. More information can be found in /root/.rhui/rhui.log. rhui(repo) => home rhui (home) => n rhui (entitlements) => c Custom Repository Entitlements An unexpected error has occurred during the last operation. More information can be found in /root/.rhui/rhui.log. Expected results: a list of repos is displayed
"scheduled_syncs" was removed from importers from 2.7 -> 2.8 If you need to get around that issue till it lands in an ISO, you should be able to modify that file and remove that line i.e.: remove line 178 repo['scheduled_syncs'] = importer['scheduled_syncs'] from /usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py
on RHEL6 iso 20160621 rhui (repo) => l No repositories are currently managed by the RHUI ------------------------------------------------------------------------------ rhui (repo) => c Unique ID for the custom repository (alphanumerics, _, and - only): repo1_protected Display name for the custom repository [repo1_protected]: Path at which the repository will be served [repo1_protected]: Algorithm to use when calculating the checksum values for repository metadata: * Select "sha256" for RHEL6: * Select "sha1" for either RHEL5 or RHEL6: 1 - sha256 2 - sha1 Enter value (1-2) or 'b' to abort: 1 Should the repository require an entitlement certificate to access? (y/n) y Based on the repository's relative path, the suggested entitlement path is: repo1_protected Path that should be used when granting an entitlement for this repository. This may use yum variable substitutions (e.g. $basearch) to group this together with other repositories that share the entitlement [repo1_protected]: Should the repository require clients to perform a GPG check and verify packages are signed by a GPG key? (y/n) n The following repository will be created: ID: repo1_protected Name: repo1_protected Path: repo1_protected Entitlement: repo1_protected GPG Check No Red Hat GPG Key: No Proceed? (y/n) y Successfully created repository repo1_protected ------------------------------------------------------------------------------ rhui (repo) => l Custom Repositories repo1_protected ------------------------------------------------------------------------------ works the same on RHEL7 iso 20160621 rhui (repo) => l Custom Repositories repo01_unprotected ------------------------------------------------------------------------------ rhui (repo) => c Unique ID for the custom repository (alphanumerics, _, and - only): repo02_protected Display name for the custom repository [repo02_protected]: Path at which the repository will be served [repo02_protected]: Algorithm to use when calculating the checksum values for repository metadata: * Select "sha256" for RHEL6: * Select "sha1" for either RHEL5 or RHEL6: 1 - sha256 2 - sha1 Enter value (1-2) or 'b' to abort: 1 Should the repository require an entitlement certificate to access? (y/n) y Based on the repository's relative path, the suggested entitlement path is: repo02_protected Path that should be used when granting an entitlement for this repository. This may use yum variable substitutions (e.g. $basearch) to group this together with other repositories that share the entitlement [repo02_protected]: Should the repository require clients to perform a GPG check and verify packages are signed by a GPG key? (y/n) n The following repository will be created: ID: repo02_protected Name: repo02_protected Path: repo02_protected Entitlement: repo02_protected GPG Check No Red Hat GPG Key: No Proceed? (y/n) y Successfully created repository repo02_protected ------------------------------------------------------------------------------ rhui (repo) => l Custom Repositories repo01_unprotected repo02_protected
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