Project

General

Profile

Actions

Feature #20799

closed

katello-change-hostname needs better requirements checking

Added by John Mitsch over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Backup & Restore
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:

katello-change-hostname should check requirements before performing any changes on server. It should work in an "all or nothing" way, so if it does not have everything needed to complete successfully, it should do nothing.

Currently, the checking is done while making changes. Consider an example with invalid hostname:

~]# katello-change-hostname 9899.$ -u admin -p changeme
This will modify your system. You will need to re-register any Foreman Proxies and Foreman clients after script completion. Foreman Proxies will have to be reinstalled. If you are using custom certificates, you will have to run the foreman-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]:Updating default Foreman Proxy

Updating installation media paths
updating hostname in /etc/hostname
setting hostname
checking if hostname was changed
the new hostname was not changed successfully, exiting script

This seems correct, but when checking the hostname, we can see it was actually changed:

~]# hostname
9899

~]# hostnamectl
Static hostname: 9899
Pretty hostname: 9899.$

Actions #1

Updated by John Mitsch over 6 years ago

  • Subject changed from katello-change-hostname needs better requirements checking to katello-change-hostname needs better requirements checking
  • Target version set to 213
Actions #2

Updated by The Foreman Bot over 6 years ago

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

Updated by John Mitsch over 6 years ago

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

Updated by John Mitsch over 6 years ago

  • Category set to Backup & Restore
  • translation missing: en.field_release set to 295
Actions

Also available in: Atom PDF