Hide Forgot
Description of problem: Creatinga custom repo with entitlement certs generates KeyError: 'entitlement-path' Version-Release number of selected component (if applicable): RHEL-6.2-RHUI-2.0.2-20120203.1-Server-x86_64-DVD1.iso How reproducible: always Steps to Reproduce: 1. rhui-manager => r ==> c 2. Create a custom repo with entitlement certs 3. Actual results: KeyError: 'entitlement-path' Expected results: RHUI-manager should create the custom repo successfully Additional info: ---------- rhui (repo) => c Unique ID for the custom repository (alphanumerics, _, and - only): custom_001 Display name for the custom repository [custom_001]: pulp Path at which the repository will be served [custom_001]: /protected/custom/ Algorithm to use when calculating the checksum values for repository metadata: 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 An unexpected error has occurred during the last operation. More information can be found in /root/.rhui/rhui.log. ---------------------------------------- tail -f /root/.rhui/rhui.log Unexpected error caught at the shell level Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 87, in safe_listen self.listen(clear=first_run) File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 113, in listen Shell.listen(self) File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 191, in listen item.func(*args, **item.kwargs) File "/usr/lib/python2.6/site-packages/rhui/tools/screens/repo.py", line 398, in create_custom educated_guess = self._entitlement_guess(path) File "/usr/lib/python2.6/site-packages/rhui/tools/screens/repo.py", line 439, in _entitlement_guess entitlement_map = self.pulp.custom_repo_entitlements() File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 805, in custom_repo_entitlements repo_path = repo['notes'][ENTITLEMENT_PATH] KeyError: 'entitlement-path'
I think issue is with both with or without entitlement certs. If I create custom repo without entitlement certs then a different error is raised. ---- rhui (repo) => c Unique ID for the custom repository (alphanumerics, _, and - only): custom Display name for the custom repository [custom]: pulp Path at which the repository will be served [custom]: Algorithm to use when calculating the checksum values for repository metadata: 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 The following repository will be created: ID: custom Name: pulp Path: custom Proceed? (y/n) y ----- rhui.log: ======== Unexpected error caught at the shell level Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 87, in safe_listen self.listen(clear=first_run) File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 113, in listen Shell.listen(self) File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 191, in listen item.func(*args, **item.kwargs) File "/usr/lib/python2.6/site-packages/rhui/tools/screens/repo.py", line 419, in create_custom success = self.pulp.create_custom_repo(id, name, path, entitlement_path, protected, checksum_type) File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 373, in create_custom_repo notes=notes, checksum_type=checksum_type) TypeError: create() got an unexpected keyword argument 'notes'
committed fix to rh-rhui-tools: 0c7277d4310ee95e2b5ad26a7c7b614885f835f9
*** Bug 787790 has been marked as a duplicate of this bug. ***
The fix has been built into a new rh-rhui-tools. You can install it from: http://download.devel.redhat.com/brewroot/packages/rh-rhui-tools/2.0.53/1.el6/noarch/rh-rhui-tools-2.0.53-1.el6.noarch.rpm
After updating the rh-rhui-tools rpm from the location in comment3, I can create custom repo with and without entitlement certs. without entitlement cert: ======================= ------------------------------------------------------------------------------ rhui (repo) => c Unique ID for the custom repository (alphanumerics, _, and - only): custom_002 Display name for the custom repository [custom_002]: pulp_001 Path at which the repository will be served [custom_002]: Algorithm to use when calculating the checksum values for repository metadata: 1 - sha256 2 - sha1 Enter value (1-2) or 'b' to abort: 2 Should the repository require an entitlement certificate to access? (y/n) n The following repository will be created: ID: custom_002 Name: pulp_001 Path: custom_002 Proceed? (y/n) y Successfully created repository pulp_001 ------------------------------------------------------------------------------
With entitlement certs: ===================== ------------------------------------------------------------------------------ rhui (repo) => c Unique ID for the custom repository (alphanumerics, _, and - only): custom_001 Display name for the custom repository [custom_001]: pulp Path at which the repository will be served [custom_001]: /protected/ Algorithm to use when calculating the checksum values for repository metadata: 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 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 [/protected/]: The following repository will be created: ID: custom_001 Name: pulp Path: /protected/ Entitlement: /protected/ Proceed? (y/n) y Successfully created repository pulp ------------------------------------------------------------------------------ listing of repos: ====================== Custom Repositories pulp pulp_001 Red Hat Repositories Red Hat Update Infrastructure 2.0 (RPMs) (6Server-x86_64) ------------------------------------------------------------------------------ rhui (repo) =>
Released in RHUI 2.0.2