Issue #17371 has been updated by Dominic Cleal.

Category set to settings
Status changed from Unreviewed to Accepted
Affected Puppet version changed from 3.0.1 to 3.0.0
Keywords set to settings mode permissions run_mode

I agree with Greg, I can reproduce this specifying just the mode parameter.  I 
believe this is related to run_mode (#7316).  As far as I can tell, the code 
flow is as follows:

1. `run_mode` is "user" to begin with
1. `Puppet::Settings.unsafe_parse` is called to parse and load the config
1. at the end of `unsafe_parse`, it iterates over the `searchpath` (sections of 
puppet.conf), initialising metadata (via `set_metadata`) for each section.  
Since run_mode is still "user", the `:run_mode` section in the searchpath 
doesn't cause it to initialise metadata for the master section.
1. `initialize_app_defaults` is called and `run_mode` is initialised to "master"

Greg found that if you explicitly add `:master` to the `searchpath`, then the 
metadata gets initialised correctly.  This seems to simply cut out the problem 
of the run_mode not having been initialised by the point searchpath is iterated 
over to set metadata.
----------------------------------------
Bug #17371: Setting owner, group, mode for files specified in puppet.conf no 
longer seems to work
https://projects.puppetlabs.com/issues/17371#change-76517

Author: Andreas Ntaflos
Status: Accepted
Priority: Normal
Assignee: 
Category: settings
Target version: 
Affected Puppet version: 3.0.0
Keywords: settings mode permissions run_mode
Branch: 


It seems that setting owner, group and mode for files in puppet.conf by using 
the following method, as explained in the configuration guide, no longer works 
in Puppet 3.0 (using Puppet 3.0.1 here on Ubuntu 12.04):

    /etc/puppet/puppet.conf:

    [master]
    ...
    autosign = /etc/puppet/autosign.conf { owner = puppet, group = puppet, mode 
= 0664 }

The settings specified in the curly braces do not get applied to the file. 

Instead, after changing the mode manually (`chmod 0664 
/etc/puppet/autosign.conf`) it is reset to 0644 after a request to the 
puppetmaster comes in. Interestingly it seems that when manually changing the 
owner of the file it stays changed, even after a request comes in that triggers 
the manually changed mode to be reset.

And as nfagerlund observed on IRC it seems that specifying an owner keeps the 
mode setting from working. Setting a mode alone, i.e. `autosign = 
/etc/puppet/autosign.conf { mode = 0664 }` works.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to