Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 0.10.2
-
Fix Version/s: 0.10.8
-
Component/s: Chef Client
-
Labels:None
-
Environment:
Windows Chef 0.10.2
Description
I have been hesitant to file this bug because I do not have a clear understanding of why this is happening and if this is an intended behavior. Create a file called "C:\Program Files\Sysinternals\Config.bgi"
Have chef execute the following recipe:
execute "C:\Program Files\Sysinternals\Config.bgi" do command "xcacls \"C:\\Program Files\\Sysinternals\\Config.bgi\" /reset /t" returns [0] action :run end
This command should overwrite the acl on the file with a inherited acl (a work around for anther open bug). Note that the command fails with a return code of 42. When this command is run via command line the return code is always 0. Note that the command actually does what it is supposed to do (reset the dacl on the file), chef just erroneously reports return code 42.
This is not the only process that does this, I have another 5 or so examples which seemingly randomly return error code 42. Now a decent work around is to add 42 as a successful return code. We are doing this today, but is seems odd that I should have to deal with a seemingly "fake" return code.
Could be related to: http://docstore.mik.ua/orelly/other/python2/Chapter%203.htm (yes I know that this is python... but it is the same behavior)