diff options
| author | Luke Kanies <luke@madstop.com> | 2009-08-23 12:10:35 -0700 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-08-24 11:34:38 +1000 |
| commit | c0da3bfebb40198703d7d99f2809b315682e28fc (patch) | |
| tree | b58b7ebf1cddc3516049d7b178b010cc2025acac /lib/puppet/indirector | |
| parent | ff39bc707e7f37ddeb28203a9e1bfaddcb9dc641 (diff) | |
| download | puppet-c0da3bfebb40198703d7d99f2809b315682e28fc.tar.gz puppet-c0da3bfebb40198703d7d99f2809b315682e28fc.tar.xz puppet-c0da3bfebb40198703d7d99f2809b315682e28fc.zip | |
Fixing #2558 - propagating recent fileserving changes
I'd made changes to the internals of the fileserving
system to fix #2544 (mostly switched from passing
the node around and then calculating the environment to just
passing the environment around), but those changes weren't consistent
throughout the fileserving code.
In the process of making them consistent, I realized that the
plain file server actually needs the node name rather than
the environment, so I switched to passing the request around,
because it has both pieces of information.
Also added further integration tests which will hopefully keep
this from cropping up again.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/indirector')
| -rw-r--r-- | lib/puppet/indirector/file_server.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/indirector/file_server.rb b/lib/puppet/indirector/file_server.rb index fe4d4aa1c..18ac20824 100644 --- a/lib/puppet/indirector/file_server.rb +++ b/lib/puppet/indirector/file_server.rb @@ -30,7 +30,7 @@ class Puppet::Indirector::FileServer < Puppet::Indirector::Terminus # The mount checks to see if the file exists, and returns nil # if not. - return nil unless path = mount.find(relative_path, request.environment) + return nil unless path = mount.find(relative_path, request) result = model.new(path) result.links = request.options[:links] if request.options[:links] result.collect @@ -42,7 +42,7 @@ class Puppet::Indirector::FileServer < Puppet::Indirector::Terminus def search(request) mount, relative_path = configuration.split_path(request) - unless mount and paths = mount.search(relative_path, request.environment) + unless mount and paths = mount.search(relative_path, request) Puppet.info "Could not find filesystem info for file '%s' in environment %s" % [request.key, request.environment] return nil end |
