Bug 1774837 - Too many `warning: The environment variable HTTP_PROXY is discouraged. Use http_proxy.` in fluentd pod logs after enable forwarding logs to user-managed ES as insecure
Summary: Too many `warning: The environment variable HTTP_PROXY is discouraged. Use h...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.3.0
Assignee: Noriko Hosoi
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-21 05:21 UTC by Qiaoling Tang
Modified: 2020-01-23 11:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-23 11:13:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-logging-operator pull 255 0 'None' closed Bug 1752725: Log into kibana console get `504 Gateway Time-out The server didn't respond in time. ` when http_proxy enab... 2020-09-22 06:51:47 UTC
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:13:54 UTC

Description Qiaoling Tang 2019-11-21 05:21:47 UTC
Description of problem:
There are many `warning: The environment variable HTTP_PROXY is discouraged.  Use http_proxy.` logs in clusterlogging managed fluentd pods after enable forwarding logs to user-managed elasticsearch as unsecure, the app, infra and audit logs could be forwarded successfully:

/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/faraday-0.17.0/lib/faraday/connection.rb:454: warning: The environment variable HTTP_PROXY is discouraged.  Use http_proxy.
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/faraday-0.17.0/lib/faraday/connection.rb:454: warning: The environment variable HTTP_PROXY is discouraged.  Use http_proxy.
/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/faraday-0.17.0/lib/faraday/connection.rb:454: warning: The environment variable HTTP_PROXY is discouraged.  Use http_proxy.

The cluster doesn't enable proxy.


Version-Release number of selected component (if applicable):
ose-cluster-logging-operator-v4.3.0-201911201806
ose-logging-fluentd-v4.3.0-201911151317

How reproducible:
Always

Steps to Reproduce:
1.Deploy logging, enable logforwarding
2.create logforwarding instance to forward app, infra and audit logs to user manged elasticsearch as unsecure:
apiVersion: logging.openshift.io/v1alpha1
kind: LogForwarding
metadata:
  name: instance
  namespace: openshift-logging
spec:
  outputs:
    - name: user-created-es
      type: elasticsearch
      endpoint: 'elasticsearch-server.openshift-logging.svc:9200'
      insecure: true
  pipelines:
    - name: app-pipeline
      inputSource: logs.app
      outputRefs:
        - user-created-es
    - name: infra-pipeline
      inputSource: logs.infra
      outputRefs:
        - user-created-es
    - inputSource: logs.audit
      name: audit-pipeline
      outputRefs:
        - user-created-es

3.check clusterlogging managed fluentd pods' log

Actual results:


Expected results:
Should not get message `/opt/rh/rh-ruby25/root/usr/local/share/gems/gems/faraday-0.17.0/lib/faraday/connection.rb:454: warning: The environment variable HTTP_PROXY is discouraged.  Use http_proxy.` in fluentd pods.

Additional info:
No issue when forward to fluentd as insecure, and no issue when forward to ES/fluentd as secure.

Comment 1 Noriko Hosoi 2019-11-21 05:56:21 UTC
faraday expects http_proxy and no_proxy.  Is it ok to set http_proxy as well as no_proxy in addition to HTTP_PROXY and NO_PROXY in CLO?  Or should we replace HTTP_PROXY and NO_PROXY with http_proxy and no_proxy for fluentd, respectively?  It seems https_proxy is not supported in faraday.

origin-aggregated-logging/fluentd/vendored_gem_src/faraday/README.md:
  Faraday will try to automatically infer the proxy settings from your system using `URI#find_proxy`.
  This will retrieve them from environment variables such as http_proxy, ftp_proxy, no_proxy, etc.
  If for any reason you want to disable this behaviour, you can do so by setting the global varibale `ignore_env_proxy`:

origin-aggregated-logging/fluentd/vendored_gem_src/faraday/lib/faraday/connection.rb
    #           :proxy   - URI, String or Hash of HTTP proxy options
    #                     (default: "http_proxy" environment variable).
    #                     :uri      - URI or String
    #                     :user     - String (optional)
    #                     :password - String (optional)
    <<snip>>
    def find_default_proxy
      uri = ENV['http_proxy']
    <<snip>>
        warn 'no_proxy is unsupported' if ENV['no_proxy'] || ENV['NO_PROXY']

Comment 2 Noriko Hosoi 2019-11-21 06:24:16 UTC
Decided to set http_proxy, https_proxy and no_proxy in addition to HTTP_PROXY, HTTPS_PROXY and NO_PROXY.

Comment 4 Qiaoling Tang 2019-11-25 01:40:20 UTC
Verified with ose-cluster-logging-operator-v4.3.0-201911220712

Comment 6 errata-xmlrpc 2020-01-23 11:13:36 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-2020:0062


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