Project

Profile

Help

Story #5694

http_proxy via environment

Added by cassell about 1 month ago. Updated 24 days ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

The pulp daemon should honor the standard lower-cased proxy environment variables; specifically, `http_proxy`, `https_proxy`, and `no_proxy`. -- some people add `ftp_proxy` to the mix, but I think ftp is mostly extinct, so no harm in skipping it, IMO.

These can be configure for all daemons system-wide in /etc/systemd/system.conf (or associated conf snippet), or per-service with a systemd drop-in, such as

/etc/systemd/system/pulp.service.d/proxy.conf:
Environment=http_proxy=http://proxy.example.com:3128
Environment=https_proxy=http://proxy.example.com:3128
Environment=no_proxy=example.com

It shouldn't matter how the environment variables are set; the daemon should honor them.

(To be fair, I didn't actually test that it doesn't honor them today; just that many companies have a http proxy in the way of getting out to the internet, and it's a common stumbling block.)

History

#1 Updated by ttereshc 24 days ago

  • Project changed from RPM Support to Pulp

#2 Updated by fabricio.aguiar 24 days ago

  • Tracker changed from Issue to Story
  • % Done set to 0

#3 Updated by mdepaulo@redhat.com 24 days ago

We should implement this via the convention for Systemd "EnvironmentFile":

An optional file, /etc/sysconfig/pulp . If it exists, all Pulp services will use it for environment variables.

Although not the only example, a great example is how sssd does it:
[mdepaulo@mdepaulo system]$ grep i environmentfile /usr/lib/systemd/system -R | grep sssd
/usr/lib/systemd/system/sssd-autofs.service:EnvironmentFile=
/etc/sysconfig/sssd
/usr/lib/systemd/system/sssd-pam.service:EnvironmentFile=-/etc/sysconfig/sssd
/usr/lib/systemd/system/sssd-ssh.service:EnvironmentFile=-/etc/sysconfig/sssd
/usr/lib/systemd/system/sssd-sudo.service:EnvironmentFile=-/etc/sysconfig/sssd
/usr/lib/systemd/system/sssd-nss.service:EnvironmentFile=-/etc/sysconfig/sssd
/usr/lib/systemd/system/sssd-pac.service:EnvironmentFile=-/etc/sysconfig/sssd
/usr/lib/systemd/system/sssd.service:EnvironmentFile=-/etc/sysconfig/sssd

Please register to edit this issue

Also available in: Atom PDF