Bug #23792
closedfacter command not found while Validating availability of repositories for sat64
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1582215
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"
- 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).
Updated by Kavita Gaikwad over 6 years ago
- Assignee changed from Anurag Patel to Kavita Gaikwad
Updated by The Foreman Bot over 6 years ago
- Pull request https://github.com/theforeman/foreman_maintain/pull/184 added
Updated by Kavita Gaikwad over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_maintain|258b5335a43f07eb28904eac53d1afea72cb46ac.
Updated by Ivan Necas over 6 years ago
- Triaged set to No
- Fixed in Releases foreman-maintain-0.2.4 added