Bug 1967131 - Pulp3 migration failed with " Katello::Errors::Pulp3Error: null value in column "downloaded" violates not-null constraint" error.
Summary: Pulp3 migration failed with " Katello::Errors::Pulp3Error: null value in col...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.9.4
Assignee: satellite6-bugs
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-02 13:20 UTC by Devendra Singh
Modified: 2021-07-29 13:03 UTC (History)
9 users (show)

Fixed In Version: python-pulp_2to3_migration-0.11.2-1.el7pc
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1973360 (view as bug list)
Environment:
Last Closed: 2021-07-29 12:58:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 8863 0 Normal CLOSED - CURRENTRELEASE Very old pulp content that does not have `downloaded` flag fails during pre-migration 2021-06-14 15:08:23 UTC
Red Hat Product Errata RHBA-2021:2948 0 None None None 2021-07-29 13:03:39 UTC

Description Devendra Singh 2021-06-02 13:20:42 UTC
Description of problem: Pulp3 migration failed with  " Katello::Errors::Pulp3Error: null value in column "downloaded" violates not-null constraint" error.


Version-Release number of selected component (if applicable):
6.9.z

How reproducible:
always.

Steps to Reproduce:
1. Prepare the 6.9.z setup using the upgrade template.
2. Run the pre-migration steps before running the upgrade for 6.10 snap2.

#satellite-maintain prep-6.10-upgrade

Running Preparations for the Satellite 6.10 upgrade
================================================================================
Preparations for the Satellite 6.10 upgrade: 
prep-6.10-upgrade may take a while depending on the size of /var/lib/pulp/content
| $ chown -R :pulp /var/lib/pulp/content                              [OK]      
--------------------------------------------------------------------------------

3  Ran the pulp migration command "satellite-maintain content prepare" and it gets failed with  " Katello::Errors::Pulp3Error: null value in column "downloaded" violates not-null constraint" error. 

# satellite-maintain content prepare
Running Prepare content for Pulp 3
================================================================================
................
2021-06-02 09:07:55 -0400: Initial Migration steps complete.Migration failed, You will want to investigate: https://xyz.com/foreman_tasks/tasks/e0d563fa-453c-42f2-a6f7-56105a8ae0a1
rake aborted!
ForemanTasks::TaskError: Task e0d563fa-453c-42f2-a6f7-56105a8ae0a1: Katello::Errors::Pulp3Error: null value in column "downloaded" violates not-null constraint
DETAIL:  Failing row contains (da6b02a7-01a6-4d46-98c2-898bbfe680b1, 2021-06-02 13:08:01.198789+00, 2021-06-02 13:08:01.198819+00, 9844bb2a-04b7-4b32-90ae-e757d7aa2b7a, rpm, 1479666109, /var/lib/pulp/content/rpm/ConsoleKit/0.4.1/6.el6/x86_64/0d0dadff..., null, null, null, ).
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/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.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)
                                                                      [FAIL]

Actual results:
Pulp3 migration failed with the error "Katello::Errors::Pulp3Error: null value in column "downloaded" violates not-null constraint" error."

Expected results:
Pulp migration should complete successfully.

Additional info:

Comment 11 pulp-infra@redhat.com 2021-06-04 12:02:32 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2021-06-04 12:02:35 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 13 Tanya Tereshchenko 2021-06-08 10:02:47 UTC
Please try this patch and let us know if the problem is solved.
https://patch-diff.githubusercontent.com/raw/pulp/pulp-2to3-migration/pull/379.patch

Comment 16 pulp-infra@redhat.com 2021-06-08 16:25:59 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 18 pulp-infra@redhat.com 2021-06-08 17:47:34 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 22 pulp-infra@redhat.com 2021-06-14 15:08:23 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 26 Devendra Singh 2021-07-16 18:02:49 UTC
Verified with 6.9.4 Snap1

Verification points:

1. Prepared the 6.9.z setup using the upgrade template.
2. Ran upgrade from 6.9.z to 6.9.4 Snap1 and it completed successfully.
3. Ran the pre-migration steps 

satellite-maintain content migration-stats
Running Retrieve Pulp 2 to Pulp 3 migration statistics
================================================================================
Retrieve Pulp 2 to Pulp 3 migration statistics: 
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
============Migration Summary================
Migrated/Total RPMs: 0/112393
Migrated/Total errata: 0/65255
Migrated/Total repositories: 0/104

4. Ran the pulp migration and it completed successfully, I didn't see the "Katello::Errors::Pulp3Error: null value in column "downloaded" violates not-null constraint" error" error.
5- foreman-maintain content migration-stats
# foreman-maintain content migration-stats
Running Retrieve Pulp 2 to Pulp 3 migration statistics
================================================================================
Retrieve Pulp 2 to Pulp 3 migration statistics: 
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
============Migration Summary================
Migrated/Total RPMs: 103488/113108
Migrated/Total errata: 65255/65320
Migrated/Total repositories: 104/104

6- Verified the fixed in the package

# rpm -qa|grep "python3-pulp-2to3-migration-0.11.2-1.el7pc.noarch"
python3-pulp-2to3-migration-0.11.2-1.el7pc.noarch

Comment 31 errata-xmlrpc 2021-07-29 12:58:50 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.4 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:2948

Comment 32 errata-xmlrpc 2021-07-29 13:02: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 (Satellite 6.9.4 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:2948


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