Migrating existing clients to Red Hat Satellite 6

Latest response

Hello all,

I am trying to migrate my existing RedHat Servers from Classic to Satellite.
I was able to get the Satellite server up and running and subscriptions attached etc.

However I am following this Red Hat Article https://access.redhat.com/solutions/1233443 to do the migration, however it is failing.

When I run the command 'rhn-migrate-classic-to-rhsm' I get this error message as follows:
'Could not read legacy system id at /etc/sysconfig/rhn/systemid'

I am using Satellite 6.2. When I navigate to /etc/sysconfig/rhn there is no file called systemid. I searched the entire hard disk and no file by that name.

Could anyone shed some light on this as to what is going wrong please.
any help would be greatly appreciated.

Regards,

Patrick

Responses

My first question would be, are you certain they are in fact registered through RHN classic?

Please check out the following to help you Determine if system is using RHN Classic or RHSM for updates

It is totally possible the systemid file is damaged or corrupt. While you can use rhn-migrate-classic-to-rhsm to migrate clients from Classic to Satellite 6.2, we strongly prefer that you use bootstrap.py (documented in Red Hat Satellite 6.2 Feature Overview: Importing Existing Hosts via the Bootstrap Script.

This would allow you many more options during the migration, include the option to just 'disable all the RHN components, ignore the busted systemid file and register the system to Satellite 6'

Example:

./bootstrap.py -l admin \
    -s satellite.example.com \
    -o "Red Hat" \
    -L RDU \
    -g "RHEL7/Crash" \
    -a ak-Reg_To_Crash \
    --skip prereq-update --skip migration

Note: bootstrap has a great deal of options, so check out the doc, and comment here if you need an additional assist.

Hi Rich, First, thank you very much for your response. So, I followed your link and and watched the video as well. So I would have to run the bootstrap.py script from every host that I want to migrate from Red Hat Classic to Red Hat Subscription Manager - so if I have 20 machines I have to run it on each individual machine? That is the impression I got - correct? What is the function of the manifest exactly - does it not register what you have in your classic management setup? Sorry if this seems like a dumb question but I have zero experience with Satellite.

Also will this work for RHEL 5 machines (I still have some in my environment that I am still upgrading to 6/7). Since 5 is not supported I am thinking it would not be necessary to do this as RedHat are no longer pushing out fixes.

Thank you again for your help.

Patrick Broderick

You are correct. Bootstrap.py would need to be run on each system you own. It does support RHEL5 (when we wrote it, RHEL5 was in production phase 3, and Satellite 6 still supports it as a client). Now that RHEL5 is in the Extended Lifecycle Phase, you'll have to decide whether it makes sense to migrate them to Satellite 6. Even if you arent actively managing or patching the systems, there is some merit in moving them over. (Inventory primarily). If you choose to do it, they are supported on the platform. (No new errata is released for RHEL5 unless you have an ELS subscription)

Regarding the manifest, it is effectively a digitally signed document which contains

  • a listing of subscriptions which you have designated for usage on premise in your Satellite.
  • a listing of which repositories on the Content Delivery Network you are allowed to synchronize (which varies by the subscriptions you've purchased)
  • Entitlement Certificates (X.509 certificates) which actually grant access to the content.

The manifest has a lot more data in it, but that is the most important. As Satellite can be used completely disconnected (as in no connection to the Internet), we need a means to say 'this is what content & subscriptions this Satellite is allowed to have, and here is how you access it). The manifest provides that.

Hello Rich,

Thank you for the explanation above. So I followed the video and when I run the bootstrap.py script I am encountering a new problem which I was hoping you could assist me with.

The script errors out with the following error message:

[NOTIFICATION], [2017-05-26 14:35:18], [Installing the Katello agent] [RUNNING], [2017-05-26 14:35:18], [/usr/bin/yum -y install katello-agent] [ERROR], [2017-05-26 14:35:19], EXITING: [/usr/bin/yum -y install katello-agent] failed to execute properly. Loaded plugins: product-id, search-disabled-repos, subscription-manager No package katello-agent available. Error: Nothing to do

The agent is installed on the Satelitte server so I do not know why this error is occurring. The command i used is as follows: ./bootstrap.py -l rhsat -s rhs1v.xxxxxx.xxx.xxx -o "xxxxxxxxxx" -L "New York" -g Dev -a activation_key --force

I had to use a --force key to get it to run. Do you know why I would be getting this error? I believe my satellite is set up correctly and the dev box I am running from is newly created and I activated the subscription via classic method which is how all my other servers were registered.

Any assistance would be great.

Thank you.

Just to confirm this is the Katello Agent installed on my Satellite Server - it shows it is installed.

[root@rhs1v pub]# yum install katello-agent Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager tlsv1 alert unknown ca Package katello-agent-2.9.0-2.el7sat.noarch already installed and latest version Nothing to do

On my Dev Server I tried installing it:

[root@rhsdev1v ~]# yum install katello-agent Loaded plugins: product-id, search-disabled-repos, subscription-manager rhel-7-server-rpms | 2.1 kB 00:00:00 No package katello-agent available. Error: Nothing to do [root@rhsdev1v ~]#

It was not available.

The only repo I am pointing to from my dev server is a redhat.repo - content is below.

#

Certificate-Based Repositories Managed by (rhsm) subscription-manager

#

*** This file is auto-generated. Changes made here will be over-written. *** *** Use "subscription-manager repo-override --help" if you wish to make changes. ***

#

If this file is empty and this system is subscribed consider a "yum repolist" to refresh available repos

#

[rhel-7-server-rpms] metadata_expire = 1 sslclientcert = /etc/pki/entitlement/6677455669036637000.pem baseurl = https://rhs1v.xxxxx.xxx/pulp/repos/xxxx_xxx/Library/content/dist/rhel/server/7/$releasever/$basearch/os ui_repoid_vars = releasever basearch sslverify = 1 name = Red Hat Enterprise Linux 7 Server (RPMs) sslclientkey = /etc/pki/entitlement/6677455669036637000-key.pem gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release enabled = 1 sslcacert = /etc/rhsm/ca/katello-server-ca.pem gpgcheck = 1

[rhel-7-server-satellite-tools-6.2-rpms] metadata_expire = 1 sslclientcert = /etc/pki/entitlement/6677455669036637000.pem baseurl = https://rhs1v.xxx.xxx.xxx/pulp/repos/xxx_xxx/Library/content/dist/rhel/server/7/7Server/$basearch/sat-tools/6.2/os ui_repoid_vars = basearch sslverify = 1 name = Red Hat Satellite Tools 6.2 (for RHEL 7 Server) (RPMs) sslclientkey = /etc/pki/entitlement/6677455669036637000-key.pem gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release enabled = 0 sslcacert = /etc/rhsm/ca/katello-server-ca.pem gpgcheck = 1

The bootstrap script, by default wants to install the katello-agent package on the client as that is used by Satellite for a number of host management functions. It is expected that one of the repositories that the system uses provides it. Looking at your output I can see that the rhel-7-server-satellite-tools-6.2-rpms repo is not enabled. You can do one of the following:

  • Enable the repo on your activation key so that when you register systems, the repo is enabled. Do this via Content->Activation Keys-> $YOUR_AK -> Product Content, and set the Satellite Tools to Enabled: yes
  • Enable the repo when running bootstrap.py. Do this via the --enablerepos switch, such as --enablerepos=rhel-7-server-satellite-tools-6.2-rpms
  • Omit installing the katello-agent. Do this via the --skip switch, such as --skip katello-agent

After that re-run the bootstrap script.

Apologies for the delayed response. Well I ran the bootstrap script with --enablerepos=rhel-7-server-satellite-tools-6.2-rpms and it did register my Dev box which is good. However, I was not able to enable the repository on my key, though am not sure why. I am going to look into that further as am thinking it is just a matter og getting to know this product better. Thank you again for all your help...

Regards,

Patrick Broderick

Hello again Rich, I am encountering another problem on just the 2nd server I am trying to register to Satellite Server. I run the script the same as above with this command:

[root@ersDev02 ~]# ./bootstrap.py -l rhsat -s rhs1v.xxx.xxx.xxx -o "Xxxxx Xxxxxxx" -L "New York" -g Dev -a activation_key --enablerepos=rhel-7-server-satellite-tools-6.2-rpms --force

It starts going through the process and then it errors out with the following:

[ERROR], [2017-06-01 12:43:54], EXITING: [/usr/sbin/subscription-manager register --org 'xxx_xxx' --name 'ersdev02.xxxx.local' --activationkey 'activation_key' --serverurl=https://rhs1v.xxx.xxx.xxx:443/rhsm --baseurl=https://rhs1v.xxx.xxx.xxx/pulp/repos --force] failed to execute properly. The system with UUID 61b6115c-a8d9-4cde-9364-6324765b3073 has been unregistered The system has been registered with ID: 15b0cbfc-d43f-4ae7-91c9-28892eddb82b

Installed Product Current Status: Product Name: Red Hat Software Collections (for RHEL Server) Status: Not Subscribed

Product Name: Red Hat Developer Toolset (for RHEL Server) Status: Not Subscribed

Product Name: Red Hat Enterprise Linux Server Status: Not Subscribed

Unable to find available subscriptions for all your installed products.

I do have the server subscription done through the classic method. So am not sure why I am see this error? However when I go to Hosts / All Host in the Satellite Server I see the host so it appears it registered!!!! However I never had to do the puppet part.

So I was wondering if you knew what was going on? Also is there anywhere I can find these resolutions myself? I ahve a number of them I need to register and if I encounter problems every time it will be a huge task to get it completed.

As always, thank you very much.

Patrick

Sorry forgot to mention that the server is a RedHat 6.9.

Rich - Could it be due to fact that I do not have the right repository downloaded. If so how does one figure out what to download? Thank you.

Hi Rich, Is there any way to write some Ansible playbook to migrate the existing host to SAT 6 from SAT 5?

Hello Patrick,

Is the katello-agent rpm available as Satellite content?

Login to Satellite

Open Content menu

Open the package window

search katello-agent

Regards,

Jan Gerrit

Hello Jan,

Yes it is - I have a number of them as I have enabled a few repositories. See below.

katello-agent-2.5.0-5.el5.noarch
katello-agent-2.5.0-5.el6sat.noarch katello-agent-2.5.0-5.el7sat.noarch katello-agent-2.9.0-1.el5.noarch
katello-agent-2.9.0-1.el6sat.noarch
katello-agent-2.9.0-1.el7sat.noarch
katello-agent-2.9.0-2.el5.noarch
katello-agent-2.9.0-2.el6sat.noarch katello-agent-2.9.0-2.el7sat.noarch katello-agent-fact-plugin-2.9.0-1.el5.noarch katello-agent-fact-plugin-2.9.0-1.el6sat.noarch katello-agent-fact-plugin-2.9.0-1.el7sat.noarch katello-agent-fact-plugin-2.9.0-2.el5.noarch
katello-agent-fact-plugin-2.9.0-2.el6sat.noarch
katello-agent-fact-plugin-2.9.0-2.el7sat.noarch

Hello Patrick,

What does the client show when you run the command below?

yum repolist enabled

Regards,

Jan Gerrit Kootstra

Hello,

Here is the output of the command as follows:

[root@ersDev02 ~]# yum repolist enabled Loaded plugins: package_upload, product-id, search-disabled-repos, security, subscription-manager https://rhs1v.xxx.xxx.xxx/pulp/repos/xxx_xxx/Library/content/dist/rhel/server/6/7.3/x86_64/optional/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 NOT FOUND" Trying other mirror. To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

https://rhs1v.xxx.xxx.xxx/pulp/repos/xxx_xxx/Library/content/dist/rhel/server/6/7.3/x86_64/rhn-tools/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 NOT FOUND" Trying other mirror. https://rhs1v.xxx.xxx.xxx/pulp/repos/xxx_xxx/Library/content/dist/rhel/server/6/7.3/x86_64/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 NOT FOUND" Trying other mirror. rhel-6-server-satellite-tools-6.2-rpms | 2.1 kB 00:00 repo id repo name status epel Extra Packages for Enterprise Linux 6 - x86_64 12,309 remi-safe Safe Remi's RPM repository for Enterprise Linux 6 - x86_64 1,782 rhel-6-server-optional-rpms Red Hat Enterprise Linux 6 Server - Optional (RPMs) 11,247 rhel-6-server-rhn-tools-rpms RHN Tools for Red Hat Enterprise Linux 6 Server (RPMs) 196 rhel-6-server-rpms Red Hat Enterprise Linux 6 Server (RPMs) 19,554 rhel-6-server-satellite-tools-6.2-rpms Red Hat Satellite Tools 6.2 (for RHEL 6 Server) (RPMs) 108 repolist: 45,196 [root@ersDev02 ~]#

Hello Patrick,

I'm not sure, it will works, but will try.

Run below command for enable repo,

subscription-manager repos --enable=rhel-*-satellite-tools-*-rpms

then try manually to install katello,

yum -y install katello-agent

Patrick,

It looks like you have a mismatch between your server version and release version. Your Line:

.../rhel/server/6/7.3/x86_64/...

If you look closely your server version is '6', but your $releasever is set as '7.3'. I'm not sure what caused this, but it can't find the repository because that specific combination (RHEL 6, version 7.3) doesn't exist and therefore it can't find the patches.

Fixing this is relatively simple:

# subscription-manager release --set=(releasever)

Where releasever is most likely '6Server' (case-sensitive).

To view all the available options for your system, enter the following:

# subscription-manager release --list

Please note that your /etc/yum.repos.d/redhat.repo file should contain two variables in the url like so:

baseurl = https://rhs1v.xxx.xxx.xxx/pulp/repos/xxx_xxx/Library/content/dist/rhel/server/6/$releasever/$basearch/rhn-tools/os

There are some cases where it is hard-coded to a specific release version (6Server or 7Server), but I don't believe that's the case here.

Thank you for the responses. I did manage to get this resolved. It was the mismatch mentioned above,

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.