Bug 1277623

Summary: up2date error with latest python-debian version
Product: [Community] Spacewalk Reporter: JuanFra Rodríguez <jfrodriguez>
Component: ClientsAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 2.4CC: avi.miller, bernhard.lichtinger, bugzilla, carl, datakid, jfrodriguez, redstar3894, tburns, tevfik.ceydeliler, thegrandpackard, thomas.foster80
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-12 12:07:22 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:
Attachments:
Description Flags
Previous version of python-debian from EPEL7 none

Description JuanFra Rodríguez 2015-11-03 16:41:48 UTC
Description of problem:

Updating to latest version of python-debian package EL7 causes clients are unable to connect with spacewalk server due to xmlrpclib parser error.

Version-Release number of python-debian:

Previous working version: python-debian-0.1.21-10.el7.noarch
Latest version: python-debian-0.1.27-2.el7.noarch

Steps to Reproduce:
1. (spacewalk server) # yum update python-debian
2. (spacewalk client) # Try to register new system (rhnreg_ks) or sync existing one (yum repolist)


[root@client ~]# yum repolist
Loaded plugins: priorities, rhnplugin, security
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 300, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 115, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 229, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 911, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 363, in _getConfig
    self.plugins.run('init')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 141, in init_hook
    svrChannels = rhnChannel.getChannelDetails(timeout=timeout)
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 71, in getChannelDetails
    sourceChannels = getChannels(timeout=timeout)
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 98, in getChannels
    up2dateChannels = s.up2date.listChannels(up2dateAuth.getSystemId())
  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)
xml.parsers.expat.ExpatError: mismatched tag: line 164, column 2

Comment 1 Pat Blair 2015-11-03 21:28:13 UTC
I was able to reproduce this bug also on CentOS 7.1.1503 and Spacewalk 2.4

Comment 2 JuanFra Rodríguez 2015-11-03 21:35:01 UTC
As workaround, I fixed it by downgrading python-debian package and locking the working version using yum-versionlock plugin

Comment 3 Tyler Burns 2015-11-04 12:45:04 UTC
Confirmed on CentOS 7 as well. I was not able to downgrade python-debian from EPEL. I had to use an old version stored locally in my spacewalk EPEL repository. This will break all new installations of spacewalk as well as prevent people that don't have an older version of python-debian from downgrading.

Comment 4 tevfik.ceydeliler 2015-11-05 06:06:10 UTC
Is there any schedule to fix this bug?
If no? How can I overcome this issue?

Comment 5 Tyler Burns 2015-11-06 14:53:53 UTC
Created attachment 1090680 [details]
Previous version of python-debian from EPEL7

Previous version of python-debian from EPEL7. Verify GPG signature with the EPEL 7 public key before installing.

Comment 6 Tyler Burns 2015-11-06 14:54:36 UTC
(In reply to tevfik.ceydeliler from comment #4)
> Is there any schedule to fix this bug?
> If no? How can I overcome this issue?

Install the package I attached to this bug report.

Comment 7 JuanFra Rodríguez 2015-11-09 12:04:18 UTC
Another bug related: https://bugzilla.redhat.com/show_bug.cgi?id=1278677

python-debian 0.1.27 requires python-six >= 1.4

It seems it should be fixed in RHEL 7.2

Comment 8 Thomas Foster 2015-11-25 22:06:30 UTC
Hello,

I am still receiving this error message from my clients even though I downgraded the python-debian to the version listed:

rpm -qa python-debian
python-debian-0.1.21-10.el7.noarch


This error message happens when I try to register my system:

[Wed Nov 25 16:59:35 2015] up2date
Traceback (most recent call last):
  File "/usr/sbin/rhnreg_ks", line 216, 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 91, 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.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)
<class 'xml.parsers.expat.ExpatError'>: mismatched tag: line 164, column 2


Client package list:

rhn-check-2.4.11-1.el7.noarch
rhn-org-trusted-ssl-cert-1.0-1.noarch
rhn-client-tools-2.4.11-1.el7.noarch
rhnlib-2.5.77-1.el7.noarch
rhnsd-5.0.13-3.el7.x86_64
yum-rhn-plugin-2.4.6-1.el7.noarch
rhn-setup-2.4.11-1.el7.noarch



Any help would be appreciated.

Comment 9 Mohammed Arafa 2015-11-29 05:27:58 UTC
affects spacewalk-repo-sync too

yum downgrade <old versin of python-six rpm> solved it for me

Comment 10 Joshua Packard 2015-12-05 08:32:36 UTC
I also ran into this bug running CentOS 7.1.1503 and Spacewalk 2.4 and was able to successfully perform the rhnpush after downloading the rpm attached to the bug and install it using the following command: rpm -Uvh --oldpackard python-debian-0.1.21-10.el7.noarch.rpm Thanks for the temporary fix, hope to see this resolved soon!

Comment 11 Joshua Packard 2015-12-05 08:33:54 UTC
(In reply to Joshua Packard from comment #10)
> I also ran into this bug running CentOS 7.1.1503 and Spacewalk 2.4 and was
> able to successfully perform the rhnpush after downloading the rpm attached
> to the bug and install it using the following command: rpm -Uvh --oldpackard
> python-debian-0.1.21-10.el7.noarch.rpm Thanks for the temporary fix, hope to
> see this resolved soon!

Should be rpm -Uvh --oldpackage python-debian-0.1.21-10.el7.noarch.rpm

Comment 12 Lachlan 2016-05-20 06:28:05 UTC
I saw this issue with both rhnreg_ks and rhnpush.

I have rhnpush working on one Centos7.2 server with python-debian-0.1.27-3.el7.noarch and python-six-1.9.0-2.el7.noarch, but not on another, so I don't believe that downgrading the python-debian package is the right solution to this problem.

I tried the patch suggested here:

https://www.redhat.com/archives/spacewalk-list/2015-November/msg00108.html

and that gave me a lot of output. At first I noticed it was using the wrong proxy information, but there was no indication where that proxy information was being drawn from. I deleted all the pyc/pyo files and tried again, passing the --proxy flag, but got the same error, with the correct proxy.

The output was 

asdIncoming headers:
	content-length : 5966
	set-cookie : JSESSIONID=69C01EA51CB966ABC58B3188A956B119; Path=/rhn/; Secure; HttpOnly; HttpOnly
	server : Apache
	x-ua-compatible : IE=edge,chrome=1
	date : Fri, 20 May 2016 06:17:12 GMT
	content-type : text/html;charset=UTF-8
('body:', '\'<!DOCTYPE HTML>\\n<html>\\n  <head>\\n    <!-- enclosing head tags in layout_c.jsp -->\\n    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>\\n    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->\\n    <!--[if lt IE 9]>\\n      <script type=\\\'text/javascript\\\' src="/javascript/html5.js"></script>\\n      <script type=\\\'text/javascript\\\' src="/javascript/respond.js"></script>\\n    <![endif]-->\\n    \\n    <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>\\n    <title>\\n      Spacewalk\\n      \\n      \\n         - Sign In\\n      \\n      \\n    </title>\\n    <link rel="shortcut icon" href="/img/favicon.ico" />\\n\\n    <meta name="viewport" content="width=device-width, initial-scale=1.0" />\\n\\n    \\n    \\n      <link rel="stylesheet" href="/css/spacewalk.css" />\\n    \\n    <link rel="stylesheet" href="/css/jquery.timepicker.css" />\\n    <link rel="stylesheet" href="/css/bootstrap-datepicker.css" />\\n\\n    <link rel="stylesheet" href="/javascript/select2/select2.css" />\\n    <link rel="stylesheet" href="\'')
('body:', '\'/javascript/select2/select2-bootstrap.css" />\\n\\n    <link rel="stylesheet" href="/fonts/font-awesome/css/font-awesome.css" />\\n    <link rel="stylesheet" href="/fonts/font-spacewalk/css/spacewalk-font.css" />\\n\\n    <script src="/javascript/jquery.js"></script>\\n    <script src="/javascript/bootstrap.js"></script>\\n    <script src="/javascript/select2/select2.js"></script>\\n    <script src="/javascript/spacewalk-essentials.js"></script>\\n    <script src="/javascript/spacewalk-checkall.js"></script>\\n\\n    <script src="/rhn/dwr/engine.js"></script>\\n    <script src="/rhn/dwr/util.js"></script>\\n    <script src="/rhn/dwr/interface/DWRItemSelector.js"></script>\\n    <script src="/javascript/jquery.timepicker.js"></script>\\n    <script src="/javascript/bootstrap-datepicker.js"></script>\\n\\n    <meta name="decorator" content="layout_c" />\\n  <script src="/javascript/spacewalk-login.js"></script>\\n  </head>\\n  <body onload="">\\n    <div class="spacewalk-top-wrap">\\n      <nav class="navbar navbar-default navbar-pf" role="navigation">\\n \'')
('body:', '\'       \\n\\n\\n\\n<!-- header.jsp -->\\n\\n\\n\\n<div class="navbar-header">\\n  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">\\n    <span class="sr-only">Toggle navigation</span>\\n    <span class="icon-bar"></span>\\n    <span class="icon-bar"></span>\\n    <span class="icon-bar"></span>\\n  </button>\\n  <a class="navbar-brand" href="http://www.spacewalkproject.org/" title="Visit http://www.spacewalkproject.org/ for more information">\\n    <img src="/img/logo_vendor.png" alt="Spacewalk project" id="rhLogo" />\\n  </a>\\n  <a class="navbar-brand" href="/" title="Spacewalk homepage">\\n    <img src="/img/logo_product.png" alt="Spacewalk" id="rhnLogo" accesskey="2"/>\\n  </a>\\n  \\n</div>\\n\\n<div class="navbar-collapse collapse">\\n  \\n\\n  \\n  \\n    <ul class="nav navbar-nav navbar-primary"><li class="active"><a href="/rhn/Login.do">Sign In</a></li>\\n<li><a href="/rhn/help/about.do">About</a></li>\\n</ul>\\n  \\n</div>\\n<!-- end header.jsp -->\\n\\n      </nav>\\n      <div class="spacewalk-main-column-layout">\\n       \'')
('body:', '\' <aside id="spacewalk-aside" class="navbar-collapse collapse">\\n          \\n\\n<nav id="sidenav">\\n  \\n  \\n  \\n  \\n</nav>\\n\\n          \\n\\n\\n\\n\\n\\n          \\n\\n\\n<!-- TODO make this more generic -->\\n\\n\\n\\n        </aside>\\n        <section id="spacewalk-content">\\n          <!-- Alerts and messages -->\\n          \\n          \\n          <div class="text-center">\\n    \\n    \\n      \\n      \\n        <h1>Welcome to Spacewalk</h1>\\n        <p><strong>Spacewalk</strong> is an open source (GPLv2) Linux systems management solution. Below are some links that should prove useful if you have any questions regarding your Spacewalk server. </p>\\n      \\n    \\n\\n    <form name="loginForm" id="loginForm" method="post" action="/rhn/LoginSubmit.do;jsessionid=69C01EA51CB966ABC58B3188A956B119" class="form-horizontal col-md-6 col-md-offset-3 text-left">\\n      <input type="hidden" name="csrf_token" value="7530790251516499651">\\n      \\n\\n    \\n    \\n    \\n    \\n    \\n    \\n    \\n\\n\\n<div class="form-group">\\n  <label for="username-field" class="col-xs-5 control-label">Spacewal\'')
('body:', '\'k Login: </label>\\n  <div class="col-xs-7">\\n    <input type="text" id="username-field" class="form-control" tabindex="1" name="username" maxlength="63" placeholder="Login" />\\n  </div>\\n</div>\\n\\n<div class="form-group">\\n  <label for="password-field" class="col-xs-5 control-label">Password: </label>\\n  <div class="col-xs-7">\\n    <input type="password" id="password-field" class="form-control" tabindex="2" name="password" maxlength="32" placeholder="Password" />\\n  </div>\\n</div>\\n\\n<div class="text-right">\\n  <input type="hidden" name="login_cb" value="login">\\n   <input type="hidden" name="url_bounce" value="/rhn/errors/500.jsp">\\n   <input type="hidden" name="request_method" value="GET">\\n  <input type="submit" tabindex="3" value="Sign In" id="login" class="btn btn-primary">\\n</div>\\n\\n    </form>\\n    <div class="col-md-6 col-md-offset-3 text-left">\\n    \\n    \\n      \\n      \\n          <p>For details on Spacewalk, please visit our web-site at <a href="http://www.spacewalkproject.org/" target="_blank"> http://www.spacewalkprojec\'')

Comment 13 Michael Mráka 2019-07-12 12:07:22 UTC
This issue can't be reproduced in current Spacewalk 2.9 version.
If you are still able to see it on your setup you are encouraged
to update the reproducer and reopen it.