Issue #11387 has been updated by Daniel Pittman.

Assignee deleted (Daniel Pittman)

----------------------------------------
Bug #11387: Puppet master recompiles too aggressively
https://projects.puppetlabs.com/issues/11387#change-92276

* Author: Josh Cooper
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: compiler
* Target version: 
* Affected Puppet version: 0.22.2
* Keywords: 
* Branch: 
----------------------------------------
This issue came up while researching support ticket 
[https://support.puppetlabs.com/tickets/351](https://support.puppetlabs.com/tickets/351).
 

Basically, the customer was updating their master's manifests using svn update. 
If any manifest "changes", then the master will discard all cached compiled 
catalogs for all nodes and recompile. While this is "correct" behavior, I found 
that puppet looks at ctime when determining if a cached file is stale or not. 
ctime is the time "when file status was last changed (inode data modification). 
 Changed by the chmod(2), chown(2), link(2), mknod(2), rename(2), unlink(2), 
utimes(2) and write(2) system calls."

As a result, just changing the file permissions will cause the ctime to be 
updated, thereby causing the master to recompile. 

Worst case would be if svn update changed the file permissions every time it 
ran, but puppet itself changed them back to something else. Fortunately, puppet 
doesn't manage file permissions on its manifest directory by default, so this 
shouldn't ever really happen:

<pre>
    :manifestdir => ["$confdir/manifests", "Where puppet master looks for its 
manifests."],
</pre>

It seems like Puppet::Util::LoadedFile should be looking at mtime, which is the 
time "when file data last modified. Changed by the mknod(2), utimes(2) and 
write(2) system calls." This would ensure puppet master only recompiled when 
the manifest file content changes.



-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to