-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoMethodErrors using Windows and Powershell cookbooks #155
Comments
Also, if this is using the windows cookbook, you are being affected by the same issue that causes #150 |
Glad to know it's not just me. If any further info/debug is required, I'm happy to help! |
I think we should be good, should have a release both to Chef and the windows cookbook with both issues fixed on Monday |
Awesome - thanks a ton! |
What's the last known good version of the opscode windows cookbook so that users can fallback to something workable over the hectic weekend? Perhaps just before the last PR at 1298ae5 ? |
As @jdmundrawala reports, the Now, does anyone on this Windows team know why chef-solo on the Windows VM would be unable to find the rb roles files that are in the |
Hm...I cloned the master branch of the Opscode Windows cookbook from github, deleted the old from my Chef server, uploaded the new one...but still having issues. Maybe it's simple...? I fully nuked chef-client off this VM, uninstalled, cleaned the dirs, etc... Edit: I should note - this is on a 2008R2 box. The 2012R2 box is working again. <SNIP>
Compiling Cookbooks...
[2014-12-15T08:03:40-05:00] INFO: Powershell light-weight provider is already initialized -- Skipping loading c:/chef/cache/cookbooks/powershell/providers/default.rb!
Converging 25 resources
Recipe: CORP-baseWindows::default
* windows_feature[TelnetClient] action install[2014-12-15T08:03:41-05:00] INFO: Processing windows_feature[TelnetClient] action install (CORP-baseWindows::default line 12)
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/mixlib-shellout-2.0.0-x86-mingw32/lib/mixlib/shellout/windows.rb:152:
[BUG] Segmentation fault
ruby 2.0.0p451 (2014-02-24) [i386-mingw32]
-- Control frame information -----------------------------------------------
c:0040 p:---- s:0177 e:000176 CFUNC :select
c:0039 p:0042 s:0170 e:000169 METHOD C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/mixlib-shellout-2.0.0-x86-mingw32
/lib/mixlib/shellout/windows.rb:152
c:0038 p:0532 s:0162 e:000161 METHOD C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/mixlib-shellout-2.0.0-x86-mingw32
/lib/mixlib/shellout/windows.rb:117
c:0037 p:0065 s:0145 e:000144 METHOD C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/mixlib-shellout-2.0.0-x86-mingw32
/lib/mixlib/shellout.rb:237
c:0036 p:0052 s:0141 e:000140 METHOD C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/shell_out.rb:91
<SNIP> serverName [2014-12-15T08:29:53-05:00] INFO: Processing windows_package[Windows Management Framework Core4.0] action install (powershell::powershell4 line 36)
serverName [2014-12-15T08:29:54-05:00] INFO: Installing windows_package[Windows Management Framework Core4.0] version latest
serverName [2014-12-15T08:29:54-05:00] INFO: Processing remote_file[c:/chef/cache/Windows8-RT-KB2799888-x64.msu] action create (dynamically defined)
serverName [2014-12-15T08:29:56-05:00] INFO: remote_file[c:/chef/cache/Windows8-RT-KB2799888-x64.msu] created file c:/chef/cache/Windows8-RT-KB2799888-x64.msu
serverName [2014-12-15T08:29:56-05:00] INFO: remote_file[c:/chef/cache/Windows8-RT-KB2799888-x64.msu] updated file contents c:/chef/cache/Windows8-RT-KB2799888-x64.msu
serverName [2014-12-15T08:29:57-05:00] INFO: Starting installation...this could take awhile.
serverName
serverName ================================================================================
serverName Error executing action `install` on resource 'windows_package[Windows Management Framework Core4.0]'
serverName ================================================================================
serverName
serverName Mixlib::ShellOut::ShellCommandFailed
serverName ------------------------------------
serverName Expected process to exit with [0, 42, 127], but received '5'
serverName ---- Begin output of start "" /wait "c:\chef\cache\Windows8-RT-KB2799888-x64.msu" /quiet /restart & exit %%ERRORLEVEL%% ----
serverName STDOUT:
serverName STDERR:
serverName ---- End output of start "" /wait "c:\chef\cache\Windows8-RT-KB2799888-x64.msu" /quiet /restart & exit %%ERRORLEVEL%% ----
serverName Ran start "" /wait "c:\chef\cache\Windows8-RT-KB2799888-x64.msu" /quiet /restart & exit %%ERRORLEVEL%% returned 5
serverName
serverName Cookbook Trace:
serverName ---------------
serverName c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:109:in `install_package'
serverName c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:31:in `block in <class:WindowsCookbookPackage>'
serverName
serverName Resource Declaration:
serverName ---------------------
serverName # In c:/chef/cache/cookbooks/powershell/recipes/powershell4.rb
serverName
serverName 36: windows_package 'Windows Management Framework Core4.0' do
serverName 37: source node['powershell']['powershell4']['url']
serverName 38: #checksum node['powershell']['powershell4']['checksum']
serverName 39: installer_type :custom
serverName 40: action :install
serverName 41: options '/quiet /restart'
serverName 42: not_if do
serverName 43: begin
serverName 44: registry_data_exists?('HKLM\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', { :name => 'PowerShellVersion', :type => :string, :data => '4.0' })
serverName 45: rescue Chef::Exceptions::Win32RegKeyMissing
serverName 46: false
serverName 47: end
serverName 48: end
serverName 49: end
serverName
serverName Compiled Resource:
serverName ------------------
serverName # Declared in c:/chef/cache/cookbooks/powershell/recipes/powershell4.rb:36:in `from_file'
serverName
serverName windows_cookbook_package("Windows Management Framework Core4.0") do
serverName provider Chef::Provider::WindowsCookbookPackage
serverName action [:install]
serverName retries 0
serverName retry_delay 2
serverName default_guard_interpreter :default
serverName cookbook_name "powershell"
serverName recipe_name "powershell4"
serverName source "http://download.microsoft.com/download/3/D/6/3D61D262-8549-4769-A660-230B67E15B25/Windows8-RT-KB2799888-x64.msu"
serverName installer_type :custom
serverName options "/quiet /restart"
serverName package_name "Windows Management Framework Core4.0"
serverName timeout 600
serverName success_codes [0, 42, 127]
serverName not_if { #code block }
serverName end
serverName
serverName [2014-12-15T08:29:58-05:00] INFO: Running queued delayed notifications before re-raising exception
serverName [2014-12-15T08:29:58-05:00] ERROR: Running exception handlers
serverName [2014-12-15T08:29:58-05:00] ERROR: Exception handlers complete
serverName [2014-12-15T08:29:58-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
serverName [2014-12-15T08:29:58-05:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: windows_package[Windows Management Framework Core4.0] (powershell::powershell4 line 36) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process
to exit with [0, 42, 127], but received '5'
serverName ---- Begin output of start "" /wait "c:\chef\cache\Windows8-RT-KB2799888-x64.msu" /quiet /restart & exit %%ERRORLEVEL%% ----
serverName STDOUT:
serverName STDERR:
serverName ---- End output of start "" /wait "c:\chef\cache\Windows8-RT-KB2799888-x64.msu" /quiet /restart & exit %%ERRORLEVEL%% ----
serverName Ran start "" /wait "c:\chef\cache\Windows8-RT-KB2799888-x64.msu" /quiet /restart & exit %%ERRORLEVEL%% returned 5 |
I'm assuming this is fixed with the patch to Chef 12.0.0 - I couldn't find any info on when the new RPM would come out, and didn't see anything particular on updating an RPM install w. github code. (assuming it's a bad idea) Could someone please point me in the right direction? (or let me know when new packages will be ready?) Thanks! |
Thought I'd update and close this. I saw that 12.0.1 was released, so updated to that - no luck, did not resolve the issue I was having. Closer inspection revealed it seemed to be an issue with chef-client 12.x running on 2008 R2 (was getting Ruby segmentation faults). I now run with --bootstrap-version=11.16.4-01 (or whatever it is) and having no issues doing chef runs on those clients. So there ya go. |
I updated our chef-server to v12.0.0 today (chasing SSL issues), now a chef-client run returns this:
On hosts that need powershell v4 installed (the above is 2012R2), like 2008R2, I was also seeing the same error style but for 'checksum'. Commenting out the 'checksum' line in the powershell v4 recipe allowed the install to complete.
This link describes my issue pretty close: http://lists.opscode.com/sympa/arc/chef/2014-07/msg00226.html
Debug info looks like this:
Line#20 of the referenced recipe:
At this point, unless this is an easy fix, I have no choice but to downgrade. Pretty sure this is an issue with the windows cookbook, but still a Chef newbie....so...maybe I've broken something?
The text was updated successfully, but these errors were encountered: