DNF Automatic ignores the foreman-protector plugin in Red Hat Satellite 6

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.15 and earlier
  • Red Hat Satellite Capsule 6.15 and earlier
  • Red Hat Enterprise Linux 8

Issue

  • When the dnf-automatic package is installed and configured on a Red Hat Satellite\Capsule 6 server, It applies all available package updates during the scheduled execution despite the foreman-protector plugin being enabled at dnf\yum level, leading to an unwanted service outage of the application.

Resolution

  • This issue has been reported to the Red Hat Engineering team via JIRA SAT-27276 and will be fixed in a future release of the product.

  • NOTE Meanwhile, Automatic OS updates are neither recommended nor supported to be configured on a Red Hat Satellite or Capsule server.

    • If it's configured and OS packages got updates, then make sure to execute the satellite-installer command and wait for it to complete successfully.

    • Lastly, disable the dnf-automaticfeature.

      # for i in dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer dnf-automatic.timer ; do systemctl disable --now $i; done
      
      # dnf remove dnf-automatic
      

Root Cause

Diagnostic Steps

  • The following error traces were noticed in the /var/log/dnf.log file during the execution of dnf-automatic.

    2024-08-16T15:49:02+0530 INFO --- logging initialized ---
    2024-08-16T15:49:02+0530 DDEBUG timer: config: 1 ms
    2024-08-16T15:49:02+0530 DEBUG Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, foreman-protector, generate_completion_cache, groups-manager, kpatch, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, system-upgrade, uploadprofile
    2024-08-16T15:49:02+0530 INFO Updating Subscription Management repositories.
    2024-08-16T15:49:06+0530 DEBUG Started dnf-automatic.
    2024-08-16T15:49:06+0530 DEBUG Waiting for internet connection...
    2024-08-16T15:49:06+0530 DEBUG User-Agent: constructed: 'libdnf (Red Hat Enterprise Linux 8.10; generic; Linux.x86_64)'
    2024-08-16T15:49:07+0530 DEBUG repo: using cache for: rhel-8-for-x86_64-baseos-rpms
    2024-08-16T15:49:07+0530 DEBUG rhel-8-for-x86_64-baseos-rpms: using metadata from Wednesday 14 August 2024 02:28:13 AM IST.
    2024-08-16T15:49:07+0530 DEBUG repo: using cache for: rhel-8-for-x86_64-appstream-rpms
    2024-08-16T15:49:07+0530 DEBUG rhel-8-for-x86_64-appstream-rpms: using metadata from Friday 16 August 2024 02:03:08 AM IST.
    2024-08-16T15:49:07+0530 INFO Last metadata expiration check: 2:11:27 ago on Friday 16 August 2024 01:37:40 PM IST.
    2024-08-16T15:49:09+0530 DDEBUG timer: sack setup: 2661 ms
    2024-08-16T15:49:09+0530 CRITICAL Traceback (most recent call last):
     File "/usr/lib/python3.6/site-packages/dnf/plugin.py", line 107, in _caller
       getattr(plugin, method)()
     File "/usr/lib/python3.6/site-packages/dnf-plugins/foreman-protector.py", line 54, in sack
       if self.cli is not None and self.cli.command._basecmd not in PROTECT_COMMANDS:
    AttributeError: 'NoneType' object has no attribute '_basecmd'
    
    2024-08-16T15:49:09+0530 DDEBUG timer: depsolve: 258 ms
    2024-08-16T15:49:31+0530 DDEBUG Cleaning up.
    2024-08-16T15:49:31+0530 INFO The downloaded packages were saved in cache until the next successful transaction.
    2024-08-16T15:49:31+0530 INFO You can remove cached packages by executing 'dnf clean packages'.
    2024-08-16T15:49:31+0530 DDEBUG Plugins were unloaded.
    

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.

Comments