Description of problem: When /var/lib/pulp/0005_puppet_module_name_change.txt is missing the backup fail with Backup Pulp data: \ Collecting Pulp data [FAIL] no implicit conversion of nil into String -------------------------------------------------------------------------------- Scenario [Backup] failed. The following steps ended up in failing state: [backup-pulp] Resolve the failed steps and rerun the command. In case the failures are false positives, use --whitelist="backup-pulp" in the output. In /var/log/foreman-maintain/foreman-maintain.log we can find I, [2018-11-02 07:28:42+0100 #1086] INFO -- : --- Execution step 'Backup Pulp data' [backup-pulp] started --- E, [2018-11-02 08:08:31+0100 #1086] ERROR -- : no implicit conversion of nil into String (TypeError) /usr/share/ruby/fileutils.rb:125:in `chdir' /usr/share/ruby/fileutils.rb:125:in `cd' /usr/share/gems/gems/foreman_maintain-0.2.11/definitions/procedures/backup/pulp.rb:17:in `block in run' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/reporter/cli_reporter.rb:141:in `with_spinner' /usr/share/gems/gems/foreman_maintain-0.2.11/definitions/procedures/backup/pulp.rb:16:in `run' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/executable.rb:139:in `__run__' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner/execution.rb:82:in `block in run' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner/execution.rb:81:in `run' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner.rb:116:in `run_step' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner.rb:105:in `run_steps' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner.rb:98:in `execute_scenario_steps' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner.rb:51:in `run_scenario' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner.rb:32:in `block in run' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner.rb:31:in `each' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/runner.rb:31:in `run' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/cli/base.rb:47:in `run_scenario' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/cli/backup_command.rb:25:in `perform_backup' /usr/share/gems/gems/foreman_maintain-0.2.11/lib/foreman_maintain/cli/backup_command.rb:145: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.2.11/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.2.11/bin/foreman-maintain:15:in `<top (required)>' /usr/bin/foreman-maintain:23:in `load' /usr/bin/foreman-maintain:23:in `<main>' I, [2018-11-02 08:08:31+0100 #1086] INFO -- : --- Execution step 'Backup Pulp data' finished --- Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. /var/lib/pulp/0005_puppet_module_name_change.txt 2. foreman-maintain backup snapshot /tmp 3. Actual results: Backup fail Expected results: Backup finishes successfully Additional info: We use /var/lib/pulp/0005_puppet_module_name_change.txt to detect pulp root on the mounted snapshot. The file is just a migration log and may be missing due to failed migration or manual removal. Backup shouldn't relay on it. As a workaround the file could be recreated with # printf '[]' > /var/lib/pulp/0005_puppet_module_name_change.txt
Created redmine issue https://projects.theforeman.org/issues/25433 from this bug
Severity set to Medium as we don't know yet when and how the file can be missing from the fs. The workaround is confirmed to work.
Upstream bug assigned to apatel
Upstream bug assigned to mbacovsk
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25433 has been resolved.
This issue is fixed in foreman-maintain 0.4.0 and onwards so marking this BZ as ON_QA
The current version of foreman maintain contains this fix.