Does Chef Client 13 treats the PATH environment variable differently from the way Chef Client 12 did?


#1

Does Chef Client 13 treats the PATH environment variable differently from the way Chef Client 12 did? It’s as if Chef Client 13 does not “have as much stuff” in its path than Chef Client 12 did, and a consequence, commands that we used to be able to invoke with their simple command names can no longer be found under Chef Client 13.

Example: A cookbook that used to just call command 'authconfig' now, on test node running Chef Client 13.8.5 (and using Test Kitchen 1.20.0 and ChefDK 2.5.3) yields an error “No such file or directory - authconfig” – but works if we reference the command with its absolute pathname, as: command '/usr/sbin/authconfig'

I know I haven’t given a lot of detail here, but before I give more, I thought I’d ping the community to see if this issue is already known and has been addressed somewhere (where I could not find it.)

Thank you!


#2

Yes, we previously automatically added several folders to the PATH if they weren’t present. This was removed except in cases where it was actually required, as we don’t want to present a false view of things as you have now seen. This means that /usr/sbin is not in $PATH for the chef-client process. How you fix that is up to you.

https://github.com/chef/chef/blob/master/RELEASE_NOTES.md#path-sanity-disabled-by-default-and-modified has more details :slight_smile:


#3

Thank you, @codranger! I appreciate your prompt and authoritative response. I’ll take it from here.