Bug #34098
closedkatello-change-hostname fails to perform changes, leaving the system in an unusable state
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2028733
When trying to change the hostname of an existing system, the tool bails out:
[root@ci-vm-10-0-101-91 ~]# satellite-change-hostname newhost.example.com -u admin -p changeme
Checking hostname validity
Checking overall health of server
Checking credentials
WARNING This script will modify your system.
You will need to re-register any satellite clients registered to this system after script completion.
Capsules will have to be re-registered and reinstalled. If you are using custom certificates,
you will have to run the satellite-installer again with custom certificate options after this script completes.
Have you taken the necessary precautions (backups, snapshots, etc...)?
Proceed with changing your hostname? [y/n]
y
Precheck passed
updating hostname in /etc/hostname
setting hostname
checking if hostname was changed
Updating default Capsule
Updating installation media paths
stopping services
removing old cert rpms
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-apache*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-foreman-client*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-foreman-proxy*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-foreman-proxy-client*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-puppet-client*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-qpid-broker*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-qpid-client-cert*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-qpid-router-client*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-qpid-router-server*
No Match for argument: ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-tomcat*
deleting old certs
backed up /var/www/html/pub to /var/www/html/pub/ci-vm-10-0-101-91.hosted.upshift.rdu2.redhat.com-20211207054627.backup
updating hostname in /etc/hosts
updating hostname in foreman installer scenarios
updating hostname in hammer configuration
backing up last_scenario.yaml
removing last_scenario.yaml
re-running the installer
satellite-installer --scenario satellite -v --disable-system-checks --certs-regenerate=true --foreman-proxy-register-in-foreman true
/usr/share/katello/hostname-change.rb:159:in `next_steps_message': undefined local variable or method `proxy' for #<KatelloUtilities::HostnameChange:0x00000001b9c408> (NameError)
from /usr/share/katello/hostname-change.rb:570:in `installer_failure_message'
from /usr/share/katello/hostname-change.rb:541:in `run'
from /usr/sbin/satellite-change-hostname:23:in `<main>'
Updated by The Foreman Bot over 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Evgeni Golov
- Pull request https://github.com/theforeman/foreman-packaging/pull/7388 added
Updated by The Foreman Bot over 3 years ago
- Pull request https://github.com/theforeman/foreman-packaging/pull/7389 added
Updated by Partha Aji over 3 years ago
- Project changed from Katello to Packaging
- Subject changed from katello-change-hostname fails to perform changes, leaving the system in an unusable state to katello-change-hostname fails to perform changes, leaving the system in an unusable state
- Status changed from Ready For Testing to Closed
- Target version deleted (
Katello 4.4.0)