Issue #12494 has been updated by Chris Price.

I agree with the consensus on #4253 that the "--no-daemonize" argument should 
not cause any significant difference in behavior compared to the daemon mode, 
and can see the case to go ahead and cwd for that since we are doing it for the 
daemon case.

I also agree that doing that cwd at an even higher level (e.g., somewhere where 
it would take effect during an 'apply') would get rid of the error demonstrated 
on this ticket.

However, I'm not 100% sure that users would expect this same behavior for, 
e.g., "puppet apply".  At the very least we'd have to be careful to have 
expanded any relative paths provided as command line args *before* we changed 
the working directory; otherwise, something like "puppet apply ./foo/bar.pp" 
would yield very confusing results.
----------------------------------------
Bug #12494: When cwd is invalid, puppet prints a stack trace
https://projects.puppetlabs.com/issues/12494#change-54551

Author: Ben Ford
Status: Accepted
Priority: Normal
Assignee: Chris Price
Category: Doh!
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


<pre>
[root@henry ~]# mkdir test
[root@henry ~]# cd test
[root@henry test]# puppet apply 
/etc/puppetlabs/puppet/manifests/resource_defaults.pp 
notice: /Stage[main]//File[/tmp/default]/mode: mode changed '644' to '755'
notice: Finished catalog run in 0.05 seconds
[root@henry test]# rm -rf ../test
[root@henry test]# puppet apply 
/etc/puppetlabs/puppet/manifests/resource_defaults.pp 
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in `expand_path': 
No such file or directory - getcwd (Errno::ENOENT)
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in 
`look_in'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in 
`collect'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in 
`look_in'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:54
        from 
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:1:in `require'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:1
        from /usr/local/bin/puppet:3:in `require'
        from /usr/local/bin/puppet:3
[root@henry test]# 
</pre>


-- 
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.

Reply via email to