Bug 1968608

Summary: katello-change-hostname assumes answers file location
Product: Red Hat Satellite Reporter: Ian Ballou <iballou>
Component: satellite-change-hostnameAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Jaroslav Henner <jhenner>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: ahumbe, egolov, ekohlvan, pmendezh
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-4.1.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:11: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:
Bug Depends On:    
Bug Blocks: 1957813    

Description Ian Ballou 2021-06-07 16:14:30 UTC
The right way to determine the answers file location is to read the scenario file and use the value for :answer_file. However, the script now assumes it's always ${scenario}-answers.yaml which can lead to incorrect behavior.

Comment 1 Ian Ballou 2021-06-07 16:14:34 UTC
Created from redmine issue https://projects.theforeman.org/issues/32743

Comment 2 Ian Ballou 2021-06-07 16:14:35 UTC
Upstream bug assigned to ekohlvan

Comment 3 Bryan Kearney 2021-06-07 20:06:13 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32743 has been resolved.

Comment 4 Ewoud Kohl van Wijngaarden 2021-09-16 13:07:47 UTC
The reproducer is (on the original host), consider the active scenario file (/etc/foreman-installer/scenarios.d/satellite.yaml). That contains a key :answer_file which points (as the name indicates) to an answer file. Move the file and change the scenario file to match.

This is pretty much step 1 and 4 of https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html/installing_satellite_server_from_a_disconnected_network/installing-satellite-server-disconnected#configuring-satellite-automatically-using-an-answer-file_satellite but instead of copying, move the file. That guarantees it to fail. Having differing answers is also a valid way to verify, but harder to because you can easily miss thing.

Note that that documentation caused the customer to have a problem. In 6.10 it should be gone from the docs, but technically it's still valid and we'll have upgrading users.

Comment 5 Jaroslav Henner 2021-09-20 13:32:23 UTC
I changed the debug level of the foreman-proxy using the modified answer file on new location and then ran `satellite-installer --scenario satellite`. This in turn changed the debug level.

I have no means to test this doesn't break when doing the satellite-change-hostname, but the satellite-change-hostname does call the installer which seem fine, so I consider this as VERIFIED.

Comment 8 errata-xmlrpc 2021-11-16 14:11: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 (Moderate: Satellite 6.10 Release), 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/RHSA-2021:4702