The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #13588

log dir is not permissioned properly

Added by Chris Price over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:04/02/2012
Priority:UrgentDue date:
Assignee:-% Done:

0%

Category:settings
Target version:3.0.0
Affected Puppet version: Branch:https://github.com/puppetlabs/puppet/pull/621
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

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.


Related issues

Related to Puppet - Refactor #7749: Bootstrapping Puppet in Ruby code has nasty scope cycles... Closed 06/01/2011
Related to Puppet - Bug #13536: Default rundir now /var/run/puppet and not home dir Rejected 03/30/2012
Related to Puppet - Bug #16637: Puppet confdir and vardir are wrong when running non-root Closed 09/29/2012
Blocked by Puppet - Bug #13584: in daemon mode, master swallows errors during startup Closed 04/02/2012

History

#1 Updated by Chris Price over 2 years ago

Turns out that this is fairly easy to repro—the preconditions are:

  1. must be running as root,
  2. 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
    

#2 Updated by Chris Price over 2 years ago

  • Subject changed from log / var dirs are not always created prior to use to log dir is not permissioned properly

#3 Updated by Chris Price over 2 years ago

Changed the title of this; it looks like the culprit was just the permissions of the log dir.

#4 Updated by Chris Price over 2 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppet/pull/621

#5 Updated by Chris Price over 2 years ago

  • Assignee deleted (Chris Price)

#6 Updated by Josh Cooper about 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from 3.x to 3.0.0

This was merged in commit b19931ad8b0dc7fdcb2444b7a4a7f891a3ed36da

#7 Updated by Moses Mendoza about 2 years ago

  • Status changed from Merged - Pending Release to Closed

released in 3.0.0rc1

Also available in: Atom PDF