How to create a custom cloned channel from a specific update level on Red Hat Satellite

Solution Verified - Updated -

Environment

  • Red Hat Satellite 5.3 and later
  • spacewalk-create-channel
  • spacewalk-clone-by-date

Issue

  • How to create a channel from a specific update level of a release?
  • How to download manifest files for each of the point releases? (to update the ./data/ directory)
  • What is the spacewalk-create-channel utility and how to create a clone of the Red Hat channels as per the RHEL update level, for example RHEL 5.2?
  • How to create a base channel linked to a minor release of RHEL (example RHEL 5.3) in order to subscribe systems to it to receive updates only up to that minor release and not the latest updates?
  • How to maintain separately different minor versions of Red Hat Enterprise Linux with RHN Satellite?
  • Can we create a RHEL channel for a specific (lower) version of RHEL?
  • How to create a static custom channel for a specific version of a RHEL release?

Resolution

  • Use the spacewalk-create-channel utility to create channels corresponding to RHEL update levels.

  • Requirements for the solution below: The spacewalk-create-channel script is part of the spacewalk-remote-utils package and hence this package needs to be installed on RHN Satellite. To install this package, you need to subscribe the Satellite server to the RHN Tools channel. If the system is subscribed, the package can be installed using 'yum install spacewalk-remote-utils'.

# rhn-channel -L -u <user> -p <passwd> | grep -i tools # -L is available on RHEL 6
...
rhn-tools-rhel-x86_64-server-6
...
# rhn-channel -u <user> -p <passwd> -a -c rhn-tools-rhel-x86_64-server-6
# yum install spacewalk-remote-utils
  • Example - create a clone of RHEL 6 GA:
# spacewalk-create-channel -l admin -v 6 -r Server -u GOLD -a x86_64 -d rhel6-gold
Password:
You have not specified a source channel, we will try to determine it from inputs
Trying with source channel: rhel-x86_64-server-6
Creating channel, rhel6-gold, with arch x86_64 3431 packages in source file to push.
Pushing 3393 packages, please wait.
Successfully pushed 3393 packages out of 3431
  • Example - create a clone of RHEL 6.1 using the package manifest (-D option):
# spacewalk-create-channel -l admin -D /usr/share/rhn/channel-data/6-u1-server-x86_64 -d rhel6u1
Password: 
You have not specified a source channel, we will try to determine it from inputs
Trying with source channel: rhel-x86_64-server-6
Creating channel, rhel6u1, with arch x86_64 3480 packages in source file to push.
Pushing 3480 packages, please wait.
Successfully pushed 3480 packages out of 3480
  • The above commands create parent (or base) channels. Systems can then be subscribed to those parent channels to prevent them from receiving any further updates.

  • It is also possible to add child channels to those base channels. Use -e (extras) and -P (parent) options. The -e option will tell the script to look for a manifest file with that name, and -P tells it to put the child channel under that parent channel. The source child channel must exist - import it with satellite-sync if it does not.

# ls /usr/share/rhn/channel-data/6-u1-server-x86_64-Supplementary # list manifest file
/usr/share/rhn/channel-data/6-u1-server-x86_64-Supplementary

# satellite-sync -l # look for that child channel
...
10:57:51 Retrieving / parsing channel data
10:59:09    p = previously imported/synced channel
10:59:09    . = channel not yet imported/synced
...
10:59:16       . rhel-x86_64-server-supplementary-6        408 

# satellite-sync -c rhel-x86_64-server-supplementary-6 # import the child channel

# spacewalk-create-channel -l admin -v 6 -u u1 -r Server -a x86_64 -e Supplementary -P rhel6u1 -d rhel6u1-sup
Password: 
You have not specified a source channel, we will try to determine it from inputs
Trying with source channel: rhel-x86_64-server-supplementary-6
Creating channel, rhel6u1-sup, with arch x86_64 with parent rhel6u1
29 packages in source file to push.
Pushing 21 packages, please wait.
Successfully pushed 21 packages out of 29
  • Another available command line tool (starting in Satellite 5.4.1) is spacewalk-clone-by-date. It operates by copying packages associated with errata, as of a given date. From the man page: "Script to clone software channels and errata up to specific dates ensuring any added packages have their dependencies satisfied. Any destination channels that do not exist will be created. Example :
# spacewalk-clone-by-date -u admin -d 2013-02-20 -l rhel-x86_64-server-6 clone-6-3-full

this will clone 6.3 by cloning all released errata of the RHEL6 x86_64 server channel until the day before the release date of 6.4. For more information with the usage of the script refer to it's manpage : man spacewalk-clone-by-date

Note:

The Red Hat Network Tools channel is not bound to a specific minor RHEL release, so we can not create a cloned channel for it using spacewalk-create-channel. Use normal process to clone the Red Hat Network Tools channel.

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