Bug 1262216

Summary: yum broken since using rhn-client-tools 2.3
Product: [Community] Spacewalk Reporter: reseau.locreal
Component: ClientsAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.3   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-14 08:49:04 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:
Bug Depends On:    
Bug Blocks: 1484117    

Description reseau.locreal 2015-09-11 07:56:12 UTC
Description of problem:

On a server CentOS6 or CentsOS7 registred into a spacewalk 2.3 hosted on CentOS6,
try to execute a yum command, for instance :

# yum update
Not loading "fastestmirror" plugin, as it is disabled
Loaded plugins: langpacks, rhnplugin
Adding en_US.UTF-8 to language list
Config time: 0.058
Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 367, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 160, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 260, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1083, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 416, in _getConfig
    self.plugins.run('init')
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 121, in init_hook
    login_info = up2dateAuth.getLoginInfo(timeout=timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 227, in getLoginInfo
    login(timeout=timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 194, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 203, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 37, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.7/site-packages/rhn/rpclib.py", line 384, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 187, in request
    return self._process_response(fd, connection)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 215, in _process_response
    return self.parse_response(fd)
  File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 235, in parse_response
    p.feed(response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 158, column 2


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

Files indicated in Traceback are embeded in followings rpms :
rhn-client-tools-2.3.16-1.el7.noarch
yum-3.4.3-125.el7.centos.noarch
python-libs-2.7.5-18.el7_1.1.x86_64

This is a traceback on boxes running CentOS7, but we can reproduce same issue on servers CentOS6.

Additional info:

On a server running CentOS6, we downgraded  rhn-client-tools-2.3.16-1.el6.noarch to rhn-client-tools-2.2.7-1.el6.noarch, end then yum works as expected.

Comment 1 reseau.locreal 2015-09-11 15:03:00 UTC
Finaly yum is working but the client lost the link with spacewalk server. It lost subscribed channels.

We tried to register the client again, but i get the following error message :
Traceback (most recent call last):
  File "/usr/sbin/rhnreg_ks", line 218, in <module>
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 96, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhnreg_ks", line 90, in main
    rhnreg.getCaps()
  File "/usr/share/rhn/up2date_client/rhnreg.py", line 248, in getCaps
    s.capabilities.validate()
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 178, in __get_capabilities
    self.registration.welcome_message()
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 203, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 37, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 384, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 187, in request
    return self._process_response(fd, connection)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 215, in _process_response
    return self.parse_response(fd)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 235, in parse_response
    p.feed(response)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 601, in feed
    self._parser.Parse(data, 0)
<class 'xml.parsers.expat.ExpatError'>: mismatched tag: line 158, column 2


Other people have same issue as shown here :
https://www.redhat.com/archives/spacewalk-list/2015-May/msg00000.html

Comment 2 reseau.locreal 2015-09-11 15:19:15 UTC
On the spacewalk server (version 2.3) in /var/log/httpd/error_log i saw many errors about missing attribute dbh :
 [error] Spacewalk 26890 2015/09/11 17:18:41 +02:00: ("DATABASE CONNECTION TO 'rhnschema' LOST", "Exception information: Database instance has no attribute 'dbh'")

Comment 3 reseau.locreal 2015-09-14 08:49:04 UTC
the comment #2 indicate the root cause. It was an issue with postgresql.
So this was not a bug.

Comment 4 Eric Herget 2017-09-28 18:06:44 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.