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

puppet device fails with undefined method `loaders' for nil:NilClass when env is not production

    XMLWordPrintable

Details

    • Network Automation
    • Customer Feedback
    • Reviewed
    • Bug Fix
    • Hide
      * `puppet device` now uses its own device-specific cache for pluginsynced code (facts, types and providers). Previously it would have used the cache of any agent running on the same system.

      * `puppet device` now supports a `--libdir` option for overriding any pluginsynced code with a local directory for testing, and other extra-ordinary usecases.

      Release note draft, jb: - Prior to this release, the `puppet device` command failed if the environment specified in `puppet.conf` or with the `--environment` option was not 'production'. This issue is fixed. Now `puppet device` uses its own device-specific cache for pluginsynced code (facts, types, and providers). Additionally, `puppet device` now supports a `--libdir` option for overriding any pluginsynced code with a local directory for testing. [PUP-8766](https://tickets.puppetlabs.com/browse/PUP-8766)
      Show
      * `puppet device` now uses its own device-specific cache for pluginsynced code (facts, types and providers). Previously it would have used the cache of any agent running on the same system. * `puppet device` now supports a `--libdir` option for overriding any pluginsynced code with a local directory for testing, and other extra-ordinary usecases. Release note draft, jb: - Prior to this release, the `puppet device` command failed if the environment specified in `puppet.conf` or with the `--environment` option was not 'production'. This issue is fixed. Now `puppet device` uses its own device-specific cache for pluginsynced code (facts, types, and providers). Additionally, `puppet device` now supports a `--libdir` option for overriding any pluginsynced code with a local directory for testing. [ PUP-8766 ]( https://tickets.puppetlabs.com/browse/PUP-8766 )
    • Needs Assessment

    Description

      The puppet device command fails with when environment is not 'production' and environment is specified locally in either puppet.conf or via the --environment option ...

      [root@pe-201810-agent ~]# puppet device --verbose --environment=development
      Error: Could not run: undefined method `loaders' for nil:NilClass
      

      It succeeds if environment is server-specified ...

      [root@pe-201810-agent ~]# puppet device --verbose #--environment=development
      Info: starting applying configuration to cisco.example.com at file:///etc/puppetlabs/puppet/devices/cisco.example.com.yaml
      Notice: Local environment: 'production' doesn't match server specified node environment 'development', switching agent to 'development'.
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Retrieving locales
      Info: Caching catalog for cisco.example.com
      Info: Applying configuration version '1526925344'
      Notice: Applied catalog in 0.12 seconds
      

      Note that even when the agent is not in production, only the production directory is created locally:

      [root@pe-201810-agent ~]#  ls -al /etc/puppetlabs/code/environments/
      total 0
      drwxr-xr-x 3 root root 23 May 21 17:28 .
      drwxr-xr-x 4 root root 39 May 21 17:12 ..
      drwxr-x--- 5 root root 87 May 21 17:29 production
      

      Attachments

        Issue Links

          Activity

            People

              david.schmitt David Schmitt
              tom.kishel Thomas Kishel
              Votes:
              4 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support