Project

General

Profile

Bug #20805

katello-change-hostname should ask for credentials if not provided

Added by John Mitsch almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1481289

Description of problem:

Currently when changing hostname without specifying username and password:

  1. katello-change-hostname -y newname
    /usr/sbin/katello-change-hostname:191:in `precheck': undefined local variable or method `opt_parser' for main:Object (NameError)
    from /usr/sbin/katello-change-hostname:212:in `<main>'

or

  1. ]# katello-change-hostname newname
    WARNING This script will modify your system. You will need to re-register any clients registered to this system after script completion. Foreman Proxies will have to be re-registered and reinstalled. If you are using custom certificates, you will have to run the -installer again with custom certificate options after this script completes. Have you taken the necessary precautions (backups, snapshots, etc...) and want to proceed with changing your hostname?
    [y/n]:/usr/sbin/katello-change-hostname:191:in `precheck': undefined local variable or method `opt_parser' for main:Object (NameError)
    from /usr/sbin/katello-change-hostname:212:in `<main>'

Expected results:
Some user-friendly message asking user to pass -u and -p options. Possibly, in the interactive mode katello-change-hostname could ask for credentials just after the [y/n] dialog

Associated revisions

Revision a29de727 (diff)
Added by John Mitsch almost 5 years ago

Fixes #20805 - kchange-hostname fix optparser error

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-packaging/pull/517 added

#2 Updated by John Mitsch almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by John Mitsch almost 5 years ago

  • Subject changed from katello-change-hostname should ask for credentials if not provided to katello-change-hostname should ask for credentials if not provided
  • Legacy Backlogs Release (now unused) set to 295

Also available in: Atom PDF