Use > Software management > Manage software packages > Automatically import Red Hat errata

Automatically import Red Hat errata

Red Hat allows system administrators to manage their Red Hat servers on the network. Red Hat provides two hosted technologies for managing subscriptions: Red Hat Network and Red Hat Subscription Management. Red Hat Subscription Management is the replacement for Red Hat Network.

Red Hat Subscription Management is available for the following Red Hat Enterprise Linux versions: 5.7+, 6.1+ and 7+. Red Hat Enterprise Linux 7 is the first version that can only be managed through Red Hat Subscription Management and does not support Red Hat Network.

Red Hat publishes Errata which contains information describing security patches, bug fixes, and package updates for Red Hat Enterprise Linux and other Red Hat products. To install the packages in the Errata, the Errata must be downloaded from the Red Hat web site and imported into SA. Using SA you can automatically download the Errata released by Red Hat, convert them to policies, and store the policies in a folder in the Library in the SA Client.

The main content for Red Hat products is distributed through Red Hat Network channels and Red Hat Subscription Management contents (available through Red Hat Content Delivery Network). Using SA you can automatically download the packages in a Red Hat Network channel or Content Delivery content, convert them to policies, and store the policies in a folder in the Library in the SA Client.

The redhat_import CLI program provided by SA enable you to create policies, which correspond to Red Hat Network errata and channels and to Red Hat Subscription Management errata and contents.redhat_import allows for content import from Red Hat Network and additionally allows for importing content from Red Hat Subscription Management.

HPE recommends the usage of redhat_import is only provided for backward compatibility.

Using the redhat_import program, you can create the following types of policies:

  • Channel / Content based software policy: A Red Hat Network channel / Red Hat Subscription Management content contains a list of packages. For example, a channel / content may contain packages for a particular Red Hat operating system version and architecture. When you run the or redhat_import program, SA downloads the latest packages from the Red Hat Network channel / Red Hat Subscription Management content and then imports the packages to the Library in the SA Client and creates a channel / content based software policy. Thus, a channel based policy reflects a particular channel while a content based policy reflects a particular Red Hat Subscription Management content. In the SA Client, you can view the name, description, location, availability, and the operating system version of the channel / content based policy in the Library.
  • Errata based software policy: A Red Hat Erratum contains information on a particular problem and the associated packages to resolve the problem. An Errata based policy contains all the individual Erratum-based policies for a given channel / content. When you run the redhat_import program, SA downloads the latest packages from Red Hat errata and then imports the packages to the Library in the SA Client and creates an errata based software policy. There are three types of RED Hat Errata: Bug Fix Advisories, Product Enhancement Advisories, and Security Advisories. The redhat_import program allow you to create errata policies for Bug Fix Advisories, Product Enhancement Advisories, and Security Advisories in the SA Client. In the SA Client, you can view the name, description, location, availability, and the operating system version of the errata based policy in the Library.
  • Erratum-based software policy: Erratum-based policies contain packages associated with a particular erratum. When you run the redhat_import program, SA downloads the latest packages from the Red Hat erratum and then imports the packages to the Library in the SA Client and creates an Erratum-based software policy.

To create and maintain policies from the Red Hat Linux errata, erratum, and channels / contents, log into the core server running the Software Repository component (part of the Slice Component bundle) and run the redhat_import program located in the following directory:

/opt/opsware/rhn_import/bin

The software policies created by redhat_import will, by default, have an empty uninstall sequence. This setting prevents the inadvertent uninstall of the RPMs in the policy when it is detached.

Importing RPM packages from the Red Hat to SA requires a large amount of disk space. Over a period of time, the amount of disk space required increases as new versions of packages are released by Red Hat.

For example, importing only the latest packages for the x86_64 flavor of Red Hat Enterprise Linux 5 takes up to 20 GB of space (channel and errata), while importing all packages would use about 80-100 GB.

The documentation for the redhat_import program is available online. To view the complete documentation run the program with the following option:

/opt/opsware/rhn_import/bin/redhat_import–manual

When you run the redhat_import program, you can specify the options listed the documentation provided online or use the Configuration File provided by HPE.

The Configuration file provided by HPE with the redhat_import program is located in the following directory:

/etc/opt/opsware/rhn_import/redhat_import.conf

Reusing a RedHat import configuration file with encrypted passwords

You can reuse an redhat_import.conf file that contains encrypted passwords on another core, however you must clear all the encrypted passwords before copying the file and reuse the --hide_passwords option on the new core.

The sequence of the steps matters. It is important that you change the encrypted passwords into clear text and use the --hide_passwords option. If you attempt to reuse an redhat_import.conf file with encrypted passwords on another core without performing these steps, an error (500 Internal Server) will occur.

To reuse an redhat_import.conf file containing encrypted passwords on another core:

1. Change all encrypted passwords in the file into clear text.

2. Copy the redhat_import.conf file to the other core.

3. Reuse the --hide_passwords option when running the RedHat import on the new core.

Viewing errata based and channel/content-based policies in the SA Client

The redhat_import programs, allow you to create errata-based, erratum-based and channel / content based policies in the SA Client. After successfully running the program, you can view the properties of errata-based, erratum-based, and channel / content based policies in the SA Client. You can view properties such as the SA user who created the software policy, the date when it was created, the name, the description, the availability, the location of the policy in the Library, the operating systems applicable to the policy and the HPE ID of the software policy. HPE recommends that you do not edit the policies which have been created by the redhat_import program.

To view the properties of a software policy:

  1. From the navigation pane, select Library > By Folder.
  2. Select the Red Hat Network Folder (RHN) or Red Hat Subscription Management Folder (RHSM).
  3. From the content pane, select the errata-based or channel / content based policy and open it. The Policy window appears.

  4. From the Views pane, select Properties. You can view the properties for the policy in the content pane.
    • Name: Contains the errata reference for the errata based software policy.
    • Description: Includes all the errata documentation for the errata.
    • Location: Specifies the location of the policy in the folder hierarchy. To change the location click Select to specify the location for the policy in the folder hierarchy. The Select Location window appears. Select a folder in the Library to specify the location of the policy and then click Select.
    • Created: Corresponds to the time when the errata was downloaded by HPE to create the software policy.
    • Last Modified: Corresponds to the time when the errata based policy was modified.
    • Availability: Contains the HPE Server life cycle values for the errata based software policy. The default value for an errata based policy is set to Available.
    • Platform: Specifies all operating systems applicable to the errata. You can expand the list to see the selected platforms.
  5. To save the changes, select Save from the File menu.

Errata caching

When importing errata, SA Red Hat Import tool keeps track of the imported errata. Details of each imported erratum are stored in a cache file and subsequent runs will skip the cached errata completely. This improves performance as it avoids some calls to Red Hat and to SA Library. In the absence of the cached data these calls are being made even for errata that has not been modified and is up to date in the SA Library. Errata that has been modified by Red Hat is updated anyway so there is no danger of having outdated errata after import.

A cache file is created for each imported Red Hat Network channel / Red Hat Subscription Management content.

The cache files are kept in the following folder on the SA core server:

/var/opt/opsware/rhn_import

The file name uses the following pattern:

prev_import_ch_<label>.dat

where <label> is the Red Hat Network channel label or the Red Hat Subscription Management content label. Some example file names are presented below:

  • prev_import_ch_rhel-x86_64-server-6.dat
  • prev_import_ch_rhel-7-server-rpms{7Server-x86_64}.dat

As a result of the caching mechanism described above the following scenarios are possible:

  • An erratum is imported into SA Library and then it is removed / renamed / moved to another folder. When redhat_import is run next time the erratum will not be reimported into the SA Library. This is because the erratum details are present in the cache file so it is skipped during the import.
  • The errata roll-up policy is created and then it is removed / renamed / moved to another folder (e.g. by using the SA Client). When redhat_import is run next time the errata roll-up policy will be recreated but it will contain only the errata that has been published by Red Hat since the last import. If there is no new errata the errata roll-up policy will not be recreated. This is because the errata present in the cache file is skipped during the import.

If you would like to fully synchronize the errata in SA Library (including the errata roll-up policy), remove the cache file for the concerned channels / contents and run redhat_import. In this case an erratum policy is created for each erratum available from Red Hat, provided that such a policy is not already present in the SA Library and the errata roll-up policy is created if not present and updated to include all erratum policies. The cache file is also recreated so next runs will benefit from the performance improvements offered by the caching mechanism.