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

Older server version errors when an agent tries to download from the locales mountpoint

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.3.4
    • Component/s: None
    • Labels:
    • Template:
      PUP Bug Template
    • Acceptance Criteria:
      Hide

      Puppetserver no longer issues any error about a missing/forbidden locales mountpoint

      Show
      Puppetserver no longer issues any error about a missing/forbidden locales mountpoint
    • Sub-team:
    • Team:
      Platform Core
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Manual Test
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      In puppet 5.3.4, a default mount point was added to puppet for serving module translation files. It is possible to run a newer version of puppet (5.3.4) on an agent node while the master is running an older version (5.3.3/PE 2017.3.2 or older.) In this case, the agent will detect that it is querying a master that does not contain this mount point, and the agent will not make the request for the locale files.
      Show
      In puppet 5.3.4, a default mount point was added to puppet for serving module translation files. It is possible to run a newer version of puppet (5.3.4) on an agent node while the master is running an older version (5.3.3/PE 2017.3.2 or older.) In this case, the agent will detect that it is querying a master that does not contain this mount point, and the agent will not make the request for the locale files.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      we are adding unit tests

      Description

      As part of supporting module translations, we added a default mountpoint to Puppet for serving module translation files. However, this mountpoint will not be available on older versions of Puppetserver, so when an agent tries to query it, Puppetserver throws an error:

      Error: /File[/Users/josh/.puppetlabs/opt/puppet/cache/locales]: Failed to generate additional resources using 'eval_generate': Error 500 on SERVER: Server Error: Not authorized to call search on /file_metadata/locales with {:rest=>"locales", :links=>"follow", :recurse=>true, :source_permissions=>"ignore", :ignore=>[".svn", "CVS", ".git", ".hg", "*.pot", "config.yaml"], :checksum_type=>"sha256"}
      

      We need to handle this gracefully, since it is not really an error (it just means module translations won't be available agent-side). We cannot simply catch the exception, since at the downloader level the error has already been caught and logged as part of the HTTP handler. So ideally we should prevent the query from being made in the first place, dependent on the version of Puppetserver being queried.

      The server version is currently not available beyond the HTTP layer. Two options to explore for making it available include:
      1) adding something to Puppet's context object
      2) creating a setting to skip downloading locale files

      The context gives us a lifecycle for the data and tight control over it (no user can enable translation downloading by accident). However, a setting would give us the option to support people turning off translation downloads if they should prove problematic in certain use cases.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  jennifer.solman Jennifer Solman
                  Reporter:
                  maggie Maggie Dreyer
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support