Bug 2085082

Summary: satellite-change-hostname on capsule runs deprecated capsule-installer
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: satellite-change-hostnameAssignee: Evgeni Golov <egolov>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: lvrtelov, osousa
Target Milestone: 6.10.6Keywords: AutomationBlocker, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-4.1.1-4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2084106 Environment:
Last Closed: 2022-05-31 15:19:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Bryan Kearney 2022-05-13 16:05:00 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34896 has been resolved.

Comment 4 Lukas Pramuk 2022-05-18 12:09:46 UTC
VERIFIED.

@Satellite 6.10.6 Snap2
katello-common-4.1.1-4.el7sat.noarch

by the following manual reproducer:

1) @Satellite: Generate capsule certs for the new hostname and copy it to capsule

# capsule-certs-generate --foreman-proxy-fqdn new-capsule.example.com --certs-tar new-capsule.example.com-certs.tar 

# scp new-capsule.example.com-certs.tar capsule.example.com:/root


2) @Capsule: Create /etc/hosts record and run satellite-change-hostname

# echo 127.0.0.1 new-capsule.example.com > /etc/hosts

# satellite-change-hostname new-capsule.example.com -u admin -p changeme -c /root/new-capsule.example.com-certs.tar -y
Checking for certs tarball

Checking hostname validity
updating hostname in /etc/hostname
setting hostname
checking if hostname was changed
stopping services
removing old cert rpms
No Match for argument: capsule.example.com-foreman-client*
No Match for argument: capsule.example.com-qpid-broker*
No Match for argument: capsule.example.com-qpid-client-cert*
No Match for argument: capsule.example.com-tomcat*
Warning: RPMDB altered outside of yum.
deleting old certs
backed up /var/www/html/pub to /var/www/html/pub/capsule.example.com-20220518074833.backup
updating hostname in /etc/hosts
updating hostname in foreman installer scenarios
backing up last_scenario.yaml
removing last_scenario.yaml
re-running the installer
foreman-installer --scenario capsule -v --disable-system-checks --foreman-proxy-register-in-foreman false --certs-tar-file /root/new-capsule.example.com-certs.tar
cleaning up temporary files
2022-05-18 07:48:46 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-05-18 07:48:51 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-05-18 07:48:51 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-05-18 07:48:58 [WARN  ] [pre] Skipping system checks.
2022-05-18 07:48:58 [WARN  ] [pre] Skipping system checks.
2022-05-18 07:49:03 [NOTICE] [configure] Starting system configuration.
2022-05-18 07:49:21 [NOTICE] [configure] 250 configuration steps out of 1755 steps complete.
2022-05-18 07:49:23 [NOTICE] [configure] 500 configuration steps out of 1756 steps complete.
2022-05-18 07:49:28 [NOTICE] [configure] 750 configuration steps out of 1760 steps complete.
2022-05-18 07:49:48 [NOTICE] [configure] 1000 configuration steps out of 1764 steps complete.
2022-05-18 07:49:48 [NOTICE] [configure] 1250 configuration steps out of 1764 steps complete.
2022-05-18 07:49:53 [NOTICE] [configure] 1500 configuration steps out of 2637 steps complete.
2022-05-18 07:49:53 [NOTICE] [configure] 1750 configuration steps out of 2637 steps complete.
2022-05-18 07:49:54 [NOTICE] [configure] 2000 configuration steps out of 2637 steps complete.
2022-05-18 07:50:14 [NOTICE] [configure] 2250 configuration steps out of 2637 steps complete.
2022-05-18 07:50:34 [NOTICE] [configure] 2500 configuration steps out of 2637 steps complete.
2022-05-18 07:50:57 [NOTICE] [configure] System configuration has finished.
  Success!
  * Capsule is running at https://new-capsule.example.com:9090

  The full log is at /var/log/foreman-installer/capsule.log
Restarting puppet services
**** Hostname change complete! ****
IMPORTANT:
You will have to update the Name and URL of the Smart Proxy in Foreman to the new hostname.

>>> satellite-change-hostname on capsule runs correct installer script (foreman-installer)

Comment 9 errata-xmlrpc 2022-05-31 15:19:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.10.6 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:4850