-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
6.14.z, 6.15.z, 6.16.z
Problem Statement
satellite-change-hostname fails trying to find the default Capsule.
satellite-change-hostname must have dry run test prior to making actual changes because when it fail, it keeps satellite in stale state by making half changes and does not revert them if it fails and then we need to manually revert the changes by checking configuration changes.
For example:
- cat /etc/hostname
satellite.example.com <========== original FQDN
- satellite-change-hostname client.example.com --user admin --password xxxxxx
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
Error: smart_proxy not found.
Couldn't find default Capsule id
Failed 'LANG=en_US.UTF-8 hammer -u admin -p redhat --output json capsule info --name satellite' with exit code 70
- cat /etc/hostname
client.example.com <============ Changed FQDN though process not got complete.
- hammer capsule list
-{}|{}------------------------------{}|{}-------------------------------------------{}|{}------------------------------------------------------------
ID | NAME | URL | FEATURES
-{}|{}------------------------------{}|{}-------------------------------------------{}|{}------------------------------------------------------------
1 | satellite.example.com | https://satellite.example.com:9090 | Dynflow, Script, Ansible, Discovery, Openscap, Logs, Pulpcore
-{}|{}------------------------------{}|{}-------------------------------------------{}|{}------------------------------------------------------------
Requirements
satellite-change-hostname must have dry run test prior to making actual changes or it should revert the changes done if it fail to complete the process of hostname change.
Business Impact
Due to failure of change in FQDN of satellite using satellite-change-hostname it keeps satellite in stale stage and it becomes tedious job to revert back the changes.