Affects Version/s: PUP 3.7.0
Fix Version/s: PUP 3.7.1
We use puppet environments, and symlink the puppet folder of one of our git repos to /etc/puppet/environment.
This is how it looks like:
#:/etc/puppet/environments$ ls -l
lrwxrwxrwx 1 root root 47 Jul 4 10:05 user1 -> /var/lib/ops-automation.user1/puppet
lrwxrwxrwx 1 root root 49 Jul 4 10:05 user2 -> /var/lib/ops-automation.user2/puppet
lrwxrwxrwx 1 root root 49 Jul 4 10:05 production -> /var/lib/ops-automation.production/puppet
After we upgraded to puppet 3.7.0 this morning, Puppet would remove the symlink /etc/puppet/environment/production and replace it with an empty folder. Reverting to 3.6.2 fixed the issue for us.
I suspect it might be linked to this patch:
It seems to ensure the environment folder is a directory and manage it if this, among other things, is true:
Though in our case, the file exists but isn't a directory. If I'm right with this assumption, testing if the filepath is a directory rather than checking if the filepath exists could fix it...