Bug #25508
closedforeman-maintain service module failed to find satellite/version.rb on capsule
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1651068
Description of problem:
foreman-maintain service status/start/restart failed with error on capsule
- foreman-maintain service start
No such file or directory - /usr/share/foreman/lib/satellite/version.rb - foreman-maintain service restart
No such file or directory - /usr/share/foreman/lib/satellite/version.rb
- foreman-maintain service status
Running Status Services ================================================================================
Get status of applicable services:
Displaying the following service(s):
rh-mongodb34-mongod, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, dynflowd, goferd, httpd, puppetserver, foreman-proxy
/ [FAIL]
No such file or directory - /usr/share/foreman/lib/satellite/version.rb
--------------------------------------------------------------------------------
Scenario [Status Services] failed.
The following steps ended up in failing state:
[service-status]
Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="service-status"
Version-Release number of selected component (if applicable):
- rpm -qa | grep capsule
satellite-capsule-6.5.0-4.beta.el7sat.noarch
- rpm -qa | grep maintain
rubygem-foreman_maintain-0.3.0-1.el7sat.noarch
How reproducible: always
Steps to Reproduce:
1. foreman-maintain service status
Actual results:
Failed with error No such file or directory - /usr/share/foreman/lib/satellite/version.rb and
foreman-maintain.log showed
D, [2018-11-19 00:54:20-0500 #38665] DEBUG -- : Running command rpm q 'satellite' --queryformat="%{VERSION}" with stdin nil : output of the command:
D, [2018-11-19 00:54:20-0500 #38665] DEBUG -
package satellite is not installed
E, [2018-11-19 00:54:20-0500 #38665] ERROR -- : No such file or directory - /usr/share/foreman/lib/satellite/version.rb (Errno::ENOENT)
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/features/downstream.rb:99:in `read'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/features/downstream.rb:99:in `version_from_source'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/features/downstream.rb:19:in `current_version'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/features/downstream.rb:11:in `less_than_version?'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/features/service.rb:10:in `handle_services'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/procedures/service/base.rb:22:in `block in run_service_action'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/reporter/cli_reporter.rb:141:in `with_spinner'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/procedures/service/base.rb:21:in `run_service_action'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/procedures/service/status.rb:14:in `run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/executable.rb:139:in `__run__'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner/execution.rb:82:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner/execution.rb:81:in `run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:116:in `run_step'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:105:in `run_steps'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:98:in `execute_scenario_steps'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:51:in `run_scenario'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:32:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:31:in `each'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:31:in `run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/cli/base.rb:47:in `run_scenario'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/cli/service_command.rb:66:in `execute'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/cli.rb:27:in `run'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
/usr/share/gems/gems/foreman_maintain-0.3.0/bin/foreman-maintain:15:in `<top (required)>'
/usr/bin/foreman-maintain:23:in `load'
/usr/bin/foreman-maintain:23:in `<main>'
Expected results: foreman-maintain service start/restart/status should work.
Additional info: It works fine with satellite.
Updated by Kavita Gaikwad over 4 years ago
- Status changed from New to Closed
Resolved as part of https://projects.theforeman.org/issues/25549 so closing this issue.
Updated by Kavita Gaikwad over 4 years ago
- Related to Bug #25549: feature(:downstream) should be present for both the Satellite and the Capsule added