Project

General

Profile

Actions

Bug #2768

closed

importing classes partially fails when dynamic modulepath has multiple entries

Added by David Schmitt over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Priority:
High
Assignee:
-
Category:
Puppet
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi,

with an modulepath of the form '/srv/puppet/$environment/modules:/srv/puppet_mac/$environment/modules', the smart proxy will only see modules from the second component.

Please apply the following patch to fix this:

--- environment.rb.orig    2013-07-10 13:28:19.945539637 +0200
+++ environment.rb.fixed    2013-07-10 13:28:34.508591835 +0200
@@ -75,7 +75,7 @@
               # Dynamic environments - get every directory under the modulepath
               Dir.glob("#{base_dir.gsub(/\$environment(.*)/,"/")}/*").grep(/\/[A-Za-z0-9_]+$/) do |dir|
                 e = dir.split("/").last
-                new_env[e.to_sym] = base_dir.gsub("$environment", e)
+                new_env[e.to_sym] = [new_env[e.to_sym], base_dir.gsub("$environment", e)].flatten.reject{|d|d.nil?}.join(":")
               end
             end
           end

Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #2738: smart-proxy for puppet not picking up whole module pathClosed07/03/2013Actions
Actions

Also available in: Atom PDF