Bug 694578

Summary: Grinder 'numOldPackages' should be improved to fetch less packages.
Product: [Retired] Pulp Reporter: John Matthews <jmatthew>
Component: z_otherAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedKeywords: Triaged
Target Milestone: ---   
Target Release: Sprint 23   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:11:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488, 688298    

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.