Project

General

Profile

Actions

Bug #25433

closed

Snapshot backup fails when /var/lib/pulp/0005_puppet_module_name_change.txt i smissing

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

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

Description

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

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
  1. printf '[]' > /var/lib/pulp/0005_puppet_module_name_change.txt
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/231 added
Actions #2

Updated by Martin Bacovsky over 5 years ago

  • Subject changed from Snapshot backup fails when /var/lib/pulp/0005_puppet_module_name_change.txt i smissing to Snapshot backup fails when /var/lib/pulp/0005_puppet_module_name_change.txt i smissing
  • Category set to Procedure
  • Assignee changed from Anurag Patel to Martin Bacovsky
Actions #3

Updated by Ivan Necas over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF