Bug 497172 - rhn_register doesn't show any error when wrong protocol specified in --serverUrl option
Summary: rhn_register doesn't show any error when wrong protocol specified in --server...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date
Version: 4.8
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Miroslav Suchý
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-22 16:35 UTC by Miroslav Vadkerti
Modified: 2016-07-04 00:54 UTC (History)
6 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-02-16 14:13:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0240 0 normal SHIPPED_LIVE up2date bug fix update 2011-02-15 16:34:59 UTC

Description Miroslav Vadkerti 2009-04-22 16:35:35 UTC
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 17:33:33 UTC
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 14:30:55 UTC
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 14:31:43 UTC
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 14:45:43 UTC
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 14:46:51 UTC
Sending        up2date/up2dateErrors.py
Transmitting file data .
Committed revision 194720.

Comment 9 Petr Sklenar 2010-08-03 07:41:17 UTC
qa acked:
qa: try more wrong scenarios like:
rhn_register --serverUrl=ttps://xxxx/XMLRPC

Comment 12 Jaromir Hradilek 2011-01-17 11:55:23 UTC
    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 14:13:37 UTC
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.