Description of problem: foreman-maintain backup offline failed with undefined method `&' for "":String - All services stopped [OK] -------------------------------------------------------------------------------- Backup config files: \ Collecting config files to backup [FAIL] undefined method `&' for "":String -------------------------------------------------------------------------------- Scenario [Backup] failed. The following steps ended up in failing state: [backup-config-files] Resolve the failed steps and rerun the command. In case the failures are false positives, use --whitelist="backup-config-files" Version-Release number of selected component (if applicable): Satellite 6.6 snap 7 # rpm -qa | grep maintain satellite-maintain-0.0.1-1.el7sat.noarch rubygem-foreman_maintain-0.4.3-1.el7sat.noarch How reproducible: always Steps to Reproduce: 1. # foreman-maintain backup offline -y --features dns,tftp,dhcp,openscap /tmp/ Actual results: foreman-maintain backup offline failed. Expected results: Successful backup. Additional info: Regression.
/var/log/foreman-maintain/foreman-maintain.log showed I, [2019-06-18 03:12:32-0400 #20420] INFO -- : --- Execution step 'Stop applicable services' finished --- I, [2019-06-18 03:12:32-0400 #20420] INFO -- : --- Execution step 'Backup config files' [backup-config-files] started --- D, [2019-06-18 03:12:32-0400 #20420] DEBUG -- : Running command hostname -f with stdin nil D, [2019-06-18 03:12:32-0400 #20420] DEBUG -- : output of the command: dell-per630-fc-03.dell2.lab.eng.bos.redhat.com D, [2019-06-18 03:12:32-0400 #20420] DEBUG -- : Running command curl -w ' %{http_code}' -s --cert '/etc/foreman-proxy/foreman_ssl_cert.pem' --key '/etc/foreman-proxy/foreman_ssl_key.pem' --cacert '/etc/foreman-proxy/foreman_ssl_ca.pem' https://$(hostname):9090/features with stdin nil D, [2019-06-18 03:12:32-0400 #20420] DEBUG -- : output of the command: 000 E, [2019-06-18 03:12:32-0400 #20420] ERROR -- : undefined method `&' for "":String (NoMethodError) /usr/share/gems/gems/foreman_maintain-0.4.3/definitions/features/foreman_proxy.rb:100:in `backup_features' /usr/share/gems/gems/foreman_maintain-0.4.3/definitions/features/foreman_proxy.rb:56:in `config_files' /usr/share/gems/gems/foreman_maintain-0.4.3/definitions/procedures/backup/config_files.rb:35:in `config_files' /usr/share/gems/gems/foreman_maintain-0.4.3/definitions/procedures/backup/config_files.rb:22:in `block in run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/reporter/cli_reporter.rb:141:in `with_spinner' /usr/share/gems/gems/foreman_maintain-0.4.3/definitions/procedures/backup/config_files.rb:21:in `run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/executable.rb:139:in `__run__' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner/execution.rb:82:in `block in run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner/execution.rb:81:in `run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:116:in `run_step' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:105:in `run_steps' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:98:in `execute_scenario_steps' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:51:in `run_scenario' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:32:in `block in run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:31:in `each' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:31:in `run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/cli/base.rb:64:in `run_scenario' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/cli/backup_command.rb:25:in `perform_backup' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/cli/backup_command.rb:124: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.4.3/lib/foreman_maintain/cli.rb:32:in `run' /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run' /usr/share/gems/gems/foreman_maintain-0.4.3/bin/foreman-maintain:15:in `<top (required)>' /usr/bin/foreman-maintain:23:in `load' /usr/bin/foreman-maintain:23:in `<main>' I, [2019-06-18 03:12:32-0400 #20420] INFO -- : --- Execution step 'Backup config files' finished --- I, [2019-06-18 03:12:32-0400 #20420] INFO -- : === Scenario 'Backup' finished ===
Just to add, Also rescue scenario failed with following error. D, [2019-06-18 03:12:32-0400 #20420] DEBUG -- : === Rescue scenario found. Executing === E, [2019-06-18 03:12:33-0400 #20420] ERROR -- : The runner is already in quit state (RuntimeError) /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:44:in `run_scenario' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:94:in `block in execute_scenario_steps' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:94:in `each' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:94:in `execute_scenario_steps' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:36:in `block in run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:31:in `each' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/runner.rb:31:in `run' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/cli/base.rb:64:in `run_scenario' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/cli/backup_command.rb:25:in `perform_backup' /usr/share/gems/gems/foreman_maintain-0.4.3/lib/foreman_maintain/cli/backup_command.rb:124: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.4.3/lib/foreman_maintain/cli.rb:32:in `run' /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run' /usr/share/gems/gems/foreman_maintain-0.4.3/bin/foreman-maintain:15:in `<top (required)>' /usr/bin/foreman-maintain:23:in `load' /usr/bin/foreman-maintain:23:in `<main>' I, [2019-06-18 03:12:33-0400 #20420] INFO -- : foreman-maintain command finished with 1
Thanks for the report. Regression confirmed. It was caused by moving backup of configs to offline mode. We are trying to detect features on proxy that is down at that time. I'm working on a fix.
Created redmine issue https://projects.theforeman.org/issues/27070 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27070 has been resolved.
Updated upstream issue with pull-request https://github.com/theforeman/foreman_maintain/pull/268 in which it is fixed. This change is not yet released in upstream.
Kavita, How soon can we get a 0.4.z cut for foreman_maintain with the fix included?
VERIFIED Version tested: Satellite 6.6.0 snap 10 # rpm -qa | grep maintain satellite-maintain-0.0.1-1.el7sat.noarch rubygem-foreman_maintain-0.4.4-1.el7sat.noarch tests/test_backup.py::test_positive_backup_online PASSED [ 6%] tests/test_backup.py::test_positive_backup_online_skip_pulp_content PASSED [ 10%] tests/test_backup.py::test_positive_backup_online_preserve_directory PASSED [ 13%] tests/test_backup.py::test_positive_backup_online_split_pulp_tar PASSED [ 16%] tests/test_backup.py::test_positive_backup_online_incremental PASSED [ 20%] tests/test_backup.py::test_positive_backup_online_caspule_features PASSED [ 23%] tests/test_backup.py::test_positive_backup_online_all PASSED [ 26%] tests/test_backup.py::test_positive_backup_offline PASSED [ 30%] tests/test_backup.py::test_positive_backup_offline_skip_pulp_content PASSED [ 33%] tests/test_backup.py::test_positive_backup_offline_preserve_directory PASSED [ 36%] tests/test_backup.py::test_positive_backup_offline_split_pulp_tar PASSED [ 40%] tests/test_backup.py::test_positive_backup_offline_incremental PASSED [ 43%] tests/test_backup.py::test_positive_backup_offline_capsule_features PASSED [ 46%] tests/test_backup.py::test_positive_backup_offline_logical PASSED [ 50%] tests/test_backup.py::test_positive_backup_offline_all PASSED [ 53%] tests/test_backup.py::test_negative_backup_online_nodir PASSED [ 56%] tests/test_backup.py::test_negative_backup_offline_nodir PASSED [ 60%] tests/test_backup.py::test_negative_backup_online_incremental_nodir PASSED [ 63%]
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, 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-2019:3181