Project

Profile

Help

Story #3105

closed

As a user I can configure an importer to not use a globally-configured proxy.

Added by alanwevans over 6 years ago. Updated over 3 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Target Release - Nectar:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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

Related to Pulp - Story #3108: As a user, I can manage Download Profiles and associate them with ImportersCLOSED - WONTFIX

Actions
Actions #1

Updated by ipanova@redhat.com over 6 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.

Actions #2

Updated by mhrivnak over 6 years ago

  • Related to Story #3108: As a user, I can manage Download Profiles and associate them with Importers added
Actions #3

Updated by dalley over 6 years ago

  • Triaged changed from No to Yes
Actions #4

Updated by mhrivnak over 6 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.

Actions #5

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #6

Updated by bmbouter about 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.

Actions #7

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF