Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10041

Switch PMT to use puppet's http client

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.12.0
    • Component/s: None
    • Template:
    • Epic Link:
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The puppet module tool now uses puppet's http client to connect to the forge. The only user visible change should be that the "puppet module install" command will now observe the "Puppet[:sourceaddress]" setting. This is useful when running the install command on a puppetserver with multiple network interfaces and the puppet forge is only routable on some interfaces.
      Show
      The puppet module tool now uses puppet's http client to connect to the forge. The only user visible change should be that the "puppet module install" command will now observe the "Puppet[:sourceaddress]" setting. This is useful when running the install command on a puppetserver with multiple network interfaces and the puppet forge is only routable on some interfaces.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Switch the PMT to using puppet's HTTP client instead of creating its own Net::HTTP objects.

      • Use system ssl context to make HTTP requests
      • If there is a forge authorization header, it must be sent via Authorization: <token>
      • Otherwise, if the Puppet[:module_repository] includes a username and password, eg. https://foo:bar@myforge.com, then the user and password should be passed to the Client#get(url, headers, user: 'foo', password: 'bar') method as keyword arguments.
      • Supports compressed downloads. We should get this for free, but when using --http_debug make sure the Accept-Encoding header contains something like gzip;q=1.0,deflate;q=0.6,identity;q=0.3
      • Continues to send User-Agent: PMT/1.1.1 (v3; Net::HTTP) Puppet/6.12.0 Ruby/2.5.7-p... etc header
      • Continues to raise CommunicationsError and SSLVerifyErrors if exceptions occur
      • Encodes URL path and query parameters the same way (eg when Puppet[:module_groups] is set, we use spaces instead of '+' in the query parameter. See also PUP-8008

        Attachments

          Activity

            People

            Assignee:
            josh Josh Cooper
            Reporter:
            josh Josh Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support