log dir is not permissioned properly
|Affected Puppet version:||Branch:||https://github.com/puppetlabs/puppet/pull/621|
As a result of #7749, the order in the lifecycle at which Puppet::Util::Settings#use gets called w/rt log/var dirs has changed. This is causing failures on the jenkins acceptance tests, because webrick attempts to create a log file in the log directory before it has been created.
#1 Updated by Chris Price over 1 year ago
Turns out that this is fairly easy to repro—the preconditions are:
- must be running as root,
must delete the directory /var/lib/puppet before running.
root@pe-ubuntu-lucid:~# puppet master --dns_alt_names="puppet,ubuntu-1004-64-1" --verbose --noop --no-daemonize --logdest=/root/chris-puppetmaster.log notice: Starting Puppet master version 2.7.12 /usr/local/lib/site_ruby/1.8/puppet/network/http/webrick.rb:70:in `initialize': Permission denied - /var/lib/puppet/log/masterhttp.log (Errno::EACCES) from /usr/local/lib/site_ruby/1.8/puppet/network/http/webrick.rb:70:in `open' from /usr/local/lib/site_ruby/1.8/puppet/network/http/webrick.rb:70:in `setup_logger' from /usr/local/lib/site_ruby/1.8/puppet/network/http/webrick.rb:20:in `listen' from /usr/local/lib/site_ruby/1.8/puppet/network/server.rb:101:in `listen' from /usr/local/lib/site_ruby/1.8/puppet/network/server.rb:116:in `start' from /usr/local/lib/site_ruby/1.8/puppet/daemon.rb:124:in `start' from /usr/local/lib/site_ruby/1.8/puppet/application/master.rb:199:in `main' from /usr/local/lib/site_ruby/1.8/puppet/application/master.rb:146:in `run_command' from /usr/local/lib/site_ruby/1.8/puppet/application.rb:315:in `run' from /usr/local/lib/site_ruby/1.8/puppet/application.rb:409:in `plugin_hook' from /usr/local/lib/site_ruby/1.8/puppet/application.rb:315:in `run' from /usr/local/lib/site_ruby/1.8/puppet/util.rb:478:in `exit_on_fail' from /usr/local/lib/site_ruby/1.8/puppet/application.rb:315:in `run' from /usr/local/lib/site_ruby/1.8/puppet/util/command_line.rb:138:in `execute' from /usr/bin/puppet:4