How to tie a system to a specific update of Red Hat Enterprise Linux?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Red Hat Subscription Manager (RHSM)
  • Red Hat Satellite 6.x

Issue

  • Red Hat Network Classic provided Extended Update Support (EUS) subscriptions to set the preferred minor version of the registered system, but this same feature isn't visible in Red Hat Subscription Manager
  • How do I tie a system to a specific update in Red Hat Subscription Manager?
  • How do I tie a system to a specific update or minor release with Red Hat Network (RHN) Classic?
  • How do I prevent yum from updating or upgrading the minor release or kernel?
  • How to prevent system upgrade to the latest release from yum update ?
  • How to limit updates or upgrades to only security packages?
  • Executing subscription-manager release --set=6Server command outputs:
No releases match '6Server'.  Consult 'release --list' for a full listing

Resolution

IMPORTANT
It is important to understand that updates to non-current or older minor releases will not include all Security and Bug errata. Please refer to theRHEL Life Cycle documentation and the Extended Update Support (EUS) Add-On for further details.

IMPORTANT
It should be noted, that updating a system without a release lock, and then applying a release lock later, will result in dependency errors, if the version that is release locked to is lower than the most recent minor release for the version of RHEL currently installed on your system. For this reason it is only advised to run yum installations and updates only after the release lock has been applied.

It is only recommended to restrict the minor release update for minor releases still covered under the EUS program with the EUS repository channels enabled by a valid EUS subscription.

If changing release versions, ensure that yum's cache is cleared out with the following command (NOTE: the typical yum clean all command will not properly clear the cache in this instance).

RHEL 7:
# rm -rf /var/cache/yum

RHEL 8:
# rm -rf /var/cache/dnf

To only allow security updates, follow the guide Is it possible to limit yum so that it lists or installs only security updates?

~~~
# cdn-sync -c rhel-x86_64-server-6.6.z
~~~

- To lock the minor version in Red Hat Subscription Manager (RHSM) / Satellite6.x

- Pre-configuration when using EUS repositories enabled by EUS Subscription

For clients managed by Satellite6.x, EUS repositories should be synced with Satellite6.x.

  • Confirm Pool IDs of RHEL Subscription and EUS Subscription, and attach it.

    # subscription-manager list --available
    Subscription Name: Extended Update Support
    ...
    
    # subscription-manager attach --pool= Pool ID of EUS Subscription
    Successfully attached a subscription for: Extended Update Support
    
    # subscription-manager attach --pool= Pool ID of RHEL Subscription
    
  • Disable standard repositories and enable EUS repositories.

    # subscription-manager repos --disable=rhel-8-for-x86_64-baseos-rpms --disable=rhel-8-for-x86_64-appstream-rpms
    # subscription-manager repos --enable=rhel-8-for-x86_64-baseos-eus-rpms --enable=rhel-8-for-x86_64-appstream-eus-rpms
    # subscription-manager repos --list-enabled
    
    Repo ID:   rhel-8-for-x86_64-baseos-eus-rpms
    Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support (RPMs)
    Repo URL:  https://cdn.redhat.com/content/eus/rhel8/$releasever/x86_64/baseos/os
    Enabled:   1
    
    Repo ID:   rhel-8-for-x86_64-appstream-eus-rpms
    Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream - Extended Update Support (RPMs)
    Repo URL:  https://cdn.redhat.com/content/eus/rhel8/$releasever/x86_64/appstream/os
    Enabled:   1
    
- Common Settings with/without EUS Entitlement
Temporary Setting

Use the --releasever=X.Y option with yum to override the major.minor release versions, where X is the major release and Y is the minor release. Since it is not persistent, this option would need to be repeated for later executions of yum.

# yum clean all
# yum --releasever=8.6 update
Permanent Setting
  • Use subscription-manager's "release" command to set the preferred minor version persistently, for example:

  • NOTE: For Satellite 6, if you would like to lock the RHEL minor version, you need to enable and sync the specific repository. For example, in order to lock the minor version to RHEL 7.8, enable and sync Red Hat Enterprise Linux 7 Server RPMs x86_64 7.8 repository from the Satellite webui.

    • To determine which releases are available:

      # subscription-manager release --list
      
    • To set a release:

      # subscription-manager release --set=8.6
      # yum clean all
      
      # subscription-manager repos --list-enabled
      Repo ID:   rhel-8-for-x86_64-appstream-eus-rpms
      Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream - Extended Update Support (RPMs)
      Repo URL:  https://cdn.redhat.com/content/eus/rhel8/8.6/x86_64/appstream/os
      Enabled:   1
      
      Repo ID:   rhel-8-for-x86_64-baseos-eus-rpms
      Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support (RPMs)
      Repo URL:  https://cdn.redhat.com/content/eus/rhel8/8.6/x86_64/baseos/os
      Enabled:   1
      
    • To determine which releases system is set to:

      # subscription-manager release --show
      
    • To unset a specific release:

      # subscription-manager release --unset
      # yum clean all
      # subscription-manager repos
      
      Repo ID:   rhel-8-for-x86_64-appstream-eus-rpms
      Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream - Extended Update Support (RPMs)
      Repo URL:  https://cdn.redhat.com/content/eus/rhel8/$releasever/x86_64/appstream/os
      Enabled:   1
      
      Repo ID:   rhel-8-for-x86_64-baseos-eus-rpms
      Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support (RPMs)
      Repo URL:  https://cdn.redhat.com/content/eus/rhel8/$releasever/x86_64/baseos/os
      Enabled:   1
      

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