Project

General

Profile

Actions

Bug #34927

closed

Incorrect argument verification error handling in k-c-h

Added by Nagoor Shaik about 2 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When attempting this incorrect usage of `satellite-change-hostname`, I've hit an unhandled exception:

# katello-change-hostname --username admin --password changeme --hostname <NEW_FQDN>
/usr/share/katello/hostname-change.rb:293:in `setup_opt_parser': invalid option: --hostname (OptionParser::InvalidOption)
    from /usr/share/katello/hostname-change.rb:33:in `initialize'
    from /usr/sbin/satellite-change-hostname:20:in `new'
    from /usr/sbin/satellite-change-hostname:20:in `<main>'

Version-Release number of selected component (if applicable):
Reproduced on Sat 7.0 snap 5.0, not attempted on different versions but I'd think it's not a regression

How reproducible:
Deterministic

Steps to Reproduce:
1. # katello-change-hostname --username admin --password changeme --hostname <NEW_FQDN>

Actual results:
Failure, traceback

Expected results:
Failure, correctly handled exception and user-friendly error message

Actions

Also available in: Atom PDF