Provisioning RHEL10.1 Host from Satellite fails on "dnf install" error
Environment
- Red Hat Satellite 6 (any version)
- provisioning RHEL10.1 (RHEL10.0 works fine)
Issue
- Provisioning a RHEL10.1 system from Satellite
- using either kickstart Provisioning Template (e.g. "Kickstart default")
- the provisioning fails on
dnf updateordnf installcommand - packages themselves seem to be installed/updated properly, but
dnfproduces a traceback afterwards
Resolution
For a final resolution, wait until This content is not included.this JIRA is fixed.
As a workaround, modify Provisioning Templates that use dnf commands by adding there --noplugin option.
For more KB articles/solutions related to Red Hat Satellite 6.x Provisioning Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Provisioning related Issues.
Root Cause
Uploading package profile after RPM transaction completes has been moved to rhsmcertd service. When this service is stopped (e.g. during kickstart when the system is not yet even booted), an attempt to contact the service fails with an Content from github.com is not included.uncaught exception.
Adding --noplugin option to the failing dnf commands will disable the DNF plugin responsible for uploading the package profile, hence skipping the problematic call flow.
Diagnostic Steps
Provisioning fails on:
..
Installed products updated.
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/dnf-plugins/subscription-manager.py", line 297, in _upload_profile
with open("/var/lock/subsys/rhsmcertd", "r") as lock_file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/lock/subsys/rhsmcertd'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/dnf/plugin.py", line 108, in _caller
getattr(plugin, method)()
File "/usr/lib/python3.12/site-packages/dnf-plugins/subscription-manager.py", line 270, in transaction
self._upload_profile()
File "/usr/lib/python3.12/site-packages/dnf-plugins/subscription-manager.py", line 301, in _upload_profile
self._upload_profile_blocking()
File "/usr/lib/python3.12/site-packages/dnf-plugins/subscription-manager.py", line 279, in _upload_profile_blocking
with LiveStatusMessage("Uploading DNF profile"):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/dnf-plugins/subscription-manager.py", line 283, in _upload_profile_blocking
profile_mgr.update_check(self.cp, identity.uuid)
^^^^^^^
AttributeError: 'SubscriptionManager' object has no attribute 'cp'
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.