Project

Profile

Help

Story #3105

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

Added by alanwevans about 2 years ago. Updated 7 months ago.

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

0%

Platform Release:
Blocks Release:
Target Release - Nectar:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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 Importers NEW Actions

History

#1 Updated by ipanova@redhat.com about 2 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.

#2 Updated by mhrivnak about 2 years ago

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

#3 Updated by dalley about 2 years ago

  • Triaged changed from No to Yes

#4 Updated by mhrivnak about 2 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.

#5 Updated by bmbouter 7 months ago

  • Status changed from NEW to CLOSED - WONTFIX

#6 Updated by bmbouter 7 months 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.

#7 Updated by bmbouter 7 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF