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

Pluginsync errors when no source is available and modulepath directory is a symlink

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.7.4
    • Fix Version/s: PUP 4.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      A master with a modules directory that is a symlink and one or more modules with no facts.d or lib directories.

    • Template:
    • Story Points:
      3
    • Sprint:
      Client 2015-02-04

      Description

      Context

      Currently, Puppet produces one of two pluginsync errors during an agent run if the root of a modulepath directory is a symlink and no modules contain a facts.d or lib directory.

      In the normal case, when the base module path is a directory and none if its modules include facts.d or lib directories, pluginsync returns the path to the module path directory itself, at which point the file type disables recursion in its `recurse_remote` method and stops the agent from attempting to download plugins.

      However, if the base module path is not a directory (in this case a link), `recurse_remote` returns early, causing the agent-side facts.d or lib directory to not have its 'source' metadata set, leading to a failing query back to the master.

      Steps to reproduce

      1) Install any version of Puppet from 3.5.1 onward
      2) Edit puppet.conf to look like the following (where this is both the master and the agent):

      [main]
          logdir = /var/log/puppet
          rundir = /var/run/puppet
          ssldir = $vardir/ssl
          server = miyxwpjl6z3zkmn.delivery.puppetlabs.net
          basemodulepath = /usr/share/puppet/modules:/h/puppet_modules
          environmentpath = $confdir/environments
       
      [agent]
          classfile = $vardir/classes.txt
          localconfig = $vardir/localconfig
          pluginsync = true
          environment = production
      

      3) mkdir -p /h/puppet_modules
      4) mkdir -p /etc/puppet/environments/production
      5) ln -s /h/puppet_modules /etc/puppet/environments/production/modules
      6) puppet module install puppetlabs-stdlib
      7) Start the master with puppet master --verbose --no-daemonize
      8) Run the agent with puppet agent -t

      To "fix" the error, simply run mkdir /h/puppet_modules/stdlib/facts.d.

      Output

      [root@foupsthuyg3ci5r ~]# puppet agent -t
      Info: Retrieving pluginfacts
      Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://foupsthuyg3ci5r.delivery.puppetlabs.net/pluginfacts
      Info: Retrieving plugin
      Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://foupsthuyg3ci5r.delivery.puppetlabs.net/plugins
      Info: Caching catalog for foupsthuyg3ci5r.delivery.puppetlabs.net
      Info: Applying configuration version '1422752263'
      Notice: Finished catalog run in 0.04 seconds
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              whopper William Hopper
              QA Contact:
              Eric Thompson Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support