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

Non-existent directory environments should raise a helpful error

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Done
    • PUP 3.6.2
    • PUP 3.7.0
    • None
    • None
    • PE 3.3.1 (puppet 3.6.2)

    • 2
    • Platform 2014-10-01

    Description

      If in puppet.conf I have:

      [main]
      basemodulepath = /etc/puppetlabs/puppet/modules
      environmentpath = /etc/puppetlabs/puppet/envs
      

      and if /etc/puppetlabs/puppet/modules/test/manifests/init.pp exists with `class test { }` in it, and if /etc/puppetlabs/puppet/envs/production does not exist, when I run puppet agent -t I get Error 400 on SERVER: Could not find class test for ...

      This is because if $environmentpath/$environment does not exist then the environment is considered to be non-existent. If I create /etc/puppet/envs/production (even leaving it empty) then it will work as desired.

      To avoid red-herring hunts, it would probably be better UX to have the puppetmaster raise an error describing that the environment (in this case "production") cannot be found in the environmentpath.

      Attachments

        Issue Links

          Activity

            People

              andy Andrew Parker
              hunter Hunter (Hunner) Haugen
              Eric Thompson Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support