Katello / katello-client-bootstrap

Bootstrap Script for migrating systems to Foreman & Katello
GNU General Public License v2.0
52 stars 63 forks source link

Script tries to retrieve subscription-manager from public repo #368

Open mlazzarotto opened 2 years ago

mlazzarotto commented 2 years ago

The script is trying to retrieve subscription-manager (and its requirements) from Internet instead of using our repo on Spacewalk. If I run yum install subscription-manager, yum is able to find the packages from Spacewalk. In our case http/https access to Internet is blocked by our firewall.

Foreman Bootstrap Script
This script is designed to register new systems or to migrate an existing system to a Foreman server with Katello
[NOTIFICATION], [2022-06-21 07:49:13], [This system is registered to RHN. Attempting to migrate via rhn-classic-migrate-to-rhsm]
[NOTIFICATION], [2022-06-21 07:49:13], [Checking subscription manager prerequisites]
Loaded plugins: fastestmirror, rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
 * base: mirrors.usinternet.com
 * extras: linux.cc.lehigh.edu
 * updates: la.mirrors.clouvider.net
[RUNNING], [2022-06-21 07:49:17], [/usr/bin/yum -y remove subscription-manager-gnome]
Loaded plugins: fastestmirror, rhnplugin, tmprepo
This system is receiving updates from RHN Classic or Red Hat Satellite.
No Match for argument: subscription-manager-gnome
No Packages marked for removal
[SUCCESS], [2022-06-21 07:49:17], [/usr/bin/yum -y remove subscription-manager-gnome], completed successfully.
[NOTIFICATION], [2022-06-21 07:49:17], [subscription-manager NOT installed. Installing.]
[RUNNING], [2022-06-21 07:49:17], [/usr/bin/yum -y install subscription-manager]
Loaded plugins: fastestmirror, rhnplugin, tmprepo
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
 * base: mirrors.usinternet.com
 * extras: linux.cc.lehigh.edu
 * updates: la.mirrors.clouvider.net
http://mirror.grid.uchicago.edu/pub/linux/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to mirror.grid.uchicago.edu:80; Connection refused"
Trying other mirror.
http://repos.eggycrew.com/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to repos.eggycrew.com:80; Connection refused"
Trying other mirror.
http://mirror.net.cen.ct.gov/centos/7.9.2009/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to mirror.net.cen.ct.gov:80; Connection refused"
Trying other mirror.

I believe tmprepo is causing the problem, but I don't know how to remove it

mlazzarotto commented 2 years ago

Sorry, I figured out that my problem is not related to the script.