Bug 598890 - rhn_register --nox fails, when versionOverride is filled with integer
Summary: rhn_register --nox fails, when versionOverride is filled with integer
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Milan Zázrivec
QA Contact: Petr Sklenar
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 582655 599016
TreeView+ depends on / blocked
 
Reported: 2010-06-02 09:50 UTC by Jiri Kastner
Modified: 2010-11-10 21:30 UTC (History)
5 users (show)

Fixed In Version: rhn-client-tools-1.0.0-18.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 21:30:07 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 09:50 UTC, Jiri Kastner
no flags Details

Description Jiri Kastner 2010-06-02 09:50:54 UTC
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 10:51:53 UTC
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>
    app.run()
  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
    ui.main()
  File "/usr/share/rhn/up2date_client/tui.py", line 1203, in main
    tui.run()
  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 10:57:09 UTC
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 11:02:19 UTC
spacewalk.git master: f955f71174c0655d899684396e8c72a1711df2c9
satellite.git CLIENT-RHEL-6: 5f0daa618c8285e936c2182db5d67a93f3059236

Comment 11 Petr Sklenar 2010-07-28 12:57:57 UTC
Verified with rhn-client-tools-1.0.0-24.el6.noarch

Comment 12 releng-rhel@redhat.com 2010-11-10 21:30:07 UTC
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.