Project

Profile

Help

Issue #653

validate_proxy_host validates the wrong thing for yum_importer.json

Added by itinfrastructure@gsacapital.com over 6 years ago. Updated over 2 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 +

Associated revisions

Revision 31f548b8 View on GitHub
Added by Austin over 6 years ago

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

fix pep8 errors that cause problems on merge forward

History

#1 Updated by bmbouter over 6 years ago

  • Severity changed from High to 3. High

#2 Updated by martin1234 almost 3 years ago

  • File 1991372_1.jpg added

#3 Updated by bmbouter almost 3 years ago

  • File deleted (1991372_1.jpg)

#4 Updated by bmbouter over 2 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.

#5 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF