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 1993682 - satellite-maintain content prepare-abort results in errors on the content prepare
Summary: satellite-maintain content prepare-abort results in errors on the content pre...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.9.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: 6.9.6
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-15 12:50 UTC by Kenny Tordeurs
Modified: 2021-09-21 14:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-21 14:37:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:3628 0 None None None 2021-09-21 14:37:32 UTC

Description Kenny Tordeurs 2021-08-15 12:50:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-0.7.11-1.el7sat.noarch
6.10

How reproducible:
100%

Steps to Reproduce:
1. Have content that needs to be migrated from pulp2 to pulp3
2. satellite-maintain content prepare 
3. satellite-maintain content prepare-abort

Actual results:

~~~
Checking for valid Katello configuraton.
Starting task.
2021-08-15 13:44:54 +0100: Pre-migrating Pulp 2 rpm content (general info) 22811/22815Migration failed, You will want to investigate: https://ktordeur-testathon.kenny.lan/foreman_tasks/tasks/ade306e4-50a1-4b98-a275-699864388b9f
rake aborted!
ForemanTasks::TaskError: Task ade306e4-50a1-4b98-a275-699864388b9f: NoMethodError: undefined method `fetch_from_list' for #<Katello::Pulp3::Api::Core:0x0000000015e1b5a8>
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/lib/katello/tasks/pulp3_migration.rake:35:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)
                                                                      [FAIL]
Failed executing foreman-rake katello:pulp3_migration, exit status 1
--------------------------------------------------------------------------------
Scenario [Prepare content for Pulp 3] failed.

The following steps ended up in failing state:

  [content-prepare]

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

~~~
[root@ktordeur-testathon ~]# satellite-maintain content prepare-abort
Running Abort all running Pulp 2 to Pulp 3 migration tasks
================================================================================
Abort all running Pulp 2 to Pulp 3 migration tasks: 
Cancelled 1 tasks.                                           [OK]
--------------------------------------------------------------------------------
~~~

Expected results:
clean abort on the content prepare and the the Migration failed line should have a whitespace or start on a newline
~~~
2021-08-15 13:44:54 +0100: Pre-migrating Pulp 2 rpm content (general info) 22811/22815Migration failed, You will want to investigate: https://ktordeur-testathon.kenny.lan/foreman_tasks/tasks/ade306e4-50a1-4b98-a275-699864388b9f
~~~

Additional info:

Comment 1 Kenny Tordeurs 2021-08-16 07:06:41 UTC
This is actually still on Satellite 6.9.4 while prepping the pulp2>pulp3 for upgrading to 6.10

Comment 2 Kenny Tordeurs 2021-08-16 09:20:20 UTC

*** This bug has been marked as a duplicate of bug 1970868 ***

Comment 3 Kenny Tordeurs 2021-08-16 12:00:53 UTC
Using this bug to track the below change as the undefined method error was fixed in https://bugzilla.redhat.com/show_bug.cgi?id=1970868

consider adding a newline or whitespace for the failure:
~~~
2021-06-10 14:54:21 +0000: Migrating rpm content to Pulp 3 5978/167886Migration failed, You will want to investigate: https://<redacted>/foreman_tasks/tasks/9026d986-1b11-41b4-96b1-642a5073bfbe
                                                                     ^^^
~~~

Comment 9 Stephen Wadeley 2021-09-15 18:35:35 UTC
Hi Kenny


How did you stop the task here:
2021-08-15 13:44:54 +0100: Pre-migrating Pulp 2 rpm content (general info) 22811/22815Migration failed,


Note in Migration Guide:
If a user attempts to halt the process using CTRL + C or by disconnecting their SSH session, the process does not terminate but continues in the background.

I found I had to use Ctrl C and then satellite-maintain content prepare-abort

but let me try that "satellite-maintain content prepare-abort" in another terminal to simulate what you did


Thank you

Comment 11 Stephen Wadeley 2021-09-15 19:10:02 UTC
Hi Kenny

Was the main  problem the 'fetch_from_list' error? or the output format?

Thank you

Comment 12 Justin Sherrill 2021-09-15 21:02:21 UTC
There was some confusion around this bug as:

1) it indicated an actual problem occurred (this has been fixed)
2) the output of the 'content prepare' command when an abort occurs is confusing and may cause the user to think an error occured when it didn't

We should handle this better and make it less confusing, although we may not be able to completely remove the problem

Comment 15 Stephen Wadeley 2021-09-16 19:08:32 UTC

Hello all

based on comment 12 and discussions, will pass this to keep the changes made so far and raise new bug to improve output of the 'content prepare' command when an abort occurs

Comment 16 Stephen Wadeley 2021-09-16 20:11:37 UTC
(In reply to Justin Sherrill from comment #12)
> There was some confusion around this bug as:
> 
> 1) it indicated an actual problem occurred (this has been fixed)
> 2) the output of the 'content prepare' command when an abort occurs is
> confusing and may cause the user to think an error occured when it didn't
> 
> We should handle this better and make it less confusing, although we may not
> be able to completely remove the problem

Bug 2005116 - Improve output of the 'content prepare' command when an abort occurs

Comment 21 errata-xmlrpc 2021-09-21 14:37:27 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 (Satellite 6.9.6 Async Bug Fix Update), 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-2021:3628


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