Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-41298

Satellite shipped provisioning templates using dnf fail on RHEL10.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • Provisioning Templates
    • None
    • False
    • None
    • None
    • None
    • None

      Description of problem:
      Various Provisioning Templates shipped within Satellite use `dnf install ..` in %post . That is failing on RHEL10.1 and problematic in general dues to several aspects:

      1) MAINLY it is broken due to https://issues.redhat.com/browse/CCT-1911 : `dnf` attempts to upload package profile newly to `rhsmcertd`, but that is stopped (yet).
      2) by default, package installation should happen in `%package`, not in `%post`. Though I understand `%packages` phase does not have access to Satellite-specific repos to install e.g. `katello-host-tools`.
      3) during the kickstart, all commands are chrooted - cant this alone cause any issues to `dnf install`?
       
      We should consider if using `dnf` commands in %post in Provisioning Templates is safe enough.

      If so, let ensure the https://issues.redhat.com/browse/CCT-1911 does not further affect Satellite.

      How reproducible:
      100% (I guess) 

      Is this issue a regression from an earlier version:
      yes
       

      Steps to Reproduce:

      1. Try to provision a RHEL10.1 system with e.g. "Kickstart default" Provisioning Template (having `dnf -y update`).

      Actual behavior:
      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'
      

      likewise https://issues.redhat.com/browse/CCT-1911 describes.

      Expected behavior:
      No such failure.

      Business Impact / Additional info:
      Workaround here is to use `--noplugin` DNF option for any dnf command.

      Maybe worth adding the option to all templates?

              Unassigned Unassigned
              rhn-support-pmoravec Pavel Moravec
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: