Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1916759

Summary: support pulp 2to3 migration 'reset'
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Satellite MaintainAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: apatel, aupadhye, ehelms, gtalreja, inecas, juwatts, kgaikwad, ltran, pcreech, zhunting
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 14:48:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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