Bug 2098221

Summary: Pulp 3 migration stats timing is too low for very large deployments
Product: Red Hat Satellite Reporter: Ian Ballou <iballou>
Component: RepositoriesAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: Lucie Vrtelova <lvrtelov>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.9CC: jkrajice, lvrtelov, osousa, pdwyer, pmendezh, smajumda
Target Milestone: 6.9.10Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.18.1.54-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-17 17:17:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ian Ballou 2022-06-17 15:46:51 UTC
Description of problem:
The migration timing calculation performs an unnecessary "% 60", which can cause the timing to be much too low for large deployments that may take over 60 hours to complete the migration. The minutes are calculated correctly, but not the hours.

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

Satellite 6.9 -- any version

How reproducible:
100% if the migration minutes is calculated to be over 3599

Steps to Reproduce:
1. Run the migration-stats command on a machine with enough repositories and RPMs to get the `migration_minutes` above 3599: https://gitlab.cee.redhat.com/satellite/katello/-/blob/SATELLITE-6.9.0/lib/katello/tasks/pulp3_migration_stats.rake#L21
2.
3.

Actual results:
The number of hours will be too low.  For example, 3600 / 60 = 60.  60 % 60 = 0!

Expected results:
The number of hours to be correct.

Additional info:

Comment 1 Ian Ballou 2022-06-17 15:51:12 UTC
Created redmine issue https://projects.theforeman.org/issues/35079 from this bug

Comment 2 Bryan Kearney 2022-06-17 16:04:50 UTC
Upstream bug assigned to iballou

Comment 3 Bryan Kearney 2022-06-27 20:04:39 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35079 has been resolved.

Comment 5 Lucie Vrtelova 2022-11-03 08:49:30 UTC
verified on:
- tfm-rubygem-katello-3.18.1.54-1.el7sat.noarch

Fix is present in code.

Migration timing calculation looks good.

# satellite-maintain content migration-stats
Running Retrieve Pulp 2 to Pulp 3 migration statistics
================================================================================
Retrieve Pulp 2 to Pulp 3 migration statistics: 
============Migration Summary================
.
.
.
Estimated migration time based on yum content, fast hardware, and low server load: 296 hours, 40 minutes
Estimated migration time based on yum content, slow hardware, and high server load: 1186 hours, 40 minutes
.
.
.
                                                                      [OK]
--------------------------------------------------------------------------------

Comment 13 errata-xmlrpc 2022-11-17 17:17:17 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 (Important: Satellite 6.9.10 Async Security 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/RHSA-2022:8532

Comment 14 Red Hat Bugzilla 2023-09-18 04:39:34 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days