validate_proxy_host validates the wrong thing for yum_importer.json
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):
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
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.
The validator should require proxy_url be defined, not proxy_host.
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 +
#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.
Please register to edit this issue