Bug 1916759 - support pulp 2to3 migration 'reset'
Summary: support pulp 2to3 migration 'reset'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: 6.9.0
Assignee: Ian Ballou
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-15 14:55 UTC by Justin Sherrill
Modified: 2021-12-01 08:47 UTC (History)
10 users (show)

Fixed In Version: rubygem-foreman_maintain-0.7.8,tfm-rubygem-katello-3.18.1.11-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 14:48:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31654 0 Normal Closed support migration 'reset' 2021-02-24 17:16:59 UTC
Foreman Issue Tracker 31906 0 Normal Closed Add foreman-maintain content migration-reset 2021-03-02 17:42:42 UTC
Foreman Issue Tracker 32059 0 Normal Closed content migration-reset fails with "undefined local variable or method `enable_and_start_services'" 2021-03-15 18:20:03 UTC
Red Hat Product Errata RHBA-2021:1312 0 None None None 2021-04-21 14:48:29 UTC

Description Justin Sherrill 2021-01-15 14:55:03 UTC
We should support a 'reset migration command' where:

we trigger: https://pulp-2to3-migration.readthedocs.io/en/latest/restapi.html#operation/migration_plans_reset
we delete all the pulp3 href's on content units, and repositories within the katello db

This would start allow a user to start it from scratch.   This would involve a rake task and a foreman-maintain command

Comment 1 Justin Sherrill 2021-01-15 14:55:07 UTC
Created from redmine issue https://projects.theforeman.org/issues/31654

Comment 2 Justin Sherrill 2021-01-15 14:55:08 UTC
Upstream bug assigned to None

Comment 3 Bryan Kearney 2021-02-05 15:25:59 UTC
Upstream bug assigned to iballou

Comment 4 Bryan Kearney 2021-02-05 15:26:01 UTC
Upstream bug assigned to iballou

Comment 5 Bryan Kearney 2021-03-01 20:03:52 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31654 has been resolved.

Comment 7 Ian Ballou 2021-03-09 18:26:18 UTC
An issue was caught with the reset in foreman maintain, so I created a new upstream issue and made a PR. I'm attaching the new upstream issue.

Comment 8 Lai 2021-03-09 18:35:32 UTC
Steps to retest

1. Run command: satellite-maintain content migration-reset

Expected result:
Should successfully reset migration

Actual:
enable_and_start_services' for #<ForemanMaintain::Scenarios::Content::MigrationReset:0x00000002b6bb40>

Tested on 6.9.0_016.

Failing QA

Comment 10 Lai 2021-04-05 20:56:38 UTC
steps to retest:

1. Sync a custom repo or a RH repo
2. Run migration until it's completed
3. Once completed run migration-reset
4. Check pulp3 db
5. Rerun migration again until it's completed
6. Check pulp3 db


Expected result:
Migration should complete without issues and reset should reset everything back before migration occurred.

Actual result:
Migration completed without issues and reset was able to reset satellite state before migration took place.  I also checked the db and reset does work correctly.

Verified on 6.9.0_19.1

Comment 13 errata-xmlrpc 2021-04-21 14:48:24 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 Satellite Maintenance Release), 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:1312


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