Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-377

"puppetserver gem" command doesn't work from behind a proxy server

    Details

    • Template:
    • Team:
      Enterprise in the Cloud
    • Sub-team:
    • Story Points:
      3
    • Sprint:
      Server Emerald 2015-05-13, Server Emerald 2015-07-08, Server Emerald 2015-07-22, WC 2016-11-16, WC 2016-11-30
    • CS Priority:
      Reviewed
    • Release Notes:
      New Feature
    • Release Notes Summary:
      Hide
      (unsure whether this is a bug fix or new feature) `puppetserver gem` command now respects HTTP_PROXY, HTTPS_PROXY, NO_PROXY, http_proxy, https_proxy, and no_proxy environment variables. This means that puppetserver can now install gems when behind a proxy if these environment variables are set.
      Show
      (unsure whether this is a bug fix or new feature) `puppetserver gem` command now respects HTTP_PROXY, HTTPS_PROXY, NO_PROXY, http_proxy, https_proxy, and no_proxy environment variables. This means that puppetserver can now install gems when behind a proxy if these environment variables are set.

      Description

      Updated description: puppetserver gem command should use system defined proxies http_proxy, https_proxy, no_proxy, HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables if set and notify the user that it is doing so.

      -----------------------------------------------------

      Original Description:

      Description

      When a puppet master must access the internet via a proxy server, it is not possible to use the puppetserver gem command to install gems.

      This command is required to be usable to install gems into the JVM for systems such as hiera-eyaml.

      Expected result

      puppetserver gem command should use system defined proxies http_proxy, https_proxy environment variables if set and notify the user that it is doing so.

      Actual result

      puppetserver gem install ... fails with a timeout error when attempting to install gems.

      Workaround

      http://docs.puppetlabs.com/pe/3.7/release_notes_known_issues.html#installing-gems-when-puppet-server-is-behind-a-proxy-requires-manual-download-of-gems

      Take a backup of the file /opt/puppet/share/puppetserver/cli/apps/gem
      Edit the file to supply JVM arguments to support http(s) proxies by adding the parameters

      • -Dhttps.proxyHost=XXX
      • -Dhttp.proxyHost=XXX
      • -Dhttp.proxyPort=XXX
      • -Dhttps.proxyPort=XXX

      Suggested fix

      puppetserver 'gem' script defined in /opt/puppet/share/puppetserver/cli/apps/gem should be aware of and re-export formatted (eg with awk) contents of environment variables http_proxy and https_proxy. When doing so it should notify the user by printing a message to the screen.

      QA:

      Risk Assessment: High
      Probability: Medium Low
      Severity: High

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ruth Ruth Linehan
                Reporter:
                geoff.williams Geoff Williams
                QA Contact:
                Erik Dasher
              • Votes:
                8 Vote for this issue
                Watchers:
                21 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support