Bug 683861 - Feed type checking error message no longer says what the error is
Summary: Feed type checking error message no longer says what the error is
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 21
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-03-10 14:33 UTC by Jay Dobies
Modified: 2011-08-16 12:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:11:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2011-03-10 14:33:21 UTC
$ pulp-admin repo update --id simple-repo --feed http://repos.fedorapeople.org/repos/pulp/pulp/fedora-14/x86_64
error: operation failed: 


This used to say the valid types are yum, local, and rhn. Now that information is only seen in the pulp.log:

2011-03-10 09:34:20,229 [ERROR][Dummy-5] report_error() @ base.py:56 - Traceback (most recent call last):
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/base.py", line 52, in report_error
    return method(self, *args, **kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/compat.py", line 40, in _decorator
    return decorator(*args,**kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/base.py", line 131, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/repositories.py", line 165, in PUT
    api.update(repo_data)
  File "/home/jdob/code/pulp/src/pulp/server/compat.py", line 40, in _decorator
    return decorator(*args,**kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/auditing.py", line 207, in _audit
    result = method(*args, **kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/api/repo.py", line 598, in update
    ds = model.RepoSource(value)
  File "/home/jdob/code/pulp/src/pulp/server/db/model/resource.py", line 289, in __init__
    self.parse_feed(url)
  File "/home/jdob/code/pulp/src/pulp/server/db/model/resource.py", line 298, in parse_feed
    % self.supported_types)
PulpException: "Invalid type.  valid types are ['yum', 'local', 'rhn']"



This error message should be fixed to show the user what they did wrong.

Comment 1 Jay Dobies 2011-03-10 14:34:58 UTC
I retract the statement about this being a regression. This was for repo update; the error message might be getting masked in that functionality.

Comment 2 Jay Dobies 2011-03-10 14:56:35 UTC
I retract my retraction. This is an issue for repo create as well:

# Missing type in feed
$ pulp-admin repo create --id pulp-32 --feed http://repos.fedorapeople.org/repos/pulp/pulp/fedora-13/i386
error: operation failed: 

# Next command specified the feed type
$ pulp-admin repo create --id pulp-32 --feed yum:http://repos.fedorapeople.org/repos/pulp/pulp/fedora-13/i386
Successfully created repository [ pulp-32 ]

Comment 3 John Matthews 2011-03-10 19:35:31 UTC
Turns out there was an extra '\n' in the response body we sent back to the client.  

The client gets a string of test.  Of that string, the last line is the error message we want to display to the user.  We weren't handling if blank new lines were present at the end of the message.


$ sudo pulp-admin repo update --id test_mar10_b --feed blah
error: operation failed: PulpException: "Invalid feed url.  Must be <type>:<path> where types are: ['yum', 'local', 'rhn']"


Commit here:
http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=77f77fc41c09f4715ea9ab8c044bceb9fb02c1cc

Comment 4 Jeff Ortel 2011-03-12 00:17:28 UTC
Build: 0.151

Comment 5 Jeff Ortel 2011-03-12 00:18:03 UTC
Build: 0.151

Comment 6 Preethi Thomas 2011-03-14 14:27:44 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.151-1.fc14.noarch


[root@preethi ~]# pulp-admin repo update  --id=simple-repo --feed=http://repos.fedorapeople.org/repos/pulp/pulp/fedora-14/x86_64
error: operation failed: PulpException: "Invalid type.  valid types are ['yum', 'local', 'rhn']"
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin repo create  --id=simple-repo1 --feed=http://repos.fedorapeople.org/repos/pulp/pulp/fedora-14/x86_64
error: operation failed: PulpException: "Invalid type.  valid types are ['yum', 'local', 'rhn']"

Comment 7 Preethi Thomas 2011-08-16 12:11:02 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 8 Preethi Thomas 2011-08-16 12:22:43 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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