Bug 758452 - error removing distribution
Summary: error removing distribution
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-29 20:21 UTC by Preethi Thomas
Modified: 2015-03-23 01:11 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Preethi Thomas 2011-11-29 20:21:16 UTC
Description of problem:

I see ValueError: list.index(x): x not in list when trying to remove distribution from a repo. The first time I did remove distribution I did not see the error. but I resynced the repo and tried the remove operation again and got the error

Version-Release number of selected component (if applicable):
[root@katello-test ~]# rpm -q pulp
pulp-0.0.252-1.el6.noarch
[root@katello-test ~]# 


How reproducible:


Steps to Reproduce:
1. Sync a repo with distribution
2. do a remove_distribution operation on the repo
3. re sync the repo to sync the distribution again
4. Try the remove operation again
  
Actual results:
[root@katello-test ~]# pulp-admin -u admin -p admin repo sync --id=f15 -FSync for repository f15 started
Sync: Finished
0/2941 new items downloaded
2941/2941 existing items processed

Item Details: 
Tree Files: 6/6
RPMs: 2935/2935

[root@katello-test ~]# pulp-admin -u admin -p admin distribution list
+------------------------------------------+
       List of Available Distributions
+------------------------------------------+

Id                    	ks-Fedora-Fedora-15-x86_64
Description           	ks-Fedora-Fedora-15-x86_64
Family                	Fedora                   
Variant               	Fedora                   
Version               	15                       
Arch                  	x86_64                   
URL                   	http://katello-test.usersys.redhat.com/pulp/ks/released/F-15/GOLD/Fedora/x86_64/os/
Timestamp             	2011-05-13T15:44:30      


[root@katello-test ~]# 
[root@katello-test ~]# 
[root@katello-test ~]# 
[root@katello-test ~]# pulp-admin -u admin -p admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	pulp                     
Name               	pulp                     
Repo URL           	https://katello-test.usersys.redhat.com/pulp/repos/repos/pulp/pulp/testing/6Server/x86_64/
Feed URL           	http://repos.fedorapeople.org/repos/pulp/pulp/testing/6Server/x86_64/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	19                       
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	False                    
Checksum Type      	sha256                   


Id                 	f15                      
Name               	f15                      
Repo URL           	https://katello-test.usersys.redhat.com/pulp/repos/released/F-15/GOLD/Fedora/x86_64/os/
Feed URL           	http://download.devel.redhat.com/released/F-15/GOLD/Fedora/x86_64/os/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	2935                     
Files              	0                        
Distributions      	ks-Fedora-Fedora-15-x86_64
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	False                    
Checksum Type      	sha256                   


[root@katello-test ~]# pulp-admin -u admin -p admin repo remove_distribution --id=f15 -d ks-Fedora-Fedora-15-x86_64
error:  error: operation failed: ValueError: list.index(x): x not in list
Expected results:


Additional info:


2011-11-29 15:15:26,100 17309:140606806415104: pulp.server.webservices.controllers.decorators:ERROR: decorators:52 Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 1672, in POST
    return action(id)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 1650, in remove_distribution
    api.remove_distribution(id, data['distributionid'])
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 1815, in remove_distribution
    del distro_obj['repoids'][distro_obj['repoids'].index(repoid)]
ValueError: list.index(x): x not in list

Comment 1 Preethi Thomas 2011-12-01 17:22:37 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.253-1.fc15.noarch

[root@preethi ~]# pulp-admin -u admin -p admin repo sync --id=f15 -FSync for repository f15 started
Sync: Finished
0/2941 new items downloaded
2941/2941 existing items processed

Item Details: 
Tree Files: 6/6
RPMs: 2935/2935

[root@preethi ~]# pulp-admin  repo  remove_distribution  --id=f15 -d ks-Fedora-Fedora-15-x86_64 
Successfully removed distribution id ks-Fedora-Fedora-15-x86_64 to repo [f15].

[root@preethi ~]#

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

Comment 3 Preethi Thomas 2012-02-24 20:16:47 UTC
Pulp v1.0 is released.


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