Corey Hickey
10/23/2025, 11:04 PMthe others use symlinks for their environmentsYes, that can be atomic on the filesystem, but maybe not with respect to the cache? Or does puppetserver understand that a changed symlink in an environment path should use a different cache key? I do see that puppetserver is lstatting the environments dir during a catalog compilation.
$ ag 'lstat.*"/etc/puppetlabs/code/local_environments/production"' /tmp/strace.log
62732:2562158 lstat("/etc/puppetlabs/code/local_environments/production", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
62752:2562158 lstat("/etc/puppetlabs/code/local_environments/production", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
62815:2562158 lstat("/etc/puppetlabs/code/local_environments/production", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
107398:2558367 lstat("/etc/puppetlabs/code/local_environments/production", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
107453:2558367 lstat("/etc/puppetlabs/code/local_environments/production", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
110621:2558367 lstat("/etc/puppetlabs/code/local_environments/production", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
356418:2558367 lstat("/etc/puppetlabs/code/local_environments/production", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0