RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 557059 - rhn_register do not work
Summary: rhn_register do not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools
Version: 6.0
Hardware: s390x
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Miroslav Suchý
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: 564352 582655
TreeView+ depends on / blocked
 
Reported: 2010-01-20 10:03 UTC by Miroslav Suchý
Modified: 2010-07-02 19:48 UTC (History)
4 users (show)

Fixed In Version: rhn-client-tools-1.0.0-9.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 19:48:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2010-01-20 10:03:11 UTC
Description of problem:
rhn_register do not work

Version-Release number of selected component (if applicable):
rhn-setup-0.7.4-1.1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. install rhn-client-tools on RHEL6
2. try to run rhn_register agains prod
  
Actual results:
Traceback:
Traceback (most recent call last):
  File "/usr/sbin/rhn_register", line 83, in <module>
    app.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 66, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn_register", line 65, in main
    ui.main()
  File "/usr/share/rhn/up2date_client/tui.py", line 1722, in main
    tui.run()
  File "/usr/share/rhn/up2date_client/tui.py", line 1609, in run
    if self._show_subscription_window() == False:
  File "/usr/share/rhn/up2date_client/tui.py", line 1544, in _show_subscription_window
    self._activate_hardware()
  File "/usr/share/rhn/up2date_client/tui.py", line 1523, in _activate_hardware
    hardwareInfo, self.other['org_id'])
  File "/usr/share/rhn/up2date_client/rhnreg.py", line 799, in activateHardwareInfo
    hardwareInfo, other)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 200, 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 39, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 318, in _request
    request = self._req_body(params, methodname)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 222, in _req_body
    return xmlrpclib.dumps(params, methodname, encoding=self._encoding)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1132, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 677, in dumps
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 778, in dump_struct
    raise TypeError, "dictionary key must be string"
<type 'exceptions.TypeError'>: dictionary key must be string

Expected results:
No Traceback

Comment 2 RHEL Program Management 2010-01-20 10:15:41 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Phil Knirsch 2010-02-23 13:06:37 UTC
Does this happen on s390x installs only?

Thanks & regards, Phil

Comment 4 Miroslav Suchý 2010-02-23 15:12:50 UTC
It deffinitely works on x86_64. Do not have s390x to try again. So I suppose it happen only on s390x.

Comment 5 Jan Pazdziora (Red Hat) 2010-05-13 09:07:39 UTC
I was not able to reproduce the issue on RHEL 6 Snapshot 1 with

# rpm -qf /usr/sbin/rhn_register
rhn-setup-1.0.0-2.el6.noarch

So I assume this was addressed by our general overhaul and rebase. Moving to MODIFIED to get this QAed.

Comment 6 Jan Pazdziora (Red Hat) 2010-05-13 09:07:59 UTC
Oops, taking, for any kickbacks.

Comment 7 Jan Pazdziora (Red Hat) 2010-05-13 09:17:37 UTC
Moving back to ASSIGNED. With

rhn-setup-1.0.0-4.git.34a64e923780cd6a7d9c293d39cdef220e975603.el6.noarch

I get

Traceback (most recent call last):
  File "/usr/share/rhn/up2date_client/tui.py", line 891, in run
    rhnreg.sendHardware(systemId, self.tui.hardware)
  File "/usr/share/rhn/up2date_client/rhnreg.py", line 471, in sendHardware
    s.registration.add_hw_profile(systemId, hardwareList)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 204, 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 39, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 350, in _request
    request = self._req_body(params, methodname)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 231, in _req_body
    return xmlrpclib.dumps(params, methodname, encoding=self._encoding)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1132, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 677, in dumps
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 759, in dump_array
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 780, in dump_struct
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 703, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
<type 'exceptions.TypeError'>: cannot marshal None unless allow_none is enabled

Comment 10 Jan Pazdziora (Red Hat) 2010-05-13 10:27:38 UTC
Addressed in Spacewalk master cb136c947665fb7aa278a3de42a6e5b9cd1f4f6e.

Comment 11 Jan Pazdziora (Red Hat) 2010-05-13 10:29:25 UTC
Cherry picked to CLIENT-RHEL-6 as commit 3aa37fc4d6946a48b7fcd0474e6ab47ec2789e6a.

Comment 14 Petr Sklenar 2010-05-24 08:35:15 UTC
Hello,
rhn_register and rhnreg_ks do not work for me again:

[root@auto-i386-002 ~]# rhnreg_ks --username=***** --password=**** --server=https://xmlrpc.rhn.errata.stage.redhat.com/XMLRPC
An error has occurred:
<type 'exceptions.TypeError'>
See /var/log/up2date for more information
[root@auto-i386-002 ~]# tail -n 22 /var/log/up2date
  File "/usr/share/rhn/up2date_client/hardware_gudev.py", line 87, in get_devices
    m = re.search('.*-scsi-(\d+):(\d+):(\d+):(\d+)', path)
  File "/usr/lib/python2.6/re.py", line 142, in search
    return _compile(pattern, flags).search(string)
<type 'exceptions.TypeError'>: expected string or buffer

[Mon May 24 04:27:25 2010] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhnreg_ks", line 205, in <module>
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 74, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhnreg_ks", line 99, in main
    hardwareList = hardware.Hardware()
  File "/usr/share/rhn/up2date_client/hardware.py", line 667, in Hardware
    allhw = get_devices()
  File "/usr/share/rhn/up2date_client/hardware_gudev.py", line 87, in get_devices
    m = re.search('.*-scsi-(\d+):(\d+):(\d+):(\d+)', path)
  File "/usr/lib/python2.6/re.py", line 142, in search
    return _compile(pattern, flags).search(string)
<type 'exceptions.TypeError'>: expected string or buffer
-------
[root@auto-i386-002 ~]# rpm -q rhn-client-tools python-gudev python-dmidecode
rhn-client-tools-1.0.0-7.el6.noarch
python-gudev-147.1-4.el6.i686
python-dmidecode-3.10.12-1.el6.i686
[root@auto-i386-002 ~]# uname -a
Linux auto-i386-002.ss.eng.bos.redhat.com 2.6.32-28.el6.i686 #1 SMP Thu May 20 14:25:31 EDT 2010 i686 i686 i386 GNU/Linux

Comment 15 Petr Sklenar 2010-05-24 08:58:09 UTC
>(In reply to comment #14)

I have this issue only on one of my testing machine. This machine has scsi
controller:

# lspci
<snip>
03:04.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1064 PCI-X
Fusion-MPT SAS (rev 02)

and when I comment out following lines in code, it starts working:

# diff /usr/share/rhn/up2date_client/hardware_gudev.py
/usr/share/rhn/up2date_client/hardware_gudev.py.ORIG 
85,91c85,91
< #        if device.has_property('ID_BUS') and device.get_property('ID_BUS')
== 'scsi':
< #            path = device.get_property('ID_PATH')
< #            m = re.search('.*-scsi-(\d+):(\d+):(\d+):(\d+)', path)
< #            result_item['prop1'] = m.group(1) # DEV_HOST
< #            result_item['prop2'] = m.group(2) # DEV_ID
< #            result_item['prop3'] = m.group(3) # DEV_CHANNEL
< #            result_item['prop4'] = m.group(4) # DEV_LUN
---
>         if device.has_property('ID_BUS') and device.get_property('ID_BUS') == 'scsi':
>             path = device.get_property('ID_PATH')
>             m = re.search('.*-scsi-(\d+):(\d+):(\d+):(\d+)', path)
>             result_item['prop1'] = m.group(1) # DEV_HOST
>             result_item['prop2'] = m.group(2) # DEV_ID
>             result_item['prop3'] = m.group(3) # DEV_CHANNEL
>             result_item['prop4'] = m.group(4) # DEV_LUN

Comment 16 Jan Pazdziora (Red Hat) 2010-05-24 09:08:38 UTC
Since this looks like coming from hardware_gudev.py, assigning to Mirek.

Comment 17 Miroslav Suchý 2010-05-24 10:13:35 UTC
For some reason IBM-ESXS controler/driver do not set ID_PATH. I extracted that info from different key and even if both are missing the code will not die, but just not send the info of this one device.

fixed in spacewalk git as 517914a0881a0b32a8a2342eb76d75f3f221606e

cherrypicked to satellite.git as 039bf8cb6a77efea7d001c844d965792fa3be27a

rhn-client-tools-1.0.0-9.el6 built

Comment 20 releng-rhel@redhat.com 2010-07-02 19:48:32 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.