Bug 985106 - (sat6-proxy-bug) Proxy not properly configured for pulp repo syncs [NEEDINFO]
Proxy not properly configured for pulp repo syncs
Status: CLOSED DUPLICATE of bug 1083818
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
Unspecified Unspecified
medium Severity medium (vote)
: Unspecified
: --
Assigned To: Eric Helms
Tazim Kolhar
: Triaged
: 968265 968390 (view as bug list)
Depends On: 1083818
  Show dependency treegraph
Reported: 2013-07-16 15:34 EDT by Justin Sherrill
Modified: 2014-07-19 09:52 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-06-16 17:32:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
tkolhar: needinfo? (tkolhar)

Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2013-07-16 15:34:31 EDT
Description of problem:

Katello does not use the pulp global proxy configuration to sync repositories.

Version-Release number of selected component (if applicable):

Satellite 6.0.1 mdp1

How reproducible:

Steps to Reproduce:
1.  Run katello configure with  the --proxy-url  option.
2.  create a yum repo
3.  Try to sync a repo when use of the proxy is required

Actual results:
Sync fails, does not attempt to go through the proxy

Expected results:
Pulp should use the proxy to sync the repo.
Comment 1 Justin Sherrill 2013-07-16 15:35:24 EDT
UPstream katello issue https://github.com/Katello/katello/issues/2090


create /usr/lib/pulp/plugins/importers/yum_importer/yum_importer.conf

with contents:

  "proxy_url" : "http://localhost/",
  "proxy_port" : "12345"
Comment 2 Xixi 2013-07-16 17:12:36 EDT
(In reply to comment #1)
> Workaround:
> create /usr/lib/pulp/plugins/importers/yum_importer/yum_importer.conf
> with contents:
> {
>   "proxy_url" : "http://localhost/",
>   "proxy_port" : "12345"
> }
(...and "service httpd restart" for the change to take effect.)
Comment 3 Justin Sherrill 2013-08-16 12:32:44 EDT
Please note that there is a typo in the original post (and the bugzillas that post was based off of).  With that configuration syncing will work, but new repositories will fail upon creation.  The  correct syntax is:


  "proxy_url" : "http://localhost/",
  "proxy_port" : 12345

and then run 'service httpd restart'

Note the proxy_port is an Integer and NOT a string (It should NOT be surrounded by quotes).
Comment 6 Justin Sherrill 2013-10-14 11:52:31 EDT
Note new file location for pulp 2.3 in mdp2, this manual workaround should not be needed anymore though:

Comment 8 Ivan Necas 2013-10-15 09:43:02 EDT
*** Bug 968265 has been marked as a duplicate of this bug. ***
Comment 9 Ivan Necas 2013-10-15 09:43:32 EDT
*** Bug 968390 has been marked as a duplicate of this bug. ***
Comment 11 Mike McCune 2013-10-17 17:02:03 EDT
Moving this to be tested during MDP3, not critical for MDP2 success story
Comment 12 Dane Butler 2013-11-19 19:32:48 EST
This workaround does not appear to work on MDP2.
Comment 13 Justin Sherrill 2013-11-20 10:56:22 EST
MDP2 should fully support pulp proxy configuration with no workarounds needed.  Simply specify the appropriate command line options to katello-configure.  If you are experiencing an issue with it, please let us know either through the mdp2 mailing list or #satellite6-mdp on freenode.
Comment 14 Justin Sherrill 2013-11-20 10:57:45 EST
(There is a known issue using an HTTP Proxy with digest authentication though)
Comment 17 Tazim Kolhar 2014-05-28 02:06:32 EDT
Please provide verification steps
Comment 18 Justin Sherrill 2014-05-28 09:05:19 EDT
Moving this back to Assigned as this broke during enginification.
Comment 19 Justin Sherrill 2014-05-29 09:15:38 EDT


Under 'common:'


      host: localhost
      port: 3128
      user: login
      password: password

for example:

    host: localhost
    port: 3128
    user: login
    password: password

This enables cdn communication via the proxy (used for enabling red hat repos).  In order to actually use your proxy for syncing rpms:

create a new file:   /etc/pulp/server/plugins.conf.d/yum_importer.conf

    "num_threads" : 4,
    "proxy_url" : "http://myproxy",
    "proxy_port" : 80
Comment 20 Justin Sherrill 2014-05-29 11:42:43 EDT
correction,  "proxy_url" should be "proxy_host":

    "num_threads" : 4,
    "proxy_host" : "http://myproxy",
    "proxy_port" : 80
Comment 21 Francisco Lloreda 2014-05-30 09:47:26 EDT
Actually, looking at code at /usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/importer.py I found that filename should be /etc/pulp/server/plugins.conf.d/yum_importer.conf 

My file contents are:

    "proxy_host" : "http://localhost",
    "proxy_port" : 8118

And it's working.

Also we need a feature for proxy per-repo as if one of the repos it's internal and proxy is unable to resolve it it will fail. 

There is a workarround intalling a local proxy in the satellite server and configuring it with the correct rules to direct the HTTP querys to proxy o direct based in the destination.

Comment 22 Francisco Lloreda 2014-05-31 19:39:49 EDT
(In reply to Francisco Lloreda from comment #21)

I mean /etc/pulp/server/plugins.conf.d/yum_importer.json
Comment 23 Benjamin Chardi 2014-06-04 05:39:58 EDT
Just to complement the info. In order to download ISO content from Satellite6-beta via proxy, an iso importer plugin must be configured:

# cat  /etc/pulp/server/plugins.conf.d/iso_importer.json

  "proxy_host" : "http://localhost",
  "proxy_port" : 8118

Then restart katello-service

# katello-service restart
Comment 24 Mike McCune 2014-06-16 17:32:44 EDT
This is resolved by 1083818 for the Satellite 6 Beta release.

*** This bug has been marked as a duplicate of bug 1083818 ***

Note You need to log in before you can comment on or make changes to this bug.