How do I migrate my self-subscribed Satellite 5 to RHSM?

Updated

Overview

As of July 31st 2017, the Red Hat Network (RHN) Classic Hosted Web UI has been retired, and systems registered to it should be migrated to Red Hat Subscription Management (RHSM). The instructions for migrating connected Satellite 5 systems [1] do not cover the scenario of a connected Satellite 5 instance that is self-subscribed. This document expands on that migration article to cover that use case.

Starting with an up-to-date Satellite 5 server, which has been configured such that it is registered to itself instead of to RHN, we will re-register the system to RHSM, re-activate it using its existing Satellite 5 Certificate, and detach it from the resulting RHSM repositories. This will result in the Satellite ready for the complete RHN shutdown, continuing to be updated only from content on the Satellite itself, and continuing to use satellite-sync to retrieve content from Red Hat.

Prerequisites

  1. Your Satellite 5 instance is set up according to the instructions found at This content is not included.[2]

  2. Your Satellite 5 instance has had This content is not included.RHEA-2017:0369 erratum applied, but no further action has been taken.

    NOTE: If you attempted to follow the instructions pointed to by This content is not included.RHEA-2017:0369, you likely received the following error message from the rhn-migrate-classic-to-rhsm command:

     [root]$ rhn-migrate-classic-to-rhsm 
     Legacy username: <red-hat-username>
     Legacy password:  <red-hat-password>
     Unable to authenticate to legacy server.  See /var/log/rhsm/rhsm.log for more details.
     [root]$
    

    At that point, nothing has been changed on your self-registered Satellite, and these instructions will work as expected. if you have already regenerated your satellite-certificate as directed by [1], you can skip the This content is not included.Regenerating the Satellite Certificate step below.

  3. You have modified the Subscription Management Application /Distributor on This content is not included.Red Hat Customer Portal for the Satellite to be migrated and regenerated its Satellite Certificate..

Regenerating the Satellite Certificate

Historically, to create a Satellite 5 Certificate to pass to rhn-satellite-activate, you had to ensure that the Subscription Management Application /Distributor in the Customer Portal used to manage your Satellite 5 was consuming a Satellite subscription. In preparation for handling the retirement of RHN Classic, while still supporting 5.7 and earlier versions of Satellite, that rule was relaxed, and a Subscription Management Application /Distributor for Satellite 5.7 or earlier version no longer needs to consume such a subscription.

Go to the This content is not included.Subscription Management Applications /Distributors page on Red Hat Customer Portal and find the one that describes the self-subscribed Satellite you are preparing to migrate. Remove a Satellite subscription from that Subscription Management Application /Distributor (even if that reduces the number to zero), and regenerate your Satellite 5.7 (or earlier) Certificate. This will provide us with the Certificate that will be needed as part of the migration process.

Migration Procedure

  1. Validate that your Satellite 5 installation has followed the documentation for self-subscribing:

     [root]$ ls -1 /etc/sysconfig/rhn/systemid* 
     /etc/sysconfig/rhn/systemid
     /etc/sysconfig/rhn/systemid.up2date
     
     [root]$ grep -e '^sslCACert=' -e '^noSSLServerURL=' -e '^serverURL=' -e '^systemIdPath=' /etc/sysconfig/rhn/up2date | sort
     noSSLServerURL=http://<satellite-hostname>/XMLRPC
     serverURL=https://<satellite-hostname>/XMLRPC
     sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
     systemIdPath=/etc/sysconfig/rhn/systemid.up2date
    
  2. Migrate your Satellite instance from RHN to RHSM.
    There are several ways to accomplish this; the following is just the simplest:

     [root]$ subscription-manager register --username <username> --password <password>
     [root]$ subscription-manager list --available --pool-only --matches="Red Hat Satellite"
     [root]$ subscription-manager attach --pool <pool-id-from-previous-command>
    

    NOTES:

    1. subscription-manager list --available may return more than one response - choose the pool that matches the specific subscription you wish to assign to the Satellite instance being migrated
    2. If no pool-ids are returned from subscription-manager list --available, you will need to free one. Make sure you have followed the directions in Regenerating the Satellite Certificate
  3. Reactivate your Satellite. This will assign your Satellite a new system-id, which will allow satellite-sync to continue working.

     [root]$ rhn-satellite-activate -vvv --rhn-cert=<path-to-regenerated-satellite-57-certificate>.xml
    
  4. Disable RHSM repositories (in order to insure your Satellite gets content only from its own managed channel)

     [root]$ subscription-manager repos --disable '*'
    
  5. Validation
    Your Satellite should now show only its managed-channels available to yum, and satellite-sync should still work.

     [root]$ yum repolist
     Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager
     This system is receiving updates from RHN Classic or RHN Satellite.
     repo id                                                                                                      repo name                                                                                                                              status
     managed-clone-rhel-x86_64-server-6                                          Managed Clone of Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)   3,471
     managed-clone-redhat-rhn-satellite-5.7-server-x86_64-6    Managed Clone of Red Hat Satellite (v5.7 for Server v6 AMD64 / Intel64)           671
     repolist: 4,142
    
     [root]$ satellite-sync -c rhel-x86_64-server-6
     11:09:31 Red Hat Satellite - live synchronization
     11:09:31    url: https://satellite.rhn.redhat.com
     11:09:31    debug/output level: 1
     11:09:32    db:  rhnuser/<password>@rhnschema
     ...
    

FAQ

  1. Q: Do I need to make changes to the client systems that my Satellite 5 server manages?
    A: NO. This will not affect your Satellite's managed systems in any way.
  2. Q: Will this change the way I synchronize content into my Satellite?
    A: NO. You will continue to use satellite-sync just as you do today.
  3. Q: Do I need an extra Satellite subscription to make this process work?
    A: NO. HOWEVER - see next question.
  4. Q: Do I need to regenerate my Satellite Certificate for this process?
    A: YES. You will need to remove the previously-required Satellite Subscription from the Subscription Management Application /Distributor that is used to manage the Satellite to be migrated, and regenerate the Satellite Certificate.

[1] Preparing Satellite 5 systems for Red Hat Network's End of Life
[2] This content is not included.Setting Up a Self-Subscribed Red Hat Satellite
[3] This content is not included.RHEA-2017:0369 - Update Satellite 5 to support activation of RHSM-registered system

Category
Article Type