Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gensystemid: rpclib problem on RHEL 6 #74

Open
sylock opened this issue Jul 16, 2014 · 2 comments
Open

gensystemid: rpclib problem on RHEL 6 #74

sylock opened this issue Jul 16, 2014 · 2 comments

Comments

@sylock
Copy link

sylock commented Jul 16, 2014

Hi,

I'm trying to install a spacewalk server and use spacewalk-rhn-sync, which is based on mrepo: (https://github.com/angrox/spacewalk-api-scripts/tree/master/spacewalk-rhn-sync).

I'm on Red Hat Enterprise Linux Server release 6.5 (Santiago)

In the procedure, I need to generate a system id with gensystemid for each repo I want to sync. When trying to execute is, I get that error:

$ gensystemid -r 6Server -a x86_64 /srv/mrepo/rhel6s-x86_64
/usr/share/mrepo/up2date_client/up2dateUtils.py:16: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
RHN Username: [email protected]
RHN Password:
Traceback (most recent call last):
File "/usr/bin/gensystemid", line 274, in
main()
File "/usr/bin/gensystemid", line 241, in main
except rpclib.Fault, f:
AttributeError: 'module' object has no attribute 'Fault'

Here is the rhn library installed :

import rhn
rhn.file
'/usr/lib/python2.6/site-packages/rhn/init.pyc'

$ rpm -qf /usr/lib/python2.6/site-packages/rhn
rhnlib-2.5.69-1.el6.noarch

$ rpm -qi rhnlib
Name : rhnlib Relocations: (not relocatable)
Version : 2.5.69 Vendor: Koji
Release : 1.el6 Build Date: Thu 10 Oct 2013 10:20:02 AM CEST
Install Date: Mon 07 Jul 2014 02:47:16 PM CEST Build Host: ip-10-112-231-15
Group : Development/Libraries Source RPM: rhnlib-2.5.69-1.el6.src.rpm
Size : 216722 License: GPLv2
Signature : DSA/SHA1, Wed 26 Feb 2014 11:37:28 AM CET, Key ID 0e646f68863a853d
Packager : Koji
URL : https://fedorahosted.org/spacewalk
Summary : Python libraries for the Spacewalk project
Description :
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.

@sylock
Copy link
Author

sylock commented Jul 16, 2014

What I understand :

  • there is a package rhnlib provided by redhat in version 2.5.22 (in the baseline repository)
  • there is another one installed by spacewalk and residing on the spacewalk repository in version 2.5.69

mrepo doesn't seems to run well with the spacewalk version of the rhnlib -> How could we fix it?

@fuco809
Copy link

fuco809 commented Apr 20, 2016

tried it on centos 6.7 and rhnlib 2.5.77 with same result.
@sylock do you have found a solution or workaround?

as i see there are two rpclib.py on the system and the wrong would be taken by gensystemid.

/usr/share/mrepo/rhn/rpclib.py
/usr/share/mrepo/rhn/rpclib.pyo
/usr/share/mrepo/rhn/rpclib.pyc
/usr/lib/python2.6/site-packages/rhn/rpclib.py
/usr/lib/python2.6/site-packages/rhn/rpclib.pyo
/usr/lib/python2.6/site-packages/rhn/rpclib.pyc

grep "Fault" /usr/share/mrepo/rhn/rpclib.py
Fault = xmlrpclib.Fault
s = "X-RHN-Fault-Code"
s = "X-RHN-Fault-String"
grep "Fault" /usr/lib/python2.6/site-packages/rhn/rpclib.py
s = "X-RHN-Fault-Code"
s = "X-RHN-Fault-String"

UPDATE:
after replacing the files /usr/lib/python2.6/site-packages/rhn/rpclib* with the mrepo versions the gensystemid script runs without problem.
additional i had to set in the config /etc/sysconfig/rhn/up2date following two options, because i am behind a proxy:
serverURL=http://xmlrpc.rhn.redhat.com/XMLRPC
useNoSSLForPackages=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants