Bug 598890 - rhn_register --nox fails, when versionOverride is filled with integer
rhn_register --nox fails, when versionOverride is filled with integer
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
All Linux
high Severity medium
: rc
: ---
Assigned To: Milan Zázrivec
Petr Sklenar
Depends On:
Blocks: 582655 599016
  Show dependency treegraph
Reported: 2010-06-02 05:50 EDT by Jiri Kastner
Modified: 2010-11-10 16:30 EST (History)
5 users (show)

See Also:
Fixed In Version: rhn-client-tools-1.0.0-18.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 16:30:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
up2date log (5.25 KB, text/plain)
2010-06-02 05:50 EDT, Jiri Kastner
no flags Details

  None (edit)
Description Jiri Kastner 2010-06-02 05:50:54 EDT
Created attachment 418969 [details]
up2date log

Description of problem:
when rhn_register launched in text ui, registration fails, when versionOverride is equal to 6. when launched in graphical ui, registration passed, with rhnreg_ks successfully registered too.

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

How reproducible:
always on rhel6

Steps to Reproduce:
1. install rhel6
2. try to register using rhn_register in gui mode
3. registration passed
4. remove systemid or unregister machine in webui on satellite or rhn
5. try to register using rhnreg_ks
6. registration passed
7. remove systemid or unregister machine in webui on satellite or rhn
8. try to register using 'rhn_register--nox'
9. registration fails
Actual results:
rhn_register --nox
An error has occurred:
<type 'exceptions.TypeError'>
See /var/log/up2date for more information

Expected results:
successful registration

Additional info:
Comment 1 Jan Pazdziora 2010-06-02 06:51:53 EDT
From the log, the traceback is:

[Wed Jun  2 05:47:50 2010] rhn_register 
Traceback (most recent call last):
  File "/usr/sbin/rhn_register", line 75, in <module>
  File "/usr/share/rhn/up2date_client/rhncli.py", line 74, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn_register", line 57, in main
  File "/usr/share/rhn/up2date_client/tui.py", line 1203, in main
  File "/usr/share/rhn/up2date_client/tui.py", line 1151, in run
    win = self.windows[index](self.screen, self)
  File "/usr/share/rhn/up2date_client/tui.py", line 603, in __init__
    hardware_text += _("Version: ") + up2dateUtils.getVersion() + "  "
<type 'exceptions.TypeError'>: cannot concatenate 'str' and 'int' objects
Comment 2 Jan Pazdziora 2010-06-02 06:57:09 EDT
Here's a patch to fix the problem:

diff --git a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
index f2eded1..117c9d0 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/up2dateUtils.py
@@ -41,7 +41,7 @@ def getVersion():
     Returns the version of redhat-release rpm
     os_release, version, release = _getOSVersionAndRelease()
-    return version
+    return str(version)
 def getOSRelease():
Comment 7 Milan Zázrivec 2010-06-03 07:02:19 EDT
spacewalk.git master: f955f71174c0655d899684396e8c72a1711df2c9
satellite.git CLIENT-RHEL-6: 5f0daa618c8285e936c2182db5d67a93f3059236
Comment 11 Petr Sklenar 2010-07-28 08:57:57 EDT
Verified with rhn-client-tools-1.0.0-24.el6.noarch
Comment 12 releng-rhel@redhat.com 2010-11-10 16:30:07 EST
Red Hat Enterprise Linux 6.0 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.