Bug 1341756

Summary: Capsule upgrade 6.1->6.2 snap 13 incorrectly resets trusted hosts and foreman-url
Product: Red Hat Satellite Reporter: Tomer Brisker <tbrisker>
Component: InstallationAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham, bkearney, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-installer-base-3.0.0.43-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:29:35 UTC Type: Bug
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: 1343438    
Bug Blocks: 1335807, 1342840    

Description Tomer Brisker 2016-06-01 17:20:37 UTC
Description of problem:
When upgrading a capsule from satellite 6.1 to satellite 6.2 beta (snap 13), running "satellite-installer --upgrade --scenario capsule ..." causes settings.yml to remove the satellite server from the trusted_hosts list and resets the foreman_url to the capsule's hostname instead of the server's hostname.

Version-Release number of selected component (if applicable):
6.2 Beta snap 13

How reproducible:


Steps to Reproduce:
1. satellite-installer --upgrade --scenario capsule
2.
3.

Actual results:
settings.yml contains the following settings:
trusted_hosts: 
 - <capsule hostname>

foreman_url: <capsule hostname>

Expected results:
settings.yml contains the following settings:
trusted_hosts: 
 - <capsule hostname>
 - <satellite server hostname>

foreman_url: <satellite server hostname>


Additional info:

Comment 2 Brad Buckingham 2016-06-06 19:02:54 UTC
Created redmine issue http://projects.theforeman.org/issues/15315 from this bug

Comment 5 Sachin Ghai 2016-06-10 07:58:17 UTC
Verified with upgrade from sat6.1.9 -> sat6.2 GA snap15.1 on rhel7. The reported issue is fixed now. 

capsule upgrade is completed successfully.

Upgrading...
Upgrade Step: stop_services...
Upgrade Step: start_databases...
Upgrade Step: update_http_conf...
Upgrade Step: migrate_pulp...
Upgrade Step: fix_pulp_httpd_conf...
Upgrade Step: start_httpd...
Upgrade Step: start_qpidd...
Upgrade Step: start_pulp...
Upgrade Step: remove_nodes_importers...
Upgrade Step: Running installer...
Installing             Done                                               [100%] [............................]
  The full log is at /var/log/foreman-installer/capsule.log
Upgrade Step: restart_services...
Katello upgrade completed!


Also, I can see correct entry of trusted hosts and foreman-url under:

 ~]# cat /etc/foreman-installer/scenarios.d/capsule-answers.yaml 


    trusted_hosts:
        - qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com
        - qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com
    :::::<snip>::::::
    foreman_base_url: "https://qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com"


settings.yml contains correct entroes too:

:trusted_hosts:
  - qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com
  - qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com

# Endpoint for reverse communication
:foreman_url: https://qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com

Comment 6 Bryan Kearney 2016-07-27 11:29:35 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, 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-2016:1501