Bug 694578 - Grinder 'numOldPackages' should be improved to fetch less packages.
Summary: Grinder 'numOldPackages' should be improved to fetch less packages.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 23
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close 688298
TreeView+ depends on / blocked
 
Reported: 2011-04-07 17:07 UTC by John Matthews
Modified: 2011-08-16 12:22 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:11:14 UTC
Embargoed:


Attachments (Terms of Use)

Description John Matthews 2011-04-07 17:07:17 UTC
If running with "newest=True" and "numOldPackages=2".
Grinder will fetch all version of all rpms in the repo.
Then it will delete all older rpms that are older than specified versions.

This is wasteful, we should modify 'prepareRPMs' to only fetch the rpms we want.

Comment 1 John Matthews 2011-04-27 14:55:17 UTC
The description for this bug should have read:
"newest=False" and "numOldPackages=2".

Issue was that grinder would download all available packages, then it would remove the older packages no longer desired.

Fix made was to look at the download list of packages and remove the old packages there.  This way we don't need to download packages then immediately delete them.

Comment 2 John Matthews 2011-04-27 16:41:45 UTC
Commit in grinder here:
http://git.fedorahosted.org/git/?p=grinder.git;a=commitdiff;h=4baf88f89c0dc72e6e277cf037c3309ae1434777


QE:  I added a unit test to address this, you may like to refer to it.

cd grinder/test/unit
nosetests test_yum_syncs.py::TestYumSync.test_sync_number_old_packages

Comment 3 Jay Dobies 2011-04-27 20:11:36 UTC
Fixed in Pulp 0.172, grinder 0.96.

Comment 4 Preethi Thomas 2011-04-29 13:58:00 UTC
[root@preethi unit]# rpm -q pulp
pulp-0.0.172-1.fc14.noarch


verified

script ran successfully

[root@preethi unit]# python test_yum_syncs.py
[root@preethi unit]#

Comment 5 Preethi Thomas 2011-08-16 12:11:14 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 6 Preethi Thomas 2011-08-16 12:22:48 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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