Bug 861409 - Pulpv2 does not provide total size and rpm count on sync
Summary: Pulpv2 does not provide total size and rpm count on sync
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: Master
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: katello-v2-pulp
TreeView+ depends on / blocked
 
Reported: 2012-09-28 13:52 UTC by Justin Sherrill
Modified: 2017-02-06 13:44 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-11-07 21:41:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2012-09-28 13:52:14 UTC
Description of problem:

In pulpv1 each sync task status object would include the total size of the repo as well as the total package count.  

Pulpv2 does away with this and only includes the delta count and size. 

It would help katello greatly if either the total counts were added back, or existing counts were added such that we could combine existing + delta to get the new total.

Comment 1 Jay Dobies 2013-01-31 20:39:29 UTC
The total size of the repo is tricky. It's, oddly, due to the fact that the sync is more efficient in v2 since we know before starting the process what it is we need to download.

What I could see is a new API outside of any plugin that would iterate over all associated units and sum up the file sizes. Putting this off to 2.2 to give us time to investigate that possibility.

Comment 2 Jay Dobies 2013-04-01 17:29:04 UTC
Assigning to Mike to handle with the yum importer rewrite.

Comment 3 Michael Hrivnak 2013-09-04 18:03:56 UTC
Talking just now, Justin indicated that it is sufficient for them to have the ability to query for this data.

To get the size of each unit, a query can be done like this:

POST path: /pulp/api/v2/repositories/<repo id>/search/units/

POST data: {"criteria": {"fields": {"unit": ["name", "size"], "association": []}, "type_ids": ["rpm"], "filters": {"unit": {}}}}


You can of course just count the number of units you get back, or to get the counts of each unit type in a repo, do this query:

POST path: /pulp/api/v2/repositories/search/

POST data: {'criteria': {'fields': ['name', 'content_unit_counts']}}

Comment 4 Justin Sherrill 2013-09-04 18:10:48 UTC
Reopening for me to get some timings to see how performant this is with a larger number of repositories.

Comment 5 Chris Duryee 2014-11-07 21:41:31 UTC
closing BZ per jsherrill

Comment 6 Justin Sherrill 2017-02-06 13:35:33 UTC
Removing Needinfo

Comment 7 Justin Sherrill 2017-02-06 13:44:07 UTC
trying again


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