Bug 1929374 - pulp3: Ensure a migration can be interrupted within reasonable time at any stage
Summary: pulp3: Ensure a migration can be interrupted within reasonable time at any stage
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.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-16 18:33 UTC by Tanya Tereshchenko
Modified: 2021-04-21 13:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:10:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 7778 0 High CLOSED - COMPLETE Ensure a migration can be interrupted within reasonable time at any stage 2021-03-07 17:24:09 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:10:58 UTC

Description Tanya Tereshchenko 2021-02-16 18:33:49 UTC
Description of problem:

### Motivation
Users who have pulp 2 and pulp 3 on the same machine need to have a way to control when migration is running.
The migration plugin inevitably provides certain load on the system and uses resources. 
Users might want to choose windows when they run a migration. 
E.g. Run every Saturday for 4 hours at most.

If the system is large, it can take hours to migrate it, users need a way to cancel the task and free all the related resource within a reasonable timeframe.

### Potential issues
When there is a very slow db query and the task which triggered that query is cancelled, how quickly the db query will be aborted as well?

Comment 1 pulp-infra@redhat.com 2021-02-16 19:05:00 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2021-02-16 19:05:01 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-03-05 22:07:25 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2021-03-07 17:24:09 UTC
The Pulp upstream bug status is at CLOSED - COMPLETE. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-03-07 18:07:10 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 9 Tanya Tereshchenko 2021-03-18 18:39:36 UTC
For testing, it's good to try to stop the migration when it's in the middle of:
 - premigrating.content* (parent pulp task report) or
 - migrating.*,content (parent pulp task report) or
 - repo version creation/publication.distribution (pulp task group is not finished)

And then try to re-run it.

Comment 10 Lai 2021-03-19 19:12:04 UTC
Steps to retest:

1. On a large db, run migration command
2. When premigration message appears, use abort command to abort migration
3. Restart migration
4. When migration message appears for migrating rpm, erratas, group packages, etc, abort migration
5. Restart migration
6. When post migration message appears for importing rpm, erratas, group packages, ect, abort migration
7. Restart migration until finished

Expected
For 3,5,7, migration should restart without issue and should finish successfully on step 7

Actual
3,5,7, migration started without issues and finished successfully on step 7.

Tested on a clone customer db.

Verified on 6.9.0_017

Comment 13 errata-xmlrpc 2021-04-21 13:10:34 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 (Moderate: Satellite 6.9 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/RHSA-2021:1313


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