Client registration with Red Hat Satellite 6.4 changes RHSM configuration incorrectly.

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.4 and above
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Issue

  • Whenever the katello noarch rpm is installed on client, it is creating a wrong entry in /etc/rhsm/rhsm.conf.

Resolution

  • This is a known issue and currently reported to Red Hat Satellite Engineering in Bugzilla 1651189 which is now resolved in Red Hat Satellite 6.5.

  • To mitigate the issue until the bug gets resolved, the following workaround can be followed:

Workaround :-

  • Add this line to satellite registration script, after the rpm install for katello:

    # sed -i 's/n#config for on-premise management/#config for on-premise management/' /etc/rhsm/rhsm.conf
    
  • For more information on this bug please reach out to Red Hat Technical Support.

Root Cause

  • Whenever the katello noarch rpm is installed with the rpm mentioned below :

    # rpm -Uvh http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
    
  • It makes the changes under the file /etc/rhsm/rhsm.conf on client which are mentioned below.

  • From this:

    # config for on-premise management
    
  • Changes to:

    n#config for on-premise management
    

Diagnostic Steps

[root@localhost tmp]# subscription-manager
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 58, in <module>
from subscription_manager.injectioninit import init_dep_injection
File "/usr/share/rhsm/subscription_manager/injectioninit.py", line 17, in <module>
from subscription_manager.cache import ProductStatusCache, StatusCache
File "/usr/share/rhsm/subscription_manager/cache.py", line 31, in <module>
import rhsm.connection as connection
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 67, in <module>
config = initConfig()
File "/usr/lib64/python2.6/site-packages/rhsm/config.py", line 222, in initConfig
CFG = RhsmConfigParser(config_file=DEFAULT_CONFIG_PATH)
File "/usr/lib64/python2.6/site-packages/rhsm/config.py", line 82, in __init__
self.read(self.config_file)
File "/usr/lib/python2.6/site-packages/iniparse/compat.py", line 103, in read
self.data._readfp(fp)
File "/usr/lib/python2.6/site-packages/iniparse/ini.py", line 629, in _readfp
raise exc
ConfigParser.ParsingError: File contains parsing errors: /etc/rhsm/rhsm.conf
[line 36]: n#config for on-premise management

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments