Bug 754993 - Package filter doesn't affect packages in API
Summary: Package filter doesn't affect packages in API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: Sprint 30
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-18 14:04 UTC by Ivan Necas
Modified: 2015-03-23 01:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:15:38 UTC


Attachments (Terms of Use)

Description Ivan Necas 2011-11-18 14:04:03 UTC
Description of problem:
After cloning a repo with a filter, the API call for packages of the new repo still returns the blacklisted package. The blacklisted package is correctly missing in the /var/lib/pulp/repos/, but not in the API

Version-Release number of selected component (if applicable):
pulp-0.0.244-5.fc15.noarch
m2crypto-0.21.1.pulp-5.fc15.x86_64
pulp-client-lib-0.0.244-5.fc15.noarch
grinder-0.0.127-1.fc15.noarch
pulp-admin-0.0.244-5.fc15.noarch
python-gofer-0.54-1.fc15.noarch
gofer-0.54-1.fc15.noarch
pulp-common-0.0.244-5.fc15.noarch
mod_wsgi-3.2-6.pulp.fc15.x86_64


How reproducible:
Always

Steps to Reproduce:
1. pulp-admin -u admin -p admin repo create --preserve_metadata false --feed "http://lzap.fedorapeople.org/fakerepos/zoo/" --arch "noarch" --content_type "yum" --name zoo --id zoo

2. pulp-admin -u admin -p admin filter create --id lion --type blacklist --package "lion*"
3. pulp-admin -u admin -p admin repo sync --id zoo
4. pulp-admin -u admin -p admin repo clone --id zoo --clone_id "zoo-clone" --filter lion
5. pulp-admin -u admin -p admin repo content --id zoo-clone
  
Actual results:
Content of the cloned repo (and api call for packages) contains lion in it's packages. In repos folder the lion package is missing.

Expected results:
Blacklisted lion package should not be in the content of repo and in cloned repo API

Additional info:

Blocker for katello filters scenario.
related bz https://bugzilla.redhat.com/show_bug.cgi?id=754021

Comment 1 Sayli Karmarkar 2011-11-30 18:05:32 UTC
This is fixed as part of https://bugzilla.redhat.com/show_bug.cgi?id=754807

$ sudo pulp-admin -u admin -p admin repo content --id zoo-clone
+------------------------------------------+
           Contents of zoo-clone
+------------------------------------------+

Packages in zoo-clone: 

walrus-0.3-0.8.noarch.rpm
cheetah-0.3-0.8.noarch.rpm
elephant-0.3-0.8.noarch.rpm
giraffe-0.3-0.8.noarch.rpm
monkey-0.3-0.8.noarch.rpm
penguin-0.3-0.8.noarch.rpm
squirrel-0.3-0.8.noarch.rpm

Errata in zoo-clone: 

RHEA-2010:9983
RHEA-2010:9984

Files in zoo-clone: 

 none

Comment 2 Preethi Thomas 2011-11-30 18:38:14 UTC
verified
[root@katello-test ~]# rpm -q pulp
pulp-0.0.252-1.el6.noarch


[root@katello-test ~]# pulp-admin -u admin -p admin filter list
+------------------------------------------+
              Available Filters
+------------------------------------------+

Id           :               	blacklist                
Description  :               	blacklist                
Type         :               	blacklist                
Package List :               	['grinder', 'gofer']     


[root@katello-test ~]# pulp-admin -u admin -p admin repo clone --id=pulp --clone_id=pulp-clone2 --feed=parent -f blacklist -F
Repository [pulp] is being cloned as [pulp-clone2]
Clone: Finished
Item Details: 
RPMs: 16/18


[root@katello-test ~]# pulp-admin -u admin -p admin repo content list --id=pulp-clone2
+------------------------------------------+
           Contents of pulp-clone2
+------------------------------------------+

Packages in pulp-clone2: 

m2crypto-debuginfo-0.21.1.pulp-5.fc16.x86_64.rpm
mod_wsgi-3.2-6.pulp.fc16.x86_64.rpm
pulp-common-0.0.252-1.fc16.noarch.rpm
mod_wsgi-debuginfo-3.2-6.pulp.fc16.x86_64.rpm
pulp-admin-0.0.252-1.fc16.noarch.rpm
python-oauth2-1.5.170-2.pulp.fc16.noarch.rpm
python-gofer-0.61-1.fc16.noarch.rpm
pulp-0.0.252-1.fc16.noarch.rpm
pulp-client-lib-0.0.252-1.fc16.noarch.rpm
m2crypto-0.21.1.pulp-5.fc16.x86_64.rpm
python-qpid-0.7.946106-1.fc16.noarch.rpm
python-rhsm-0.96.4-1.fc16.noarch.rpm
python-isodate-0.4.4-3.pulp.fc16.noarch.rpm
pulp-consumer-0.0.252-1.fc16.noarch.rpm
pulp-cds-0.0.252-1.fc16.noarch.rpm
python-webpy-0.32-8.fc16.noarch.rpm

Errata in pulp-clone2: 

 none

Files in pulp-clone2: 

 test.txt

[root@katello-test ~]#

Comment 3 Preethi Thomas 2012-02-24 20:15:38 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 4 Preethi Thomas 2012-02-24 20:17:15 UTC
Pulp v1.0 is released.


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