Bug 861409 - Pulpv2 does not provide total size and rpm count on sync [NEEDINFO]
Pulpv2 does not provide total size and rpm count on sync
Status: CLOSED NOTABUG
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
Master
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: pulp-bugs
Preethi Thomas
: Reopened, Triaged
Depends On:
Blocks: katello-v2-pulp
  Show dependency treegraph
 
Reported: 2012-09-28 09:52 EDT by Justin Sherrill
Modified: 2014-11-07 16:41 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-07 16:41:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
jsherril: needinfo? (jsherril)


Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2012-09-28 09:52:14 EDT
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 15:39:29 EST
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 13:29:04 EDT
Assigning to Mike to handle with the yum importer rewrite.
Comment 3 Michael Hrivnak 2013-09-04 14:03:56 EDT
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 14:10:48 EDT
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 16:41:31 EST
closing BZ per jsherrill

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