Bug 497172 - rhn_register doesn't show any error when wrong protocol specified in --serverUrl option
rhn_register doesn't show any error when wrong protocol specified in --server...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date (Show other bugs)
4.8
All Linux
low Severity medium
: rc
: ---
Assigned To: Miroslav Suchý
Martin Minar
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-22 12:35 EDT by Miroslav Vadkerti
Modified: 2016-07-03 20:54 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The rhn_register utility has been updated to display an appropriate error message when the "serverURL" option is supplied with an invalid protocol.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-16 09:13:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Vadkerti 2009-04-22 12:35:35 EDT
Description of problem:


Version-Release number of selected component (if applicable):
up2date-4.8.1-33.el4

How reproducible:
always

Steps to Reproduce:
1. run this
rhn_register --serverUrl=ttps://bouncer.rhn.dev.hst.intdev.redhat.com/XMLRPC
  
Actual results:
The TUI quickly dissappears and no error message is showed.


Expected results:
There should be an error message in TUI or printed to stderr


Additional info:
The up2date log /var/log up2date shows this error:

[Wed Apr 22 12:20:38 2009] up2date   File "/usr/sbin/rhn_register", line 1315, in ?
    sys.exit(main() or 0)
   File "/usr/sbin/rhn_register", line 742, in main
    tui.main()
   File "/usr/share/rhn/up2date_client/tui.py", line 996, in main
    tui = Tui(screen)
   File "/usr/share/rhn/up2date_client/tui.py", line 835, in __init__
    except up2dateErrors.InvalidProtocolError:
Comment 2 David Kovalsky 2009-04-22 13:33:33 EDT
Reopening. 

Traceback is not user friendly.

if --serverUrl is not intereted for rhnreg_ks then 
 - up2date needs to print/log proper warning, not traceback
 - needs to be documented (man page, info page, --help, -h, knowledge base, whateever applies). 

Also, if the parametr is completely ignored then up2date should bail out while parsing parameters with invalid parameter usage error. 


Since this is not a regression suggesting to fix in 4.9.
Comment 5 Jan Pazdziora 2010-07-26 10:30:55 EDT
Taking.

We cannot change the behaviour of rhn_register (up2date) for RHEL 4.9 to ignore the --serverUrl parameter because customers might have scripts that depend on that (incorrect maybe) behaviour and 4.9 is not the release to change the behaviour.
Comment 6 Jan Pazdziora 2010-07-26 10:31:43 EDT
If the incorrect protocol is specified in /etc/sysconfig/rhn/up2date, it has the same ill effect as the --serverUrl on the command line. So we might want to focus on this bad behaviour.
Comment 7 Jan Pazdziora 2010-07-26 10:45:43 EDT
The problem is that there actually is a handling of the incorrect protocol. However, the exception itself is not defined in up2dateErrors, so the exception actually is

'module' object has no attribute 'InvalidProtocolError'

And that does not get caught.
Comment 8 Jan Pazdziora 2010-07-26 10:46:51 EDT
Sending        up2date/up2dateErrors.py
Transmitting file data .
Committed revision 194720.
Comment 9 Petr Sklenar 2010-08-03 03:41:17 EDT
qa acked:
qa: try more wrong scenarios like:
rhn_register --serverUrl=ttps://xxxx/XMLRPC
Comment 12 Jaromir Hradilek 2011-01-17 06:55:23 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The rhn_register utility has been updated to display an appropriate error message when the "serverURL" option is supplied with an invalid protocol.
Comment 13 errata-xmlrpc 2011-02-16 09:13:37 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0240.html

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