Bug 1428002

Summary: [RFE] man page documentation is needed to describe policy for honoring environment vars HTTP_PROXY, HTTPS_PROXY, NO_PROXY
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Kevin Howell <khowell>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: medium    
Version: 7.4CC: khowell, lmohanty, redakkan, skallesh
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.19.10-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:21:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Sefler 2017-03-01 16:48:59 UTC
Description of problem:
Much work has been done over several releases so that python-rhsm and subscription-manager will honor proxy environment variables.  However, none of it has been documented in the subscription-manager man page.  Please update the subscription-manager and rhsm.conf man page to describe the policy for honoring HTTP_PROXY, HTTPS_PROXY, NO_PROXY environment variables.

Note that a proxy value can be specified in three ways:
  1. via rhsm.conf
  2. as a command line option
  3. through an environment variable.

Include a description in the man pages for the order of precedence. 


Additional info:
For historical reference, here are cases related to the honoring of proxy environment variables...

Bug 1031755 - [Intel 6.6 Bug] doesn't seem to use https_proxy environment variable
Bug 1266608 - [RFE]subscription-manager should respect no_proxy env. variable 
Bug 1285010 - [RFE]subscription-manager should respect no_proxy env. variable for RHEL 6
Bug 1311429 - no_proxy variable ignored when configured in virt-who config file
Bug 1420533 - no_proxy environment variable is ignored by the rhsmd process

Comment 3 Shwetha Kallesh 2017-05-03 06:59:51 UTC
[root@dhcp71-191 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.21-1
subscription management rules: 5.15.1
subscription-manager: 1.19.12-1.el7
python-rhsm: 1.19.6-1.el7



[root@dhcp71-191 ~]# man rhsm.conf
proxy_hostname
           Set this to a non-blank value if subscription-manager should use a reverse proxy to access the subscription service. This sets the host for the reverse
           proxy. Overrides hostname from HTTP_PROXY and HTTPS_PROXY environment variables.

       proxy_port
           Set this to a non-blank value if subscription-manager should use a reverse proxy to access the subscription service. This sets the port for the reverse
           proxy. Overrides port from HTTP_PROXY and HTTPS_PROXY environment variables.

       proxy_username
           Set this to a non-blank value if subscription-manager should use an authenticated reverse proxy to access the subscription service. This sets the
           username for the reverse proxy. Overrides username from HTTP_PROXY and HTTPS_PROXY environment variables.

       proxy_password
           Set this to a non-blank value if subscription-manager should use an authenticated reverse proxy to access the subscription service. This sets the
           password for the reverse proxy. Overrides password from HTTP_PROXY and HTTPS_PROXY environment variables.

       no_proxy
           Set this to a non-blank value if subscription-manager should not use a proxy for specific hosts. Format is a comma-separated list of hostname suffixes,
           optionally with port. '*' is a special value that means do not use a proxy for any host. Overrides the NO_PROXY environment variable.





[root@dhcp71-191 ~]# man subscription-manager
PROXY CONFIGURATION
       subscription-manager can be configured to use a proxy in several ways:

              * via standard HTTP_PROXY , HTTPS_PROXY , NO_PROXY environment variables (environment-level settings)

              * via options in /etc/rhsm/rhsm.conf (application-level settings)

              * via command-line arguments (command-level overrides)

       Although subscription-manager respects environment variables for proxy configuration, this should be avoided in favor of the configuration file, because the
       daemons (ex.  rhsmcertd and rhsmd ) do not provide ways to modify their environments.

       Each option of the proxy configuration (hostname, port, host/domain pattern blacklist, username, password) is read independently, with precedence being com‐
       mand-line over configuration over environment, and then the resulting set of options is used to configure the proxy configuration.

       For example, if the HTTP_PROXY environment variable is set and no_proxy is set in /etc/rhsm/rhsm.conf then both are present in the effective proxy  configu‐
       ration.

       If two equivalent options are set in different places, then the precedence determines which value is effective.

       For  example,  the NO_PROXY environment variable is set and the no_proxy configuration file option is set, then the value from the configuration file is the
       effective value.

Comment 4 errata-xmlrpc 2017-08-01 19:21:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2083