Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1631944 - foreman-maintain restore failed: undefined method `keys'
Summary: foreman-maintain restore failed: undefined method `keys'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.4.0
Assignee: Martin Bacovsky
QA Contact: Mike McCune
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-22 08:45 UTC by Nikhil Kathole
Modified: 2019-11-05 23:35 UTC (History)
6 users (show)

Fixed In Version: rubygem-foreman_maintain-0.2.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 15:16:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
console output (7.22 KB, text/plain)
2018-09-27 16:40 UTC, Mike McCune
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25012 0 Normal Closed foreman-maintain restore failed: undefined method `keys' 2020-09-19 16:27:43 UTC
Red Hat Product Errata RHBA-2018:2926 0 None None None 2018-10-16 15:17:03 UTC

Description Nikhil Kathole 2018-09-22 08:45:39 UTC
Description of problem:

foreman-maintain restore failed at while migrating pulp db

--------------------------------------------------------------------------------
Migrate pulp db: 
/ Migrating pulp                                                      [FAIL]    
undefined method `keys' for [Systemd(rh-mongodb34-mongod [5])]:Array
--------------------------------------------------------------------------------
Scenario [Restore backup] failed.

The following steps ended up in failing state:

  [pulp-migrate]

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



Version-Release number of selected component (if applicable):
Satellite 6.4 snap 23

# rpm -qa | grep maintain
rubygem-foreman_maintain-0.2.10-1.el7sat.noarch


How reproducible: always


Steps to Reproduce:
1. foreman-maintain backup online /tmp/
2. foreman-maintain restore /tmp/foreman-proxy-backup-2018-09-22-04-36-10

Actual results: restore failed showing

E, [2018-09-22 04:41:05-0400 #13130] ERROR -- : undefined method `keys' for [Systemd(rh-mongodb34-mongod [5])]:Array (NoMethodError)
/usr/share/gems/gems/foreman_maintain-0.2.10/definitions/procedures/pulp/migrate.rb:10:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/reporter/cli_reporter.rb:139:in `with_spinner'
/usr/share/gems/gems/foreman_maintain-0.2.10/definitions/procedures/pulp/migrate.rb:9:in `run'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/executable.rb:139:in `__run__'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner/execution.rb:83:in `block (2 levels) in run'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner/execution.rb:107:in `capture_errors'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner/execution.rb:82:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner/execution.rb:101:in `with_metadata_calculation'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner/execution.rb:81:in `run'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner.rb:116:in `run_step'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner.rb:105:in `run_steps'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner.rb:98:in `execute_scenario_steps'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner.rb:51:in `run_scenario'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner.rb:32:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner.rb:31:in `each'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/runner.rb:31:in `run'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/cli/base.rb:47:in `run_scenario'
/usr/share/gems/gems/foreman_maintain-0.2.10/lib/foreman_maintain/cli/restore_command.rb:16: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.10/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.10/bin/foreman-maintain:15:in `<top (required)>'
/usr/bin/foreman-maintain:23:in `load'
/usr/bin/foreman-maintain:23:in `<main>'


Expected results: Restore should successful.


Additional info:

Comment 3 Martin Bacovsky 2018-09-24 06:28:47 UTC
Created redmine issue https://projects.theforeman.org/issues/25012 from this bug

Comment 4 Satellite Program 2018-09-24 08:03:15 UTC
Upstream bug assigned to apatel

Comment 5 Satellite Program 2018-09-24 08:03:19 UTC
Upstream bug assigned to apatel

Comment 6 Satellite Program 2018-09-24 14:03:39 UTC
Upstream bug assigned to mbacovsk

Comment 7 Satellite Program 2018-09-24 14:03:42 UTC
Upstream bug assigned to mbacovsk

Comment 9 Mike McCune 2018-09-27 16:40:13 UTC
VERIFIED

I tested this on 6.4 SNAP 24, worked perfectly.

Console output attached

Comment 10 Mike McCune 2018-09-27 16:40:39 UTC
Created attachment 1487825 [details]
console output

Comment 12 errata-xmlrpc 2018-10-16 15:16:56 UTC
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-2018:2926


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