taftsanders / satellite-leapp-check

A script to run on the Satellite or the upgrading client to validate clients have the required repositories for the LEAPP upgrade process
GNU General Public License v3.0
4 stars 3 forks source link

New issue, when executing the code #12

Closed waldirio closed 9 months ago

waldirio commented 9 months ago
root@wallsat613 ~]# python3 satellite_leapp_check.py 

This script is used in determining the availability of the correct repositories for a client for leapp upgrade
This script currently only supports RHEL 7 to 8 upgrade for x86_64 Intel architecture
Traceback (most recent call last):
  File "/root/satellite_leapp_check.py", line 627, in <module>
    main()
  File "/root/satellite_leapp_check.py", line 614, in main
    if is_satellite('satellite'):
       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/satellite_leapp_check.py", line 397, in is_satellite
    import rpm
ModuleNotFoundError: No module named 'rpm'
[root@wallsat613 ~]# 
taftsanders commented 9 months ago

/usr/libexec/platform-python has this module, but Satellite installs Python 3.11 which changes the path and doesn't include the RPM module. Set verification to try using the RPM module if the server is a RHEL 8 client without Python installed and a 2nd validation of having the file /usr/bin/satellite-maintain to verify if the server is a Satelite.