summaryrefslogtreecommitdiff
path: root/ext/rack
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2012-08-02 16:59:36 -0700
committerJeff McCune <jeff@puppetlabs.com>2012-08-05 10:43:35 -0700
commit38cba0a4294aba696f6184f3c5b91c2a569c7fed (patch)
tree0f9f79c1651756da0ed979679bab83e35ac00ba9 /ext/rack
parentaef0d55a3b6ef12804c044c5983700b050851635 (diff)
downloadpuppet-38cba0a4294aba696f6184f3c5b91c2a569c7fed.tar.gz
(#15337) Do not merge user and system puppet.conf
Puppet 3.x reads settings from both ~/.puppet/puppet.conf and the system puppet.conf without this patch applied. This is a problem because it makes it difficult to determine where to load plugins and extensions from at runtime. Merging the configuration file also makes it more difficult to explain where a particular setting is taking effect. This patch makes the intended `puppet.conf` reading behavior the following: 1: If provided, use explicit puppet.conf in `--confdir` 2: If root, use system puppet.conf 3: Otherwise, use ~/.puppet/puppet.conf This patch also changes the behavior of rack puppet master applications. We now intended for the rack configuration file, `config.ru` to explicitly set `--confdir` to avoid reading from `~/.puppet/puppet.conf`. Please see the example in `ext/rack/files/config.ru` for an up to date rack configuration.
Diffstat (limited to 'ext/rack')
-rw-r--r--ext/rack/files/config.ru3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/rack/files/config.ru b/ext/rack/files/config.ru
index fc4dd9f82..c825d22b7 100644
--- a/ext/rack/files/config.ru
+++ b/ext/rack/files/config.ru
@@ -11,6 +11,9 @@ $0 = "master"
ARGV << "--rack"
+# Rack applications typically don't start as root. Set --confdir to prevent
+# reading configuration from ~/.puppet/puppet.conf
+ARGV << "--confdir" << "/etc/puppet"
# NOTE: it's unfortunate that we have to use the "CommandLine" class
# here to launch the app, but it contains some initialization logic