Story #3105
closedAs a user I can configure an importer to not use a globally-configured proxy.
0%
Description
I am running Katello and for nearly all of my repos I want to have a proxy configured. However I am mirroring some repos from internal sources. The repository config seems to inherit from nectar defaults so you can actually override proxy_url on specific repos. But setting proxy_url to None, or "" doesn't work as expected. Because config.proxy_url=""==False
in python and when I tried "None"
it correctly becomes the string "None"
and there is no proxy server named "None"
in our network.
I found a workaround, a gross workaround, I manually edited the installed downloaders/threaded.py.
--- theirs/threaded.py 2017-10-12 00:48:19.658019171 +0000
+++ mine/threaded.py 2017-10-12 00:48:37.947019171 +0000
@@ -149,7 +149,7 @@
#
# Annoyingly, although the config is called 'proxy_url', the port and basic auth
# credentials are defined separately, so we have to build the url.
- if config.proxy_url and config.proxy_port:
+ if config.proxy_url and config.proxy_url != '_none_' and config.proxy_port:
parsed_url = urllib3_url.parse_url(config.proxy_url)
proxy_auth = None
if config.proxy_username and config.proxy_password:
I chose the value none because that's what yum uses and it made sense to me and might make sense to others. I'm not married to it. Just a thought.
Originally created: https://github.com/pulp/nectar/issues/64
Related issues
Updated by ipanova@redhat.com about 7 years ago
- Tracker changed from Story to Issue
- Severity set to 2. Medium
- Triaged set to No
Changing this to Issue tracker so we can triage this next time.
Updated by mhrivnak about 7 years ago
- Related to Story #3108: As a user, I can manage Download Profiles and associate them with Importers added
Updated by mhrivnak about 7 years ago
- Tracker changed from Issue to Story
- Subject changed from As a user I want to have the ability to explicitly unset proxy_url in inherited configs to As a user I can configure an importer to not use a globally-configured proxy.
- % Done set to 0
Thanks for submitting this. It is a use case that others have also requested.
There is a workaround that's inconvenient, but it does work. When you request a sync through the REST API, you can include this override config:
{
"override_config": {
"proxy_host": null,
"proxy_password": null,
"proxy_port": null,
"proxy_username": null
}
}
Doing so causes the sync to ignore any global proxy settings.
We will address this use case likely with #3108.
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 5 years ago
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.