gds-operations/puppet-graphite — pull request #33 by samjsharpe (2014-12-15 10:55:52+00:00)
Title: Fix cyclical ownership changes

When the following file resources are run, they will be created with the
default user/group permissions (either Puppet's or as specified in a
File default resource):

```
File Ownership set to default
---------------------------------------------|-------------------------
${root_dir}/webapp/graphite user,group
${root_dir}/storage user,group
${root_dir}/storage/whisper user,group
${root_dir}/storage/log/webapp group
${root_dir}/webapp/graphite/initial_data.json user,group
${root_dir}/storage/graphite.db group
${root_dir}/webapp/graphite/local_settings.py user
```

They will then trigger the `set_graphite_ownership` resource which does
a recursive chown through `${root_dir}/{storage,webapp}` changing the
permissions to `${::graphite::user} and ${::graphite::group}`

On the next run of Puppet, this means that the whole cycle will be run
again and hence every time puppet runs, these resources will flip
ownership briefly and more importantly all the graphite services will be
restarted.

I did consider excluding these resources from the
`set_graphite_ownership` resource, but this would make it extremely
opaque and hard to see which files had which ownership.