Bug 669760

Summary: pulp-admin package install doesn't validate the consumer ID
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: cperry, jconnor, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 20   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-17 16:52:13 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    

Description Jay Dobies 2011-01-14 16:33:32 UTC
When specifying an invalid consumer ID, the task seems to spin for a while. I assume it's waiting to time out since it can't find the consumer to contact.

We should do a sanity check first to ensure the consumer actually exists before starting off a task that can't be cancelled.


$ pulp-admin package install -n emoticons --consumerid foo
Created task id: dc51ee4a-1ffb-11e0-97e0-5254003d10ee
Task is scheduled for: 2011-01-14 11:32
....................................................

Comment 1 Jay Dobies 2011-01-14 16:57:50 UTC
Followup: 20 minutes later the CLI is still rendering periods and the process hasn't ended yet.

Comment 2 Sayli Karmarkar 2011-01-28 20:44:14 UTC
Added validate_consumer and validate_consumergroup functions to ConsumerActions and ConsumerGroupActions classes.

$ sudo pulp-admin consumer list
+------------------------------------------+
            Consumer Information
+------------------------------------------+

Id                 	test-consumer            
Description        	None                     
Subscribed Repos   	[]                       
Additional info    	                 

$ sudo pulp-admin package install -n origin --consumerid=test-consumer11
error: operation failed: Consumer [test-consumer11] does not exist

Comment 3 Jay Dobies 2011-02-02 20:07:18 UTC
Fixed in 0.134.

Comment 4 Preethi Thomas 2011-02-08 18:22:53 UTC
verified
[root@preethi ~]# pulp-admin package install -n zsh --consumerid=test-consumer11 
error: operation failed: Consumer [test-consumer11] does not exist
[root@preethi ~]# rpm -q pulp
pulp-0.0.135-1.fc14.noarch

Comment 5 Preethi Thomas 2011-02-17 16:52:13 UTC
Closing with community release 

pulp-0.0.139-1.fc14.noarch