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

Puppet's fileserver seems to be unable to handle a path containing a directory called "environment"

    XMLWordPrintable

    Details

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

      Debian 8 (jessie)
      Puppet version 4.5.2

    • Template:
    • Team:
      Agent
    • Story Points:
      1
    • Sprint:
      APS 2016-09-21
    • Release Notes:
      Bug Fix

      Description

      I have the following in one of my manifest files (using the logstash module provided by elasticsearch):

        logstash::configfile { 'environment_filters':
          source => "puppet:///modules/zedcore/logstash/filters/environment/${::environment}.conf",
          order  => 500,
        }

      This boils down to a request for puppet:///modules/zedcore/logstash/filters/environment/${::environment}.conf from the fileserver.

      I was trying to apply this manifest in my environment "dev_chrisb", which I do have checked out to /etc/puppetlabs/code/environments/dev_chrisb. However, despite the file existing in the location modules/zedcore/files/logstash/filters/environment/dev_chrisb.conf, I am getting an error from the puppet agent:

      Error: /Stage[main]/Logstash::Config/File_concat[ls-config]: Failed to generate additional resources using 'eval_generate': Could not retrieve source(s) puppet:///modules/zedcore/logstash/filters/environment/dev_chrisb.conf

      On the puppet server the following is logged:

      2016-08-18 16:55:27,924 INFO  [qtp955127719-13340] [puppetserver] Puppet Not Found: dev_chrisb.conf is not a known environment

      and the access log:

      192.168.0.113 - - [18/Aug/2016:16:55:27 +0100] "GET /puppet/v3/file_metadata/modules/zedcore/logstash/filters/environment/dev_chrisb.conf?environment=dev_chrisb& HTTP/1.1" 404 101 "-" "Ruby" 6

      It looks like Puppet is failing to parse the URL correctly because of the directory called environment. If I rename that directory to env, with no other changes to my manifests, it works perfectly fine.

      This manifest worked in Puppet 3.7.2 before we upgraded to 4.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            chrisbzc Chris Butler
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support