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

Non-existent directory environments should raise a helpful error

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: PUP 3.7.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      PE 3.3.1 (puppet 3.6.2)

    • Template:
    • Story Points:
      2
    • Sprint:
      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support