Project

General

Profile

Bug #34927

Incorrect argument verification error handling in k-c-h

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

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
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

History

#1 Updated by Nagoor Shaik about 2 months ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/7921 added

Also available in: Atom PDF