Description of problem: # foreman-maintain upgrade run --target-version 6.4 Running Checks before upgrading to Satellite 6.4 ================================================================================ Check for verifying syntax for ISP DHCP configurations: [OK] -------------------------------------------------------------------------------- Check for paused tasks: [OK] -------------------------------------------------------------------------------- Check whether all services are running using hammer ping: [OK] -------------------------------------------------------------------------------- Check to validate candlepin database: [OK] -------------------------------------------------------------------------------- Check if EPEL repository enabled on system: / Checking for presence of EPEL repository [OK] -------------------------------------------------------------------------------- Check for running tasks: [OK] -------------------------------------------------------------------------------- Check for old tasks in paused/stopped state: [OK] -------------------------------------------------------------------------------- Check for pending tasks which are safe to delete: [OK] -------------------------------------------------------------------------------- Check for tasks in planning state: [OK] -------------------------------------------------------------------------------- Check for recommended disk speed of pulp, mongodb, pgsql dir.: | Finished Disk speed : 264 MB/sec [OK] -------------------------------------------------------------------------------- Validate availability of repositories: | Validating availability of repositories for 6.4 [FAIL] Failed executing facter operatingsystemmajrelease, exit status 127: sh: facter: command not found -------------------------------------------------------------------------------- Scenario [Checks before upgrading to Satellite 6.4] failed. The following steps ended up in failing state: [repositories-validate] Resolve the failed steps and rerun the command. In case the failures are false positives, use --whitelist="repositories-validate" Version-Release number of selected component (if applicable): # rpm -qa | grep maintain rubygem-foreman_maintain-0.2.2-1.el7sat.noarch How reproducible: always Steps to Reproduce: 1.# foreman-maintain upgrade run --target-version 6.4 Actual results: Validate availability of repositories: | Validating availability of repositories for 6.4 [FAIL] Failed executing facter operatingsystemmajrelease, exit status 127: sh: facter: command not found -------------------------------------------------------------------------------- Scenario [Checks before upgrading to Satellite 6.4] failed. production.log showed D, [2018-05-24 10:23:14-0400 #88604] DEBUG -- : Running command facter operatingsystemmajrelease with stdin nil D, [2018-05-24 10:23:14-0400 #88604] DEBUG -- : output of the command: sh: facter: command not found E, [2018-05-24 10:23:14-0400 #88604] ERROR -- : Failed executing facter operatingsystemmajrelease, exit status 127: sh: facter: command not found (ForemanMaintain::Error::ExecutionError) /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/utils/command_runner.rb:52:in `execution_error' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/concerns/system_helpers.rb:68:in `execute!' /usr/share/gems/gems/foreman_maintain-0.2.2/definitions/features/downstream.rb:57:in `rh_repos' /usr/share/gems/gems/foreman_maintain-0.2.2/definitions/features/downstream.rb:44:in `absent_repos' /usr/share/gems/gems/foreman_maintain-0.2.2/definitions/checks/repositories/validate.rb:19:in `block in run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/reporter/cli_reporter.rb:139:in `with_spinner' /usr/share/gems/gems/foreman_maintain-0.2.2/definitions/checks/repositories/validate.rb:18:in `run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/executable.rb:139:in `__run__' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/check.rb:40:in `__run__' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner/execution.rb:82:in `block in run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner/execution.rb:81:in `run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner.rb:116:in `run_step' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner.rb:105:in `run_steps' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner.rb:98:in `execute_scenario_steps' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/runner.rb:51:in `run_scenario' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/upgrade_runner.rb:138:in `block in run_phase' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/upgrade_runner.rb:181:in `with_non_empty_scenario' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/upgrade_runner.rb:134:in `run_phase' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/upgrade_runner.rb:82:in `block in run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/upgrade_runner.rb:77:in `each' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/upgrade_runner.rb:77:in `run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/cli/upgrade_command.rb:80:in `execute' /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /usr/share/gems/gems/foreman_maintain-0.2.2/lib/foreman_maintain/cli.rb:27:in `run' /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' /usr/share/gems/gems/foreman_maintain-0.2.2/bin/foreman-maintain:12:in `<top (required)>' /usr/bin/foreman-maintain:23:in `load' /usr/bin/foreman-maintain:23:in `<main>' Expected results: Successful Validating availability of repositories. Might be need to check if package is installed orr not. if package not installed, install it. Additional info: Satellite was fresh installed (6.3 with puppet 4 RHEL 7.5 server).
Created redmine issue http://projects.theforeman.org/issues/23792 from this bug
Upstream bug assigned to kgaikwad
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23792 has been resolved.
The following KCS was created https://access.redhat.com/solutions/3527971 The most common root cause of this issue would be customized Env Variable, so in a way this kind of error would be expected under those conditions, since the facter command itself (outside of any foreman tools) would also not be working.
VERIFIED Version tested: # rpm -qa | grep maintain rubygem-foreman_maintain-0.2.6-1.el7sat.noarch -------------------------------------------------------------------------------- Validate availability of repositories: | Validating availability of repositories for 6.4 [OK] -------------------------------------------------------------------------------- # facter -bash: facter: command not found foreman-maintain now run factor from /usr/bin/factor.
Moving this back to ON_QA, this also needs to verify against foreman_maintain-0.1.6
This fix is not contained in foreman_maintain-0.1.6 as we are shipping foreman_maintain-0.2.6 separately in the satellite-tools-maintenance-beta in conjunction with the 6.4 Beta coming soon. This will be the version used to upgrade from 6.3 to 6.4 (the 0.2.6+ versions) and will GA in conjunction with 6.4 GA into the main sat-maint repo. Moving back to VERIFIED
The current version of foreman_maintain includes this fix.