Bug 765789

Summary: Getting "Name Error" in pulp.log after promoting the product with applied filters
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: APIAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.1Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:12:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 747354    

Description Sachin Ghai 2011-12-09 12:43:38 UTC
Description of problem:
I created a repo and created filter to black list the packages. But when I promoted the product to next env. pulp.log raised a traceback. No error in katello production logs and filters are working in katello.

Version-Release number of selected component (if applicable):
[root@dhcp201-205 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.135-2.el6.x86_64
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-configure-0.1.31-2.el6.noarch
katello-common-0.1.135-2.el6.noarch
katello-0.1.135-2.el6.x86_64
katello-all-0.1.135-2.el6.x86_64
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-0.1.23-3.el6.noarch
katello-glue-candlepin-0.1.135-2.el6.x86_64
katello-cli-common-0.1.23-3.el6.noarch
katello-glue-foreman-0.1.135-2.el6.x86_64
katello-trusted-ssl-cert-1.0-1.noarch
katello-certs-tools-1.0.1-2.el6.noarch
[root@dhcp201-205 ~]# rpm -qa | grep pulp
katello-glue-pulp-0.1.135-2.el6.x86_64
pulp-0.0.254-4.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
mod_wsgi-3.2-6.pulp.el6.x86_64
pulp-common-0.0.254-4.el6.noarch
pulp-selinux-server-0.0.254-4.el6.noarch
python-isodate-0.4.4-3.pulp.el6.noarch
m2crypto-0.21.1.pulp-5.el6.x86_64
[root@dhcp201-205 ~]# 

How reproducible:
always

Steps to Reproduce:
1. create a provider ==> custom product ==> repo
2. create filter 
3. sync repo 
4. create changeset, update changset

Exact steps:
===========
katello> repo create --org sghai_org --name pulp_x86_64 --product pulp --url http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-15/x86_64/
Successfully created repository [ pulp_x86_64 ]
katello> filter create --name filter2 --packages grinder,gofer --org sghai_org
Successfully created filter [ filter2 ]
katello> product add_filter --name pulp --filter filter2 --org sghai_org
Added filter [ filter2 ] to product [ pulp ]
katello> repo synchronize --org sghai_org --product pulp --name pulp_x86_64
Repo [ pulp_x86_64 ] synced                                           
katello> changeset create --org sghai_org --name pulp_promo1 --env test 
Successfully created changeset [ pulp_promo1 ] for environment [ test ]
katello> changeset update  --org sghai_org --name pulp_promo1 --env test --add_product pulp
Successfully updated changeset [ pulp_promo1 ]
katello> changeset promote --org sghai_org --name pulp_promo1 --env test
Changeset [ pulp_promo1 ] promoted         
  
Actual results:
no issue in katello, filters are working fine but a traceback in pulp.log

 RepoCloneTask.progress_callback of <pulp.server.api.repo_clone_task.RepoCloneTask object at 0x7f8d46507390>>, clone_name=pulp_x86_64, relative_path=sghai_org/test/custom/pulp/pulp_x86_64, synchronizer=<pulp.server.api.synchronizers.YumSynchronizer object at 0x7f8cfc171a90>, filters=['filter1', 'filter2'], id=sghai_org-pulp-pulp_x86_64, groupid=['product:1323424477092', 'env:8', 'org:4', 'content:1323432610119'])
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 404, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 136, in _clone
    _sync(clone_id, progress_callback=progress_callback, synchronizer=synchronizer)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 272, in _sync
    progress_callback, synchronizer, max_speed, threads)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 360, in fetch_content
    added_packages = synchronizer.clone_packages_from_source(repo_id, skip_dict)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/synchronizers.py", line 306, in clone_packages_from_source
    for pkg in pkglist:
NameError: global name 'pkglist' is not defined

Expected results:


Additional info:

Comment 2 Sachin Ghai 2011-12-27 07:56:54 UTC
Verified with following katello build:

[root@dhcp201-197 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.155-1.el6.noarch
katello-configure-0.1.48-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-cli-common-0.1.31-1.el6.noarch
katello-glue-foreman-0.1.155-1.el6.noarch
katello-common-0.1.155-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-0.1.155-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-0.1.4-1.el6.noarch
katello-cli-0.1.31-1.el6.noarch
katello-glue-candlepin-0.1.155-1.el6.noarch
katello-all-0.1.155-1.el6.noarch
katello-certs-tools-1.0.1-1.el6.noarch


[root@dhcp201-197 ~]# rpm -qa | grep pulp
katello-glue-pulp-0.1.155-1.el6.noarch
m2crypto-0.21.1.pulp-5.el6.x86_64
pulp-common-0.0.254-8.el6.noarch
pulp-0.0.254-8.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
mod_wsgi-3.2-6.pulp.el6.x86_64
python-isodate-0.4.4-4.pulp.el6.noarch
pulp-selinux-server-0.0.254-8.el6.noarch
[root@dhcp201-197 ~]# 


The reported issue is no longer reproducible with above builds. So moving this to verified.

Comment 5 Mike McCune 2013-08-16 18:21:15 UTC
getting rid of 6.0.0 version since that doesn't exist