Chef bootstrap fail


#1

Hi guys,

I am automating the deployment of SAS Analytics using chef. I am just running a script using chef to install all the components. following is the piece of code that install SAS.

batch 'run install setup' do
  code <<-EOH
    D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile "D:/response_files/ap_st_win_server_install.properties"
  EOH
end

When I run the cookbook then I get the following error.

=======================================================================
10.248.28.107 Error executing action run on resource ‘batch[run install setup]’

10.248.28.107 Mixlib::ShellOut::ShellCommandFailed
10.248.28.107 ------------------------------------
10.248.28.107 Expected process to exit with [0], but received '-1'
10.248.28.107 ---- Begin output of "C:\Windows\system32\cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20180509-520-1vp2k3f.bat" ----
10.248.28.107 STDOUT: C:\>D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile "D:/response_files/ap_st_win_server_install.properties"
10.248.28.107 STDERR: 
10.248.28.107 ---- End output of "C:\Windows\system32\cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20180509-520-1vp2k3f.bat" ----
10.248.28.107 Ran "C:\Windows\system32\cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20180509-520-1vp2k3f.bat" returned -1
10.248.28.107 
10.248.28.107 Resource Declaration:
10.248.28.107 ---------------------
10.248.28.107 # In c:/chef/cache/cookbooks/CBK_WIN_SAS/recipes/rcp_all_win_default.rb
10.248.28.107 
10.248.28.107 104: batch 'run install setup' do
10.248.28.107 105:   code <<-EOH
10.248.28.107 106:     D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile "D:/response_files/ap_st_win_server_install.properties"
10.248.28.107 107:   EOH
10.248.28.107 108: end
10.248.28.107 109: 
10.248.28.107 
10.248.28.107 Compiled Resource:
10.248.28.107 ------------------
10.248.28.107 # Declared in c:/chef/cache/cookbooks/CBK_WIN_SAS/recipes/rcp_all_win_default.rb:104:in `from_file'
10.248.28.107 
10.248.28.107 batch("run install setup") do
10.248.28.107   action [:run]
10.248.28.107   retries 0
10.248.28.107   retry_delay 2
10.248.28.107   default_guard_interpreter :batch
10.248.28.107   command "run install setup"
10.248.28.107   backup 5
10.248.28.107   returns 0
10.248.28.107   code "    D:/SAS_Software_Depot/setup.exe -quiet -wait -responsefile \"D:/response_files/ap_st_win_server_install.properties\"\n"
10.248.28.107   interpreter "cmd.exe"
10.248.28.107   declared_type :batch
10.248.28.107   cookbook_name "CBK_WIN_SAS"
10.248.28.107   recipe_name "rcp_all_win_default"
10.248.28.107 end
10.248.28.107 Platform:
10.248.28.107 ---------
10.248.28.107 x64-mingw32
10.248.28.107 [2018-05-09T11:46:10+00:00] INFO: Running queued delayed notifications before re-raising exception

But, If I run chef-client on the specified node, then it does not raise any issue and install everything perfectly. I could not figure out the possible issue in remote bootstrap and chef-client. I would be waiting for experts opinion in this regard.

thanks