Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1728416

Summary: Can't register RHEL8 with boostrap.sh
Product: Red Hat Satellite 5 Reporter: matt jia <mjia>
Component: RegistrationAssignee: Michael Mráka <mmraka>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: mkalyat, rdrazny, swadeley, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-certs-tools-2.5.0-4-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-18 02:49:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description matt jia 2019-07-09 23:11:54 UTC
Description of problem:

The boostrap.sh script generated by following the steps in 

https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/html/getting_started_guide/chap-system_management#sect-Using_Red_Hat_Network_Bootstrap_to_Register_a_System

doesn't work in a RHEL8 client. The reason is RHEL8 doesn't have python2 installed by default.



Version-Release number of selected component (if applicable):

5.8

How reproducible:

Easy


Steps to Reproduce:

register a RHEL8 client to a Satellite 5.8 server by using boostrap.sh

Actual results:

It fails with 'bootstrap.sh: line 171: /usr/bin/python: No such file or directory'


Expected results:

The boostrap.sh should support python3.

Additional info:

A workaround is to mount the RHEL8 DVD and use local yum repo. However, this is so much inconvenience if you have many clients to register.

Comment 2 Stephen Wadeley 2019-07-10 06:44:04 UTC
Hello

Does Satellite 5 support RHEL8?

On a RHEL8 Beta host you can run bootstrap.py as follows:

~#] /usr/libexec/platform-python bootstrap.py

Bootstrap.py help and in-built docs were fixed in:

Bug 1693199 - Use platform-python for bootstrap.py on RHEL8 hosts

Comment 3 matt jia 2019-07-10 06:46:32 UTC
(In reply to Stephen Wadeley from comment #2)
> Hello
> 
> Does Satellite 5 support RHEL8?
> 
> On a RHEL8 Beta host you can run bootstrap.py as follows:
> 
> ~#] /usr/libexec/platform-python bootstrap.py
> 
> Bootstrap.py help and in-built docs were fixed in:
> 
> Bug 1693199 - Use platform-python for bootstrap.py on RHEL8 hosts

Satellite 5.8 does support RHEL8. Your suggestion works for Satellite 6, not 5.

Comment 4 Michael Mráka 2019-07-15 12:35:28 UTC
Fixed in upstream spacewalk git by
commit 9eaa08a3a881a756357ae5777ea6f5d3d90c79a6
    1728416 - python3 compatible file operations
commit 6c9ef2a8da3ff48a61002f6339215766b0ce454c
    1728416 - check which python is available

commit bc5cc1d449df67a3a6c1bb3f6633de88d284e5c4
    python3 compatibility fixes
commit 0d3357e606667937a81d5a0ab254f4c07ced28ad
    made code python3 compatible

Comment 5 Michael Mráka 2019-08-07 09:56:31 UTC
Backported to SATELLITE-5.8 as
commit 4db7476de5a5e24eb3242cb65f31d23f012ff250
    1728416 - python3 compatible file operations
commit 3b450f079e50d9105667cc9e31465b3d24733884
    1728416 - check which python is available
commit 8db0dcd86fccfc904e6fc8fcd535b44c3775dd96
    python3 compatibility fixes
commit 1771b55f92ad3bb9500dd3e1497e673468ab8461
    made code python3 compatible

Comment 7 Radovan Drazny 2019-08-13 13:02:22 UTC
[root@hpe-bl460cg5-01 ~]# rpm -q spacewalk-certs-tools
spacewalk-certs-tools-2.5.0-2.el6sat.noarch
[root@hpe-bl460cg5-01 ~]# rhn-bootstrap 
* bootstrap overrides (written):
  '/var/www/html/pub/bootstrap/client-config-overrides.txt'

Values written:
enableProxy              '0'
serverURL                'https://hpe-bl460cg5-01.hpe2.lab.eng.bos.redhat.com/XMLRPC'
proxyPassword            ''
proxyUser                ''
sslCACert                '/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT'
httpProxy                ''
noSSLServerURL           'http://hpe-bl460cg5-01.hpe2.lab.eng.bos.redhat.com/XMLRPC'
enableProxyAuth          '0'
useGPG                   1
* rotating /var/www/html/pub/bootstrap/bootstrap.sh --> /var/www/html/pub/bootstrap/bootstrap.sh.1
* bootstrap script (written):
    '/var/www/html/pub/bootstrap/bootstrap.sh'

[root@hpe-bl460cg5-01 ~]# yum update -y rpms/spacewalk-certs-tools-2.5.0-3.el6sat.noarch.rpm 
<...>
Complete!
[root@hpe-bl460cg5-01 ~]# rpm -q spacewalk-certs-tools
spacewalk-certs-tools-2.5.0-3.el6sat.noarch
[root@hpe-bl460cg5-01 ~]# rhn-bootstrap 
Unable to load module rhn_bootstrap
No module named i18n

Comment 8 Michael Mráka 2019-08-16 13:33:15 UTC
Issue #7 fixed in SATELLITE-5.8 by
commit 8fd97c792e720c8448442cf0d62187ea3bb8137d
    1728416 - recover when rhn.i18n is not defined

Comment 10 Radovan Drazny 2019-08-20 07:16:40 UTC
Verified with spacewalk-certs-tools-2.5.0-4, using a RHEL 8.0 client.

[root@ibm-x3650m4-03-vm12 ~]# ./bootstrap.sh 
Red Hat Satellite Server Client bootstrap script v4.0


UPDATING RHN_REGISTER/UP2DATE CONFIGURATION FILES
-------------------------------------------------
* downloading necessary files
  client_config_update.py...
  client-config-overrides.txt...
* running the update scripts
  . up2date config file
* /etc/sysconfig/rhn/up2date written

* attempting to install corporate public CA cert
Retrieving http://satellite5.example.com/pub/rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:rhn-org-trusted-ssl-cert-1.0-1   ################################# [100%]

REGISTRATION
------------
* registering
Created symlink /etc/systemd/system/multi-user.target.wants/rhnsd.service → /usr/lib/systemd/system/rhnsd.service.

*** this system should now be registered, please verify ***


OTHER ACTIONS
------------------------------------------------------
yum -y upgrade yum yum-rhn-plugin; rhn-profile-sync; yum upgrade (conditional)
but any post configuration action can be added here.  
------------------------------------------------------
* completely updating the box
Updating Subscription Management repositories.
Unable to read consumer identity
This system is receiving updates from Spacewalk server.
RHEL BaseOS (v. 8 for x86_64)                                                                                                                                                                               0.0  B/s |   0  B     00:01    
Failed to synchronize cache for repo 'rhel-x86_64-baseos-8', ignoring this repo.
Last metadata expiration check: 0:16:39 ago on Tue 20 Aug 2019 08:53:36 AM CEST.
Dependencies resolved.
Nothing to do.
Complete!
Updating package profile...
Updating hardware profile...
Updating Subscription Management repositories.
Unable to read consumer identity
This system is receiving updates from Spacewalk server.
RHEL BaseOS (v. 8 for x86_64)                                                                                                                                                                               0.0  B/s |   0  B     00:01    
Failed to synchronize cache for repo 'rhel-x86_64-baseos-8', ignoring this repo.
Last metadata expiration check: 0:16:51 ago on Tue 20 Aug 2019 08:53:36 AM CEST.
Dependencies resolved.
============================================================================================================================================================================================================================================
 Package                                    Arch                                         Version                                                                                 Repository                                            Size
============================================================================================================================================================================================================================================
Upgrading:
 lshw                                       x86_64                                       B.02.19-0.1.20180614git028f6b2.beaker.1.el8bkr.1                                        beaker-harness                                       360 k

Transaction Summary
============================================================================================================================================================================================================================================
Upgrade  1 Package

Total download size: 360 k
Downloading Packages:
lshw-B.02.19-0.1.20180614git028f6b2.beaker.1.el8bkr.1.x86_64.rpm                                                                                                                                            133 kB/s | 360 kB     00:02    
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                       133 kB/s | 360 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                    1/1 
  Upgrading        : lshw-B.02.19-0.1.20180614git028f6b2.beaker.1.el8bkr.1.x86_64                                                                                                                                                       1/2 
  Cleanup          : lshw-B.02.18-16.el8.x86_64                                                                                                                                                                                         2/2 
  Running scriptlet: lshw-B.02.18-16.el8.x86_64                                                                                                                                                                                         2/2 
  Verifying        : lshw-B.02.19-0.1.20180614git028f6b2.beaker.1.el8bkr.1.x86_64                                                                                                                                                       1/2 
  Verifying        : lshw-B.02.18-16.el8.x86_64                                                                                                                                                                                         2/2 
Installed products updated.

Upgraded:
  lshw-B.02.19-0.1.20180614git028f6b2.beaker.1.el8bkr.1.x86_64                                                                                                                                                                              

Complete!
-bootstrap complete-

Comment 12 errata-xmlrpc 2019-09-18 02:49:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2783

Comment 13 Michael Mráka 2019-10-29 09:03:04 UTC
*** Bug 1766138 has been marked as a duplicate of this bug. ***