...
Description of problem: "subscription-manager" commands fails with the RuntimeError error when local repository is configured with the incorrect path. Version-Release number of selected component (if applicable): subscription-manager-rhsm-certificates-1.23.8-35.el8.x86_64 python3-subscription-manager-rhsm-1.23.8-35.el8.x86_64 subscription-manager-plugin-container-1.23.8-35.el8.x86_64 subscription-manager-1.23.8-35.el8.x86_64 subscription-manager-cockpit-1.23.8-35.el8.noarch dnf-plugin-subscription-manager-1.23.8-35.el8.x86_64 subscription-manager-initial-setup-addon-1.23.8-35.el8.x86_64 How reproducible: Steps to Reproduce: 1. [root@rhel8 softline]# subscription-manager register Registering to: subscription.rhsm.redhat.com:443/subscription Username: rhn-support-shivagup Password: The system has been registered with ID: d89779d1-c286-41ee-96f0-70f969ab8e27 The registered system name is: rhel8.softline.com Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 566, in load ret = self._repo.load() File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 503, in load return _repo.Repo_load(self) RuntimeError: Failed to synchronize cache for repo 'base_install-AppStream' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 173, in update_check self._sync_with_server(uep, consumer_uuid) File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 477, in _sync_with_server combined_profile = self.current_profile File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 430, in current_profile module_profile = get_profile('modulemd').collect() File "/usr/lib64/python3.6/site-packages/rhsm/profile.py", line 347, in get_profile profile = PROFILE_MAP[profile_type]() File "/usr/lib64/python3.6/site-packages/rhsm/profile.py", line 54, in _init_ self.content = self.__generate() File "/usr/lib64/python3.6/site-packages/rhsm/profile.py", line 76, in __generate base.fill_sack() File "/usr/lib/python3.6/site-packages/dnf/base.py", line 400, in fill_sack self._add_repo_to_sack(r) File "/usr/lib/python3.6/site-packages/dnf/base.py", line 135, in _add_repo_to_sack repo.load() File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 568, in load raise dnf.exceptions.RepoError(str(e)) dnf.exceptions.RepoError: Failed to synchronize cache for repo 'base_install-AppStream' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/dev/fd/8", line 11, in <module> load_entry_point('subscription-manager==1.23.8', 'console_scripts', 'subscription-manager')() File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 85, in main return managercli.ManagerCLI().main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 2918, in main ret = CLI.main(self) File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 506, in main return_code = self._do_command() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1368, in _do_command profile_mgr.update_check(self.cp, consumer['uuid'], True) File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 457, in update_check return CacheManager.update_check(self, uep, consumer_uuid, force) File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 183, in update_check raise Exception(_("Error updating system data on the server, see /var/log/rhsm/rhsm.log " Exception: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details. 2. Local repository is configured with the incorrect base url "baseurl=file:///rheliso/AppStrea":- [root@rhel8 softline]# cat /etc/yum.repos.d/local.repo [base_install-AppStream] name=Local dump of Operating system CD used for install type=rpm-md baseurl=file:///rheliso/AppStrea gpgcheck=0 enabled=1 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [base_install-BaseOS] name=Local dump of Operating system CD used for install type=rpm-md baseurl=file:///rheliso/BaseOS gpgcheck=0 enabled=1 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [root@rhel8 softline]# 3. [root@rhel8 softline]# yum repolist Updating Subscription Management repositories. Local dump of Operating system CD used for install 0.0 B/s | 0 B 00:00 Error: Failed to synchronize cache for repo 'base_install-AppStream' [root@rhel8 softline]# [root@rhel8 softline]# [root@rhel8 softline]# subscription-manager list --available --all Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 566, in load ret = self._repo.load() File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 503, in load return _repo.Repo_load(self) RuntimeError: Failed to synchronize cache for repo 'base_install-AppStream' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 173, in update_check self._sync_with_server(uep, consumer_uuid) File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 477, in _sync_with_server combined_profile = self.current_profile File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 430, in current_profile module_profile = get_profile('modulemd').collect() File "/usr/lib64/python3.6/site-packages/rhsm/profile.py", line 347, in get_profile profile = PROFILE_MAP[profile_type]() File "/usr/lib64/python3.6/site-packages/rhsm/profile.py", line 54, in _init_ self.content = self.__generate() File "/usr/lib64/python3.6/site-packages/rhsm/profile.py", line 76, in __generate base.fill_sack() File "/usr/lib/python3.6/site-packages/dnf/base.py", line 400, in fill_sack self._add_repo_to_sack(r) File "/usr/lib/python3.6/site-packages/dnf/base.py", line 135, in _add_repo_to_sack repo.load() File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 568, in load raise dnf.exceptions.RepoError(str(e)) dnf.exceptions.RepoError: Failed to synchronize cache for repo 'base_install-AppStream' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/dev/fd/8", line 11, in <module> load_entry_point('subscription-manager==1.23.8', 'console_scripts', 'subscription-manager')() File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 85, in main return managercli.ManagerCLI().main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 2918, in main ret = CLI.main(self) File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 506, in main return_code = self._do_command() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 2573, in _do_command after_date=after_date, File "/usr/lib64/python3.6/site-packages/rhsmlib/services/entitlement.py", line 264, in get_available_pools after_date=after_date, File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 324, in get_available_entitlements overlapping, uninstalled, text, filter_string, future=future, after_date=after_date) File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 535, in get_filtered_pools_list filter_string=filter_string, future=future, after_date=after_date): File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 282, in list_pools profile_mgr.update_check(uep, consumer_uuid) File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 457, in update_check return CacheManager.update_check(self, uep, consumer_uuid, force) File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 183, in update_check raise Exception(_("Error updating system data on the server, see /var/log/rhsm/rhsm.log " Exception: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details. Actual results: Expected results: Additional info: After removing the local repository or setting the correct base url it works fine.
Won't Do