Bug 1404652

Summary: Installer cannot be run from /usr/share/foreman-installer or /usr/share/foreman directories
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.5CC: bbuckingham, bkearney, ehelms, kbidarka, stbenjam
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 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:

Description Sachin Ghai 2016-12-14 11:09:06 UTC
Description of problem:

I was trying upgrade from 6.1.11 -> 6.2.5 and installer failed at db migrate step due to known issue. Later after applying fix, when I re-run the installer from "/user/share/foreman" I got:


[root@cloud-qe-22 foreman]# satellite-installer --upgrade
ERROR: No installation scenario was selected, the installer can not continue.
       Even --help content is dependent on selected scenario.
       Select scenario with --scenario SCENARIO or list available scenarios with --list-scenarios.

[root@cloud-qe-22 foreman]# satellite-installer --scenario satellite --upgrade
ERROR: Scenario (config/satellite.yaml) was not found, can not continue
Version-Release number of selected component (if applicable):


However if I ran the installer from $HOME then, it was executed successfully.

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
installer failed if run from /usr/share/foreman

Expected results:
user should be able to run installer from anywhere

Additional info:

Comment 2 Stephen Benjamin 2016-12-14 18:38:31 UTC
This was fixed upstream, without a Redmine issue:
  https://github.com/theforeman/foreman-installer/commit/6fef25e5d3a41f46bff9794946b2c6faed6c84f5

The basics was we were looking in config/*.yaml first, so any directory that had 'config' with *.yaml files would break the installer.

See: https://github.com/theforeman/foreman-installer/commit/6fef25e5d3a41f46bff9794946b2c6faed6c84f5#diff-7abb4f50be0dfcbd928a9db4d717c05c

Comment 4 Kedar Bidarkar 2017-08-26 21:53:40 UTC
[root@qe-sat6 ~]# cd /usr/share/foreman
[root@qe-sat6 foreman]# satellite-installer --help | grep tftp
    --foreman-plugin-discovery-tftp-root  TFTP root to install image into (current: "/var/lib/tftpboot")
    --foreman-proxy-tftp          Enable TFTP feature (current: true)


VERIFIED with sat6.3.0 snap13.0

Comment 5 Satellite Program 2018-02-21 16:51:07 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/RHSA-2018:0336