Project

General

Profile

Actions

Bug #34927

closed

Incorrect argument verification error handling in k-c-h

Added by Nagoor Shaik almost 2 years ago. Updated about 1 month 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 #1

Updated by Nagoor Shaik almost 2 years ago

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

Updated by Ewoud Kohl van Wijngaarden about 1 month ago

  • Status changed from New to Closed

This was already fixed in Foreman 3.4. Automation didn't work because of the missing space between fixes and the bug number.

Actions

Also available in: Atom PDF