Project

General

Profile

Actions

Bug #32449

closed

pulp3_migration_stats rake task can underestimate the migration timing

Added by Ian Ballou almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1954820

Description of problem:

Internally, there is an error with the migration timing code that can cause a variable to go negative. This can occur if the user has many on-demand repositories that are included in content views.

The fix involves changing this line (https://github.com/Katello/katello/blob/KATELLO-3.18/lib/katello/tasks/pulp3_migration_stats.rake#L13) to be `Katello::RepositoryRpm.where(:repository_id => Katello::Repository.yum_type.on_demand).select(:rpm_id).distinct.count`.

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

3.18

How reproducible:

Always, if there are on-demand repositories inside of content views.

Steps to Reproduce:
1. Create any repository that is on-demand
2. Put that repository in a content view and publish it
3. Run `Katello::RepositoryRpm.where(:repository_id => Katello::Repository.yum_type.on_demand).distinct.count` in the foreman console and notice that it is negative.

Actual results:
The `on_demand_rpm_count` is negative, which causes the estimation time to be too low.

Expected results:
The `on_demand_rpm_count` is accurate.

Additional info:

Actions #1

Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ian Ballou
  • Pull request https://github.com/Katello/katello/pull/9322 added
Actions #2

Updated by Ian Ballou almost 3 years ago

  • Subject changed from pulp3_migration_stats rake task can underestimate the migration timing to pulp3_migration_stats rake task can underestimate the migration timing
  • Target version set to Katello 3.18.4
Actions #3

Updated by Ian Ballou almost 3 years ago

  • Target version changed from Katello 3.18.4 to Katello 3.18.3
Actions #4

Updated by Ian Ballou almost 3 years ago

  • Status changed from Ready For Testing to Closed
  • Triaged changed from No to Yes

Closing since the PR is now merged.

Actions

Also available in: Atom PDF