Bug 1019455 - Global proxy configuration prevents feed-less repos
Summary: Global proxy configuration prevents feed-less repos
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: Master
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: ---
: 2.3.0
Assignee: Jay Dobies
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-15 18:30 UTC by Justin Sherrill
Modified: 2013-12-09 14:30 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-09 14:30:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2013-10-15 18:30:43 UTC
Description of problem:

Currently if I define a global proxy config in /etc/pulp/server/plugins.conf.d/yum_importer.json and then try to create a repo without a feed url, pulp throws an error:


Body: {"http_request_method": "POST", "exception": null, "error_message": "Configuration errors:\nThe configuration parameter <feed> is required when any of the following other parameters are defined: max_speed, max_downloads, proxy_password, proxy_port, proxy_host, proxy_username, retain_old_count, ssl_ca_cert, ssl_client_cert, ssl_client_key, validate", "_href": "/pulp/api/v2/repositories/", "http_status": 400, "args": ["Configuration errors:\nThe configuration parameter <feed> is required when any of the following other parameters are defined: max_speed, max_downloads, proxy_password, proxy_port, proxy_host, proxy_username, retain_old_count, ssl_ca_cert, ssl_client_cert, ssl_client_key, validate"], "traceback": null}

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

How reproducible:
Always

Steps to Reproduce:
1.  Create a global proxy config /etc/pulp/server/plugins.conf.d/yum_importer.json

{
    "num_threads" : 4,
    "proxy_host" : "http://quartet.rdu.redhat.com",
    "proxy_port" : 8888,
    "proxy_username": null,
    "proxy_password": null
}


2.  Restart httpd
3.  Attempt to create a repo with no feed

Actual results:
Error

Expected results:
Repo creates fine.

Additional info:

Either the restriction needs to be relaxed for a global proxy config, or the restriction needs to be relaxed all together.  I really don't see much benefit to having this restriction in place.

Comment 1 Sayli Karmarkar 2013-10-16 16:31:15 UTC
As a part of this bug, we need to check whether the same problem exists in iso_importer as well.

Comment 2 Jay Dobies 2013-10-16 18:10:03 UTC
https://github.com/pulp/pulp/pull/666

The fix was in the standard config validation in the platform, so it will apply across all plugins that use it.

The ISO importer actually doesn't support a default config file at all, so this bug/fix is irrelevant.

Comment 3 Justin Sherrill 2013-10-16 18:21:00 UTC
Thats an excellent point Sayli and Jay, as i worried at first because katello wasn't configuring a global iso configuration, but now i know that pulp doesn't support it, i will file a bug  :)

Comment 4 Michael Hrivnak 2013-10-17 14:46:55 UTC
via IRC just now:

<mhrivnak> mmccune_mtg, jsherrill how urgently do you want this in a new build? https://bugzilla.redhat.com/show_bug.cgi?id=1019455
<mmccune_mtg> mhrivnak: by next week (tues) would be goo

Comment 5 Jeff Ortel 2013-10-19 00:42:59 UTC
build: 2.3.0-0.23.beta

Comment 6 Preethi Thomas 2013-10-21 15:04:13 UTC
[root@qe-blade-03 ~]# rpm -qa |grep pulp-server
pulp-server-2.3.0-0.23.beta.fc19.noarch
[root@qe-blade-03 ~]# 

[root@qe-blade-03 ~]# cat /etc/pulp/server/plugins.conf.d/yum_importer.json
{
    "num_threads" : 4,
    "proxy_host" : "http://pulp-proxy.usersys.redhat.com",
    "proxy_port" : 3128,
    "proxy_username": null,
    "proxy_password": null
}


[root@qe-blade-03 ~]# pulp-admin rpm repo create --repo-id nofeed
Successfully created repository [nofeed]

[root@qe-blade-03 ~]#

Comment 7 Preethi Thomas 2013-10-21 15:04:48 UTC
[root@qe-blade-03 ~]# pulp-admin iso repo create --repo-id test-iso
Successfully created repository [test-iso]

[root@qe-blade-03 ~]# pulp-admin puppet repo create --repo-id test-puppet
Successfully created repository [test-puppet]

Comment 8 Preethi Thomas 2013-12-09 14:30:44 UTC
Pulp 2.3 released.


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