Bug 1022553

Summary: Needs a user friendly error message when using consumer-id or or repo-id that does not exist.
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: user-experienceAssignee: Jeremy Cline <jcline>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: low    
Version: MasterCC: jcline, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-24 21:33:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Preethi Thomas 2013-10-23 13:55:33 UTC
Description of problem:


Needs a user friendly error message when using consumer-id or or repo-id that does not exist.

Version-Release number of selected component (if applicable):

[root@qe-blade-03 ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.23.beta.fc19.noarch

How reproducible:


Steps to Reproduce:
1. try to unbind a consumer with a non existing value for --repo-id or --consumer-id
2.
3.

Actual results:

[root@qe-blade-03 ~]# pulp-admin rpm consumer unbind --repo-id zoo --consumer-id zoo-copy
The following resource(s) could not be found:

  {u'distributor_id': u'yum_distributor', u'repo_id': u'zoo', u'consumer_id':
u'zoo-copy'} (bind_id)


[root@qe-blade-03 ~]# pulp-admin rpm consumer unbind --repo-id zoo-test --consumer-id consumer2
The following resource(s) could not be found:

  {u'distributor_id': u'yum_distributor', u'repo_id': u'zoo-test',
u'consumer_id': u'consumer2'} (bind_id)


Expected results:


Additional info:

Comment 1 Jeremy Cline 2014-08-05 16:06:00 UTC
https://github.com/pulp/pulp/pull/1080

Comment 2 Randy Barlow 2014-08-13 19:59:06 UTC
This was fixed in the 2.4.1-0.1.alpha build.

Comment 3 Preethi Thomas 2014-08-14 15:53:46 UTC
Fails-qa

if the the repo you are trying to unbind a repo that is not bound to the consumer, it still gives the error

[root@mgmt6 ~]#  pulp-admin rpm consumer unbind --repo-id zoo --consumer-id client1
The following resource(s) could not be found:

  {u'distributor_id': u'yum_distributor', u'repo_id': u'zoo', u'consumer_id':
u'client1'} (bind_id)


[root@mgmt6 ~]# 


[root@mgmt6 ~]# rpm -qa pulp-server
pulp-server-2.4.1-0.1.alpha.el6.noarch
[root@mgmt6 ~]#

Comment 4 Jeremy Cline 2014-08-15 20:48:56 UTC
https://github.com/pulp/pulp_rpm/pull/547

Comment 5 Chris Duryee 2014-09-30 13:52:23 UTC
build: 2.5.0-0.6.beta

Comment 6 Preethi Thomas 2014-10-07 15:40:30 UTC
[root@cloud-qe-15 ~]# rpm -qa pulp-server
pulp-server-2.5.0-0.7.beta.el7.noarch
[root@cloud-qe-15 ~]# 

[root@cloud-qe-15 ~]# pulp-admin rpm consumer unbind --repo-id zoo --consumer-id client1
The following resource(s) could not be found:

  client1 (consumer_id)
  zoo (repo_id)
  yum_distributor (distributor_id)


[root@cloud-qe-15 ~]# pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
Successfully created repository [zoo]

[root@cloud-qe-15 ~]# 
[root@cloud-qe-15 ~]# 
[root@cloud-qe-15 ~]# pulp-admin rpm consumer unbind --repo-id zoo --consumer-id client1
The following resource(s) could not be found:

  client1 (consumer_id)