Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
rubygem-foreman_maintain-0.7.10-1.el7sat.noarch has a regression compared to 0.7.8-1 version in the use case when DBs are external and one tries to e.g. restart services:
undefined method `enabled?' for RemoteDB(rh-mongodb34-mongod [5]):ForemanMaintain::Utils::Service::RemoteDB
is raised. With backtrace:
/usr/share/gems/gems/foreman_maintain-0.7.10/definitions/features/service.rb:140:in `select!'
/usr/share/gems/gems/foreman_maintain-0.7.10/definitions/features/service.rb:140:in `filter_disabled_services!'
/usr/share/gems/gems/foreman_maintain-0.7.10/definitions/features/service.rb:133:in `filter_services'
/usr/share/gems/gems/foreman_maintain-0.7.10/definitions/features/service.rb:30:in `filtered_services'
/usr/share/gems/gems/foreman_maintain-0.7.10/definitions/procedures/service/base.rb:19:in `run_service_action'
/usr/share/gems/gems/foreman_maintain-0.7.10/definitions/procedures/service/start.rb:11:in `run'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/executable.rb:139:in `__run__'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner/execution.rb:82:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner/execution.rb:81:in `run'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner.rb:131:in `run_step'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner.rb:120:in `run_steps'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner.rb:113:in `execute_scenario_steps'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/runner.rb:58:in `run_scenario'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:129:in `block in run_phase'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:177:in `with_non_empty_scenario'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:124:in `run_phase'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:164:in `block in rollback_pre_migrations'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:159:in `each'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:159:in `rollback_pre_migrations'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:90:in `run_rollback'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:66:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:65:in `each'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/upgrade_runner.rb:65:in `run'
/usr/share/gems/gems/foreman_maintain-0.7.10/lib/foreman_maintain/cli/upgrade_command.rb:96: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.7.10/lib/foreman_maintain/cli.rb:42:in `run'
/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
/usr/share/gems/gems/foreman_maintain-0.7.10/bin/foreman-maintain:15:in `<top (required)>'
/bin/satellite-maintain:23:in `load'
/bin/satellite-maintain:23:in `<main>'
This also affects upgrades of Satellite, as such services commands are part of the upgrade call flow.
Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-0.7.10-1.el7sat.noarch
How reproducible:
100%
Steps to Reproduce:
1. Have Sat6.9 (or any older) with foreman-maintain 0.7.10 AND external DBs
2. foreman-maintain service restart
Actual results:
Running Restart Services
================================================================================
Check if command is run as root user: [OK]
--------------------------------------------------------------------------------
Restart applicable services:
Stopping the following service(s): [FAIL]
undefined method `enabled?' for RemoteDB(rh-mongodb34-mongod [5]):ForemanMaintain::Utils::Service::RemoteDB
--------------------------------------------------------------------------------
Scenario [Restart Services] failed.
The following steps ended up in failing state:
[service-restart]
Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="service-restart"
foreman-maintain log has the backtrace shown above.
Expected results:
Command works well :)
Additional info:
Seen upstream issue https://projects.theforeman.org/issues/32319 for the same, without details.
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 (Satellite 6.10 Satellite Maintenance Release), 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-2021:4697