Project

General

Profile

Actions

Bug #25504

closed

foreman-maintain backup failed with wrong argument type nil (expected Regexp)

Added by Martin Bacovsky over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1651070

Description of problem:

  1. foreman-maintain backup online /tmp/
    Starting backup: 2018-11-19 01:02:45 -0500
    Running preparation steps required to run the next scenarios ================================================================================
    Make sure Foreman DB is up:
    / Checking connection to the Foreman DB [FAIL]
    wrong argument type nil (expected Regexp)
    --------------------------------------------------------------------------------
    Continue with step [Start applicable services]?, [y(yes), n(no), q(quit)] q
    Make sure Mongo DB is up:
    \ Checking connection to the Mongo DB [OK]
    --------------------------------------------------------------------------------
    Checks whether the tools for Mongo DB are installed: [OK]
    --------------------------------------------------------------------------------
    Scenario [preparation steps required to run the next scenarios] failed.

The following steps ended up in failing state:

[foreman-db-up]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="foreman-db-up"

Running Failed backup cleanup ================================================================================
Clean up backup directory: [OK]
--------------------------------------------------------------------------------

Done with backup: 2018-11-19 01:02:50 -0500
Backup didn't finish. Incomplete backup was removed.

Version-Release number of selected component (if applicable):

  1. rpm -qa | grep capsule
    satellite-capsule-6.5.0-4.beta.el7sat.noarch
  1. rpm -qa | grep maintain
    rubygem-foreman_maintain-0.3.0-1.el7sat.noarch

How reproducible: always

Steps to Reproduce:
1. foreman-maintain backup online /tmp/

Actual results: Backup failed with

I, [2018-11-19 01:02:45-0500 #39215] INFO -- : Running foreman-maintain command with arguments "backup", "online", "/tmp/"
I, [2018-11-19 01:02:45-0500 #39215] INFO -- : === Scenario 'preparation steps required to run the next scenarios' started ===
I, [2018-11-19 01:02:45-0500 #39215] INFO -- : --- Execution step 'Make sure Foreman DB is up' [foreman-db-up] started ---
E, [2018-11-19 01:02:45-0500 #39215] ERROR -- : wrong argument type nil (expected Regexp) (TypeError)
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/utils/command_runner.rb:100:in `gsub'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/utils/command_runner.rb:100:in `block in hide_strings'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/utils/command_runner.rb:99:in `each'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/utils/command_runner.rb:99:in `reduce'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/utils/command_runner.rb:99:in `hide_strings'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/utils/command_runner.rb:25:in `run'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/concerns/system_helpers.rb:71:in `execute'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/concerns/system_helpers.rb:53:in `execute?'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/concerns/base_database.rb:41:in `ping'
/usr/share/gems/gems/foreman_maintain-0.3.0/definitions/checks/foreman/db_up.rb:13:in `block in run'
/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/checks/foreman/db_up.rb:12: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/check.rb:40: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:94:in `block in execute_scenario_steps'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:94:in `each'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/runner.rb:94: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/backup_command.rb:25:in `perform_backup'
/usr/share/gems/gems/foreman_maintain-0.3.0/lib/foreman_maintain/cli/backup_command.rb:113: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>'
I, [2018-11-19 01:02:45-0500 #39215] INFO -- : --- Execution step 'Make sure Foreman DB is up' finished ---

Expected results: successful backup.

Additional info: Failed only for capsule.

Actions #1

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_maintain/pull/234 added
Actions #2

Updated by Anonymous over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF