Project

Profile

Help

Issue #653

closed

validate_proxy_host validates the wrong thing for yum_importer.json

Added by itinfrastructure@gsacapital.com about 9 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.6 Beta
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
the config validation for yum_importer.json requires that proxy_host be set if proxy_port is defined. nectar however doesn't use proxy_host, it uses proxy_url instead. The validation therefore requires an extra, unused config parameter to be specified.

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

How reproducible:
Always

Steps to Reproduce:
1. Edit yum_importer.json, define proxy_url and proxy_port
2. Reload httpd
3. Run any pulp-admin command, e.g. pulp-admin rpm repo list

Actual results:
The server indicated one or more values were incorrect. The server provided the
following error message:

Configuration errors:
The configuration parameter <proxy_host> is required
when any of the following other parameters are defined: proxy_password,
proxy_port, proxy_username.

More information can be found in the client log file ~/.pulp/admin.log.

The requested action is not completed because of this error.

Expected results:
The validator should require proxy_url be defined, not proxy_host.

Additional info:
If one follows the advise of the validator and defines proxy_host and proxy_port only then rpm sync operations fail due to a string manipulation error:
pulp: nectar.downloaders.threaded:ERROR: (20615-56256) File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 342, in _add_proxy
pulp: nectar.downloaders.threaded:ERROR: (20615-56256) url = ':'.join((host, str(config.proxy_port)))
pulp: nectar.downloaders.threaded:ERROR: (20615-56256) TypeError: sequence item 0: expected string, NoneType found

I've filed this under rpm-support as that's where I've run into the bug but given the validator is in pulp core I suspect this will affect multiple features. I'm not familiar enough with the codebase to pick a more appropriate product, please feel free to update as needed.

+ This bug was cloned from Bugzilla Bug #1179877 +

Added by Austin about 9 years ago

Revision 31f548b8 | View on GitHub

Merge pull request #653 from asmacdo/fix-21migration-pep8

fix pep8 errors that cause problems on merge forward

Actions #1

Updated by bmbouter about 9 years ago

  • Severity changed from High to 3. High
Actions #2

Updated by martin1234 over 5 years ago

  • File 1991372_1.jpg added
Actions #3

Updated by bmbouter over 5 years ago

  • File deleted (1991372_1.jpg)
Actions #4

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #5

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF