Bug 1648370 - Snapshot backup fails when /var/lib/pulp/0005_puppet_module_name_change.txt i smissing
Summary: Snapshot backup fails when /var/lib/pulp/0005_puppet_module_name_change.txt i...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: Lucie Vrtelova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-09 14:43 UTC by Martin Bacovsky
Modified: 2022-03-13 16:01 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-05 16:11:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25433 0 Normal Closed Snapshot backup fails when /var/lib/pulp/0005_puppet_module_name_change.txt i smissing 2021-02-02 12:33:33 UTC

Description Martin Bacovsky 2018-11-09 14:43:04 UTC
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

Comment 2 Martin Bacovsky 2018-11-12 12:15:16 UTC
Created redmine issue https://projects.theforeman.org/issues/25433 from this bug

Comment 3 Martin Bacovsky 2018-11-12 12:23:30 UTC
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.

Comment 4 Satellite Program 2018-11-12 13:01:57 UTC
Upstream bug assigned to apatel

Comment 7 Satellite Program 2018-12-06 21:02:56 UTC
Upstream bug assigned to mbacovsk

Comment 8 Satellite Program 2018-12-06 21:03:00 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25433 has been resolved.

Comment 10 Kavita 2019-07-12 09:25:16 UTC
This issue is fixed in foreman-maintain 0.4.0 and onwards so marking this BZ as ON_QA

Comment 12 Bryan Kearney 2020-03-05 16:11:24 UTC
The current version of foreman maintain contains this fix.


Note You need to log in before you can comment on or make changes to this bug.