[Pulp-list] PULP - newby question.... pulp behind a proxy

Jason L Connor jconnor at redhat.com
Fri Jan 21 18:47:22 UTC 2011


On Fri, 2011-01-21 at 18:56 +0100, Masopust, Christian wrote:
> Hello again,
> 
> first I've to appologize.... I'm not a real python-programmer :-))
> 
> anyway, according to your answers and descriptions I was able to
> patch my pulp-installation and it's currently downloading the configured
> yum-repo via our proxy !!
> 
> and btw.... I'm running pulp on one of our RHEL6 systems :-)
> 
> Thanks a lot,
> Christian 
> 
> Here's the patch I made:
> 
> [root at atvies00rx tmp]# diff -Naur pulp-0.0.129/ pulp-yumproxy/
> diff -Naur pulp-0.0.129/etc/pulp/pulp.conf pulp-yumproxy/etc/pulp/pulp.conf
> --- pulp-0.0.129/etc/pulp/pulp.conf     2011-01-20 13:09:43.853821069 +0100
> +++ pulp-yumproxy/etc/pulp/pulp.conf    2011-01-21 18:52:18.181657257 +0100
> @@ -80,7 +80,11 @@
>  # Integer to specify how many old packages to keep.
>  # Only used if 'removeold' is set to True
>  num_old_pkgs_keep: 2
> -
> +# proxy-settings (see bug# 671468)
> +# proxy_url:
> +# proxy_port:
> +# proxy_user:
> +# proxy_pass:
> 
>  [repos]
>  content_url: https://cdn.redhat.com/
> diff -Naur pulp-0.0.129/src/pulp/server/api/repo_sync.py pulp-yumproxy/src/pulp/server/api/repo_sync.py
> --- pulp-0.0.129/src/pulp/server/api/repo_sync.py       2011-01-20 13:09:43.879032864 +0100
> +++ pulp-yumproxy/src/pulp/server/api/repo_sync.py      2011-01-21 18:49:05.869783289 +0100
> @@ -363,6 +363,7 @@
>          self.yum_repo_grinder = None
> 
>      def sync(self, repo, repo_source, skip_dict={}, progress_callback=None):
> +       proxy_url = proxy_port = proxy_user = proxy_pass = None
>          cacert = clicert = clikey = None
>          if repo['ca'] and repo['cert'] and repo['key']:
>              cacert = repo['ca'].encode('utf8')
> @@ -372,9 +373,19 @@
>          num_threads = config.config.getint('yum', 'threads')
>          remove_old = config.config.getboolean('yum', 'remove_old_packages')
>          num_old_pkgs_keep = config.config.getint('yum', 'num_old_pkgs_keep')
> +       if (config.config.has_option('yum', 'proxy_url')):
> +           proxy_url = config.config.get('yum', 'proxy_url')
> +       if (config.config.has_option('yum', 'proxy_port')):
> +           proxy_port = config.config.getint('yum', 'proxy_port')
> +       if (config.config.has_option('yum', 'proxy_user')):
> +           proxy_user = config.config.get('yum', 'proxy_user')
> +       if (config.config.has_option('yum', 'proxy_pass')):
> +           proxy_pass = config.config.get('yum', 'proxy_pass')
>          self.yum_repo_grinder = YumRepoGrinder('', repo_source['url'].encode('ascii', 'ignore'),
>                                  num_threads, cacert=cacert, clicert=clicert,
>                                  clikey=clikey,
> +                               proxy_url=proxy_url, proxy_port=proxy_port,
> +                               proxy_user=proxy_user, proxy_pass=proxy_pass,
>                                  packages_location=pulp.server.util.top_package_location(),
>                                 remove_old=remove_old, numOldPackages=num_old_pkgs_keep, skip=skip_dict)
>          relative_path = repo['relative_path']
> 
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Pradeep Kilambi [mailto:pkilambi at redhat.com] 
> Gesendet: Freitag, 21. Jänner 2011 17:07
> An: Mike McCune
> Cc: pulp-list at redhat.com; Masopust, Christian
> Betreff: Re: [Pulp-list] PULP - newby question.... pulp behind a proxy
> 
> Yea we dont have support for pulp behind proxy yet. But as John said, grinder supports it so you can download the bits behind a proxy.
> 
> ~ Prad
> 
> ----- Original Message -----
> From: "Mike McCune" <mmccune at redhat.com>
> To: "Christian Masopust" <christian.masopust at siemens.com>
> Cc: "pulp-list at redhat.com" <pulp-list at redhat.com>
> Sent: Friday, January 21, 2011 10:15:16 AM
> Subject: Re: [Pulp-list] PULP - newby question.... pulp behind a proxy
> 
> On 01/20/2011 08:11 AM, Masopust, Christian wrote:
> > tried google, searched the mail-archive... failed :-))
> > what to configure if running pulp behind a proxy (http) ??
> > thanks a lot,
> > christian
> >
> 
> I don't think our client yet supports connecting through a http proxy. 
> I don't think it would be all that hard to add but I don't think it yet 
> can do this.
> 
> Prad, correct me if I'm wrong ...
> 
> Mike
> -- 
> Mike McCune
> mmccune AT redhat.com
> Red Hat Engineering       | Portland, OR
> Systems Management        | 650.254.4248
> 
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
> 
> -- 
>  

Hi Christian,

Thank you very much for the patch! And for the update that you're
running on RHEL 6.

-- 
Jason L Connor
Software Engineer
Red Hat, Inc.
RHCE: 805010912355231
Freenode: linear
GPG Fingerprint: 2048R/CC4ED7C1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20110121/b0dc552e/attachment.sig>


More information about the Pulp-list mailing list