Issue #11968 has been updated by Dominic Cleal.
I suspect what happened is your current directory was /usr/local/nrpe and you ran the Puppet agent from there. Your manifest replaces the directory with a symlink (replace=true, force=true) and so your current directory disappears during the Puppet run. I reproduced this with a simple manifest (https://gist.github.com/1653381): err: /Stage[main]//File[/tmp/test]/ensure: change from directory to link failed: Could not set 'link on ensure: No such file or directory - getcwd at /home/dcleal/code/puppet/tmp/11968.pp:11 err: /Stage[main]//Exec[foo]/returns: change from notrun to 0 failed: No such file or directory - getcwd Unfortunately barely any software works as expected when the current directory disappears (including software Puppet calls), so I don't think Puppet's unusual. The agent would normally run as root and probably has / or root's home dir as its cwd so you wouldn't ordinarily see this. I'd suggest it's not a bug? ---------------------------------------- Bug #11968: Errors from Exec resources when source param of a File resource is a softlink https://projects.puppetlabs.com/issues/11968 Author: Steve Shipway Status: Unreviewed Priority: Normal Assignee: Category: file Target version: Affected Puppet version: 2.7.6 Keywords: Branch: If the location pointed to by source=> in a file{} resource is a softlink, and you do not have links=>follow, then you get some wierd errors relating to getcwd appearing. This is understandable but it should probably give a more helpful error message. I have reliably duplicated this with file { "/usr/local/nrpe": ensure=>present, replace=>yes, recurse=>true, recurselimit=>2, backup=>false, force=>true, ignore=>'.svn', owner=>root, group=>root, mode=>0755, sourceselect=>all, source=>[ "puppet:///modules/nrpe/plugins/$operatingsystem.$architecture", ], } If the puppet: link points to a softlink you get all the Exec errors about getcwd. Replacing with a real directory, or using links=>follow, and all is OK. err: /Stage[main]/Nrpe/File[/usr/local/nrpe]/ensure: change from directory to link failed: Could not set 'link on ensure: No such file or directory - getcwd at /etc/puppet/dev/modules/nrpe/manifests/init.pp:92 err: /Stage[main]/Nrpe/Exec[etc-services-nrpe]: Could not evaluate: No such file or directory - getcwd All the additional errors are with Exec resources. -- 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.
