Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-2084

no_proxy environment variable not properly translated to unix standard format

    Details

      Description

      This issue is reported in OpenShift Bugzilla and the engineer asked me to report here.
      Also, this ticket is related, but it's not enough to fix the original issue the customer is facing.

      Java s2i image requires "no_proxy" environment variable is a non-standard format like ".foo.com,.bar.com". This causes other tools (e.g. curl) not to work properly.
      This specification is described here.
      https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html-single/red_hat_java_s2i_for_openshift/#configuration_environment_variables

      According to the customer, it looks like this file also needs to be changed.

      https://github.com/jboss-openshift/cct_module/blob/master/os-java-run/added/proxy-options

      local noProxy="${no_proxy:-${NO_PROXY}}"
      if [ -n "$noProxy" ] ; then
      ret="$ret -Dhttp.nonProxyHosts=\"$(echo $noProxy | sed -e 's+,+|+g')\""
      fi

      This needs to have the same logic that was added to common.sh...

      local noProxy="${no_proxy:-${NO_PROXY}}"
      if [ -n "$noProxy" ]; then
      noProxy="${noProxy//,/|}"
      noProxy="${noProxy//|./|*.}"
      noProxy="${noProxy/#./*.}"
      HTTP_PROXY_NONPROXYHOSTS="${noProxy}"
      fi

      So for example, the following will fix it...

      ret="$ret -Dhttp.nonProxyHosts=\"$(echo $noProxy | sed -e 's+^\..+g' | sed -e 's,\.,.+g' | sed -e 's,+|+g')\""

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rcernich Rob Cernich
                  Reporter:
                  rhn-support-tatanaka Takayoshi Tanaka
                  Tester:
                  Marek Schmidt
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  11 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: