criteo-cookbooks / ms_dotnet Goto Github PK
View Code? Open in Web Editor NEWChef Cookbook to install Microsoft .NET
License: Apache License 2.0
Chef Cookbook to install Microsoft .NET
License: Apache License 2.0
Installation of .NET 4.6 with this cookbook does not work on a Windows 2012 R2 eval box without windows updates.
The box has been created using "eval-win2012r2-standard" from https://github.com/boxcutter/windows, and has no windows update installed.
The ms_dotnet_framework
fails. If I run manually the .NET installer, I see that some updates (KB2919355) are required:
Do you think it is possible to install required Windows updates automatically with this Chef cookbook?
Or do I have to include the required Windows updates in my Windows box? Do you know if there are other requirements to install .NET on specific Windows versions? It would be great to list the requirements in this cookbook README.md
.
I am getting this error:
[2017-04-12T10:30:31-07:00] ERROR: Running exception handlers
Running handlers complete
[2017-04-12T10:30:31-07:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 07 seconds
[2017-04-12T10:30:31-07:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
[2017-04-12T10:30:31-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-12T10:30:31-07:00] FATAL: SyntaxError: C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/test/recipes/_vs.rb:33: syntax error, unexpected =>, expecting '}'
...fff45bba7d2b7da09df55d16166" => "http://artifactory.test.net...
...../var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:47: warning: already initialized constant WORKSTATION
/var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:48: warning: already initialized constant DOMAIN_CONTROLLER
/var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:49: warning: already initialized constant SERVER
./var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:47: warning: already initialized constant WORKSTATION
/var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:48: warning: already initialized constant DOMAIN_CONTROLLER
/var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:49: warning: already initialized constant SERVER
./var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:47: warning: already initialized constant WORKSTATION
/var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:48: warning: already initialized constant DOMAIN_CONTROLLER
/var/folders/np/3zdvdwbx5z54crpd4mrhhdk00000gp/T/d20160106-71545-138jg2p/cookbooks/ms_dotnet/libraries/windows_version_helper.rb:49: warning: already initialized constant SERVER
Coming here from the network_interfaces_v2 cookbook and targeting Ubuntu for development.
Lines 46-50 are missing the unless defined?
conditional which will spit out warnings when ChefSpec reloads the library per test case.
ms_dotnet
cookbook has been released multiple times ... without any tests!
We should really focus on adding rspec tests for libraries and chefspecs for recipes.
The 4.5.2 installer uses WUSA which is restricted for remote shells. Trying to bootstrap or run chef-client of winrm results in a failure "Access denied" during the install. This issue could apply to all other installs as well, but haven't confirmed. The only workarounds I've found are
I was trying to install 4.7 following the example:
Install .NET 4.5.2 from custom sources
(except providing a valid checksum and download url)
4.7 has not been installed yet, but it never gets to the download. The run indicates:
I'm trying to specify a custom package source per the doc and am getting a SyntaxError at runtime:
ms_dotnet_framework '4.6.1' do
action :install
include_patches false
package_sources { beaa901e07347d056efe04e8961d5546c7518fab9246892178505a7ba631c301: 'https://s3.amazonaws.com/****************/dotnet/distributions/NDP461-KB3102436-x86-x64-AllOS-ENU.exe' }
require_support true
end
SyntaxError
-----------
C:/local-mode-cache/cache/cookbooks/*********/recipes/installDotNet.rb:25: syntax error, unexpected ':', expecting '}'
...18fab9246892178505a7ba631c301": 'https://s3.amazonaws.com/se...
... ^
Is the syntax slightly different?
Running arcgis-enterprise::system results in a fatal error (16389). ms_dotnet is a dependency for this cookbook.
Chef-client version: 12.21.3
Client was installed via bootstrap on Windows Server 2008 R2
Environment:
`{
"msdotnet": {
"v4": {
"package_sources": "https://download.microsoft.com/download/1/6/7/167F0D79-9317-48AE-AEDB-17120579F8E2/NDP451-KB2858728-x86-x64-AllOS-ENU.exe"
}
},
"arcgis": {
"version": "10.5.1",
"data_store": {
"data_dir": "C:\arcgisdatastore"
},
"server": {
"directories_root": "C:\arcgisserver"
},
"portal": {
"data_dir": "C:\arcgisportal"
}
}
}`
Run list:
"run_list":[
"recipe[arcgis-enterprise::system]",
"recipe[arcgis-enterprise::server]",
"recipe[arcgis-enterprise::federation]"
]
Error message:
SERV01.website.com================================================================================←[0m SERV01.website.com ←[31mError executing action
install on resource 'ms_dotn et_framework[4.5.1]'←[0m SERV01.website.com ========================================================== ======================←[0m
SERV01.website.com [2018-01-18T11:06:37-05:00] FATAL: Mixlib::ShellOut::Shell CommandFailed: arcgis_enterprise_server[Install System Requirements:server] (ar cgis-enterprise::server line 31) had an error: Mixlib::ShellOut::ShellCommandFa iled: ms_dotnet_framework[4.5.1] (ms_dotnet::ms_dotnet4 line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: windows_package[Microsoft .NET Framework 4.5.1] (c:/chef/cache/cookbooks/ms_dotnet/resources/framework.rb line 77) had a n error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0 , 3010], but received '16389'
I'm not entirely sure where to start with debugging this. It appears to be related to the MS .NET 4.5.1 configuration.
Is it possible for me to have my usage cause a reboot? It doesn't currently and I've found that 4.6.1 needs that for the server to truly complete the install process.
It will be nice if the hash containing urls for msi download can be moved to node attributes so properties can be override, and if a new .NET version come outside the only need will be to add the new version to the hash.
Regards.
The metadata has not been updated hence the broken links are still in the cookbook package helper in the chef supermarket. Could you please update the version and push the new cookbook version to the chef supermarket?
Hi,
I downloaded this ms_dotnet package and wanted to use on our Chef Server due to certain .msi packages need to require .NET package framework to run/install. But, I encountered this when run this cookbook. It keeps saying unable to satisfy constraints on package windows. For instance, a .msi package requires to have .NET framework version 2.0 to run.
The machine/node I am using is a Windows10.
Here's a complete error:
Unsatisfiable Run List Item
Unable to satisfy constraints on package windows, which does not exist, due to solution constraint (ms_dotnet >= 0.0.0). Solution constraints that may result in a constraint on windows: [(ms_dotnet = 4.2.1) -> (windows >= 2.1.0)]
and here's the output from a stacktrace file:
Generated at 2019-02-12 10:52:59 -0800
Net::HTTPServerException: 412 "Precondition Failed"
C:/opscode/chef/embedded/lib/ruby/2.5.0/net/http/response.rb:122:in error!' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/http.rb:152:in
request'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/http.rb:131:in post' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/policy_builder/expand_node_object.rb:177:in
sync_cookbooks'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/policy_builder/expand_node_object.rb:83:in setup_run_context' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/client.rb:515:in
setup_run_context'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/client.rb:281:in run' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/application.rb:303:in
run_with_graceful_exit_option'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/application.rb:279:in block in run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/local_mode.rb:44:in
with_server_connectivity'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/application.rb:261:in run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/application/client.rb:444:in
run_application'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/lib/chef/application.rb:66:in run' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.10.9-universal-mingw32/bin/chef-client:25:in
<top (required)>'
C:/opscode/chef/embedded/bin/chef-client:23:in load' C:/opscode/chef/embedded/bin/chef-client:23:in
Any ideas/suggestions?
Just to pose the question, should this cookbook support the ability to deploy security rollups for the .Net Framework as part of the custom resource via an additional optional parameter?
If you deploy .Net to a fully-patched server, there can be additional items to install after-the-fact if any security patches have been released since the initial release of that particular version.
I'm attempting to use this cookbook on Windows Server 2019 (I know it's not in the supported OS list). I have a 2019 server that does not yet have v4.8 installed. I run this cookbook on it, it thinks it is already installed (up -to-date). More of a request than an issue. Otherwise, great cookbook! Works amazing on Server 2016.
Hello,
As defined here: https://msdn.microsoft.com/en-us/library/8z6watww%28v=vs.110%29.aspx
.NET 4.6.1 and 4.6.2 is applicable only on windows 10 RTM.
For Windows 10 Anniversary and windows 2016, only .NET 4.7 is installable.
Don't know if it is the only change to do at:
https://github.com/criteo-cookbooks/ms_dotnet/blob/master/libraries/v4_helper.rb
@package_setup ||= case nt_version
# Windows XP & Windows Server 2003
when 5.1, 5.2 then %w(4.0)
# Windows Vista & Server 2008
when 6.0 then %w(4.0 4.5 4.5.1 4.5.2 4.6)
# Windows 7 & Server 2008R2
when 6.1 then %w(4.0 4.5 4.5.1 4.5.2 4.6 4.6.1 4.6.2 4.7)
# Windows 8 & Server 2012
when 6.2 then %w(4.5.1 4.5.2 4.6 4.6.1 4.6.2 4.7)
# Windows 8.1 & Server 2012R2
when 6.3 then %w(4.5.2 4.6 4.6.1 4.6.2 4.7)
# Windows 10 RTM
when 10.0.10240 then %w(4.6.1 4.6.2 4.7)
# Windows 10 November Update
when 10.0.10586 then %w(4.6.2 4.7)
# Windows 10 anniversary & Server 2016
when 10.0.14393 then %w(4.7)
# Windows 10 November Update
when 10.0.15063 then []
# Other versions
else []
end
Hope it can help.
Regards,
The latest code and docs list requirements of simply: Chef 11.10.0+
. However, the Framework.rb
under resources uses DSL syntax that wasn't introduced until 12.6 per this GH comment:
Thus, if a user on chef-client 12.5 attempts to run the cookbook they will get an error indicating that unsupported?
is not defined as the action_class
below needs to have .class_eval
appended to it.
Seems like either updating the docs to indicate a 12.6+ requirement or using the backwards compatible syntax would fix this.
Hello,
The KB3021910 has been replaced by KB3173424.
Actually, when running ms_dotnet_framework[4.6.2] resource and if the replaced KB is installed, an error occurs:
STDERR: ---- End output of start "" /wait "c:\chef\cache\package\windows8.1-kb3021910-x64.msu" /norestart /quiet & exit %%%%ERRORLEVEL%%%% ---- Ran start "" /wait "c:\chef\cache\package\windows8.1-kb3021910-x64.msu" /norestart /quiet & exit %%%%ERRORLEVEL%%%% returned -2145124329)
The dependency should be changed in package_helper.rb.
Best Regards,
ms_dotnet
version 3.2.0
Running on Windows 7 SP1 without .Net 4.5 always skipping installing 4.5 version
Recipe: ms_dotnet::ms_dotnet4
* ms_dotnet_framework[4.5.2] action install[2017-04-13T16:39:38+04:00] INFO: Processing ms_dotnet_framework[4.5.2] action install (ms_dotnet::ms_dotnet4 line 24)
[2017-04-13T16:39:38+04:00] INFO: .NET `4.5.2' is not needed because .NET `4.5.2' is already installed
(up to date)
[2017-04-13T16:39:38+04:00] INFO: Chef Run complete in 1.532203 seconds
Running handlers:
[2017-04-13T16:39:38+04:00] INFO: Running report handlers
Running handlers complete
[2017-04-13T16:39:38+04:00] INFO: Report handlers complete
Chef Client finished, 0/1 resources updated in 09 seconds
Finished converging <v4-windows-posready7> (0m54.82s).
I double check: registry v4.0 for Net Framework Setup doesn't exist.
With Berksfile
cookbook 'ms_dotnet', '= 3.1.1'
cookbook 'windows', '= 2.1.1'
it works as expected.
Windows 3.0.0 cookbook removed windows_package resource in favor of the built in chef-client one. Chef-client one renamed success_codes option to returns.
The download path to .net 4.7.2 has changed to https://download.visualstudio.microsoft.com/download/pr/1f5af042-d0e4-4002-9c59-9ba66bcf15f6/089f837de42708daacaae7c04b7494db/ndp472-kb4054530-x86-x64-allos-enu.exe.
The current path in here needs to be adjusted to the new path. Could you kindly adjust the path in the package_helper?
It is also possible the path for all of the previous versions have been changed as well.
diff --git a/libraries/v4_helper.rb b/libraries/v4_helper.rb
index 6863871..fd0adda 100644
--- a/libraries/v4_helper.rb
+++ b/libraries/v4_helper.rb
@@ -117,9 +117,9 @@ module MSDotNet
def prerequisite_names
@prerequisite_names ||= case nt_version
when 6.1
- { '4.7' => 'KB4019990-6.1' }
+ { '4.7' => ['KB4019990-6.1'] }
when 6.2
- { '4.7' => 'KB4019990-6.2' }
+ { '4.7' => ['KB4019990-6.2'] }
when 6.3
prerequisites46 = %w(KB2919442 KB2919355 KB3173424)
{
this fixes the problem with 4.7
Running the following recipe:
ms_dotnet_framework '4.6.2' do
action :install
include_patches true
perform_reboot false
require_support true
end
In this environment:
[2016-12-12T03:06:13+00:00] INFO: *** Chef 12.2.1 ***
[2016-12-12T03:06:47+00:00] INFO: Loading cookbooks [[email protected], [email protected], [email protected], [email protected], [email protected], [email protected]]
Yields this warning in the chef logs:
[2016-12-12T03:07:01+00:00] INFO: Processing ms_dotnet_framework[4.6.2] action install (windows_se_node::install line 10)
[2016-12-12T03:07:01+00:00] WARN: Please use the package resource available in Chef Client 12.6+.
windows_package will be removed in the next major version release of the Windows cookbook on 4/2017.
[2016-12-12T03:07:01+00:00] WARN: Please use the package resource available in Chef Client 12.6+.
windows_package will be removed in the next major version release of the Windows cookbook on 4/2017.
[2016-12-12T03:07:01+00:00] WARN: Please use the package resource available in Chef Client 12.6+.
windows_package will be removed in the next major version release of the Windows cookbook on 4/2017.
[2016-12-12T03:07:01+00:00] INFO: Processing windows_package[Update for Microsoft Windows (KB3021910)] action install (c:/chef/runs/796baa91-6fc9-457a-8e72-cc55aac22b8f/local-mode-cache/cache/cookbooks/ms_dotnet/providers/framework.rb line 71)
Indicating that windows_package
is deprecated in favor of package
.
Clearly I'm only on Chef 12.2, and I will be until whenever AWS decides to upgrade the Chef stack for OpsWorks. This indicates that by 2017/04 this repo will need to update its package
tool usage and/or provide a version with the windows
dependency locked at an older version.
I get the following when upgraded to 3.0.0 from 2.6.1. This is being run on a 2012 R2 server.
I am installing .Net 4.6.1
ms_dotnet_framework[4.6.1](ms_dotnet::ms_dotnet4 line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: windows_package[Update for Microsoft Windows (KB2919442)](c:/chef/cache/cookbooks/ms_dotnet/providers/framework.rb line 53) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 3010], but received '-2145124329' ---- Begin output of start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit %%%%ERRORLEVEL%%%% ---- STDOUT: STDERR: ---- End output of start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit %%%%ERRORLEVEL%%%% ---- Ran start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit %%%%ERRORLEVEL%%%% returned -2145124329
The note doesn't seem to elaborate the workarounds for winrm issue.
Best solution: your remoting system should try to simulate a local session (psexec or schedule task)
Other solution: create your custom wrapper to simulate a local session
Can you please add examples for these workarounds atleast for the any one of them?
I am trying to install .Net 3.5 on windows server 2016, but I recievde this error:
` The operation is complete but NetFx3 feature was not enabled.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
STDERR:
---- End output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:NetFx3 /norestart /All ----
Ran C:\Windows\system32\dism.exe /online /enable-feature /featurename:NetFx3 /norestart /All returned 50
Resource Declaration:
---------------------
# In C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/cookbooks/windows/resources/feature.rb
60: windows_feature_dism new_resource.name do
61: action desired_action
62: feature_name new_resource.feature_name
63: source new_resource.source if new_resource.source
64: all new_resource.all
65: end
66: when :windows_feature_servermanagercmd
Compiled Resource:
------------------
# Declared in C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/cookbooks/windows/resources/feature.rb:60:in `run_default_provider'
windows_feature_dism("NetFx3") do
action [:install]
updated true
updated_by_last_action true
default_guard_interpreter :default
declared_type :windows_feature_dism
cookbook_name "ms_dotnet"
feature_name "NetFx3"
all true
end
System Info:
------------
chef_version=13.1.31
platform=windows
platform_version=10.0.14393
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
program_name=C:/opscode/chef/bin/chef-client
executable=C:/opscode/chef/bin/chef-client
================================================================================
Error executing action `install` on resource 'windows_feature[NetFx3]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
windows_feature_dism[NetFx3] (C:/Users/ADMINI~1/AppData/Local/Temp/kitchen/cache/cookbooks/windows/resources/feature.rb line 60) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 42, 127, 3010], but received '50'
---- Begin output of C:\Windows\system32\dism.exe /online /enable-feature /featurename:NetFx3 /norestart /All ----
STDOUT: Deployment Image Servicing and Management tool
Version: 10.0.14393.0
`
netfx3 is not supported on server 2016 causing the chef run to fail when using the defaults since 10 is listed in the versions supported for the feature
How to reboot when a reboot is required between the installation of a dependency and the installation of .NET?
(NB: issue #30 was specific to reboot after .NET installation)
Last July, I've already had this issue (#27 (comment)) but I solved it by using the Windows Reboot Handler provided by the windows cookbook, as suggested in commit message 7716fc9.
However, resource windows_reboot
and reboot handler were removed from version 2.0.0 of the windows cookbook. windows_reboot
can be replaced by the reboot
resource in Chef 12.1+, but how to configure a reboot handler?
I tried to update the ms_dotnet
cookbook by:
using reboot
resource (Chef 12.1+):
reboot ms_dotnet do
action :nothing
end
and adding
notifies :reboot_now, "reboot[ms_dotnet]", :immediately if reboot_pending?
to windows_package
. However, reboot_pending?
seems to always be false
, even when the installation of ndp46-kb3045557-x86-x64-allos-enu.exe
is explicitly rejected because of the lack of reboot after KB2919355 installation.
using windows 2012R2 VM on windows 10 host
$ chef -v
Chef Development Kit Version: 0.19.6
chef-client version: 12.15.19
delivery version: master (802e801d920ea6b6d48db735aa7c6e7a6194bea4)
berks version: 5.1.0
kitchen version: 1.13.2
Contents of dotnet_452.rb
ms_dotnet_framework '4.5.2'
This is the same error I've seen in the past any time I've attempted to install dotnet 452 with a windows package or package resource.
result of a kitchen converge
================================================================================
Error executing action `install` on resource 'ms_dotnet_framework[4.5.2]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
windows_package[Microsoft .NET Framework 4.5.2] (C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/ms_dotnet/providers/framework.rb line 53) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 3010], but received '5'
---- Begin output of start "" /wait "c:\users\vagrant\appdata\local\temp\kitchen\cache\package\ndp452-kb2901907-x86-x64-allos-enu.exe" /q /norestart & exit %%%%ERRORLEVEL%%%% ----
STDOUT:
STDERR:
---- End output of start "" /wait "c:\users\vagrant\appdata\local\temp\kitchen\cache\package\ndp452-kb2901907-x86-x64-allos-enu.exe" /q /norestart & exit %%%%ERRORLEVEL%%%% ----
Ran start "" /wait "c:\users\vagrant\appdata\local\temp\kitchen\cache\package\ndp452-kb2901907-x86-x64-allos-enu.exe" /q /norestart & exit %%%%ERRORLEVEL%%%% returned 5
Resource Declaration:
---------------------
# In C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/vertafore_iis_base/recipes/dotnet_452.rb
29: ms_dotnet_framework '4.5.2'
Compiled Resource:
------------------
# Declared in C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/vertafore_iis_base/recipes/dotnet_452.rb:29:in `from_file'
ms_dotnet_framework("4.5.2") do
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :ms_dotnet_framework
cookbook_name "vertafore_iis_base"
recipe_name "dotnet_452"
version "4.5.2"
include_patches true
end
Running handlers:
[2016-11-17T13:30:19-08:00] ERROR: Running exception handlers
Running handlers complete
[2016-11-17T13:30:19-08:00] ERROR: Exception handlers complete
Chef Client failed. 3 resources updated in 01 minutes 23 seconds
[2016-11-17T13:30:19-08:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
[2016-11-17T13:30:19-08:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-11-17T13:30:19-08:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: ms_dotnet_framework[4.5.2] (vertafore_iis_base::dotnet_452 line 29) had an error: Mixlib::ShellOut::ShellCommandFailed: windows_package[Microsoft .NET Framework 4.5.2] (C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/ms_dotnet/providers/framework.rb line 53) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 3010], but received '5'
---- Begin output of start "" /wait "c:\users\vagrant\appdata\local\temp\kitchen\cache\package\ndp452-kb2901907-x86-x64-allos-enu.exe" /q /norestart & exit %%%%ERRORLEVEL%%%% ----
STDOUT:
STDERR:
---- End output of start "" /wait "c:\users\vagrant\appdata\local\temp\kitchen\cache\package\ndp452-kb2901907-x86-x64-allos-enu.exe" /q /norestart & exit %%%%ERRORLEVEL%%%% ----
Ran start "" /wait "c:\users\vagrant\appdata\local\temp\kitchen\cache\package\ndp452-kb2901907-x86-x64-allos-enu.exe" /q /norestart & exit %%%%ERRORLEVEL%%%% returned 5
$$$$$$ chef-client.bat : C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/do_artifactory/resources/artifact.rb:20: warning: toplevel constant Artifactory referenced by Chef::Resource::Artifactory
+ CategoryInfo : NotSpecified: (C:/Users/vagran...ce::Artifactory:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/do_artifactory/resources/artifact.rb:20: warning: toplevel constant Artifactory referenced by Chef::Resource::Artifactory
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <web-services-win2012r2>. Please see .kitchen/logs/web-services-win2012r2.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
Can you please release a new version of this cookbook to Supermarket so the feature to install .NET 4.7.1 can be used.
Thanks.
Packages are based on their checksum and not their name:
https://github.com/criteo-cookbooks/ms_dotnet/blob/master/resources/framework.rb#L92
So if we do the following:
package_sources(node['ms_dotnet']['4.7.1']['checksum'] => node['ms_dotnet']['4.7.1']['url'])
as checksum is hard coded value in cookbook, I wont be able to do this:
default['ms_dotnet']['4.7.1']['checksum'] = 'a615488d2c5229aff3b97c56f7e5519cc7ac4f58b638a8e159b19c5c3d455c7b'
default['ms_dotnet']['4.7.1']['url'] = "#{software_installation_path}DotNetFramework/NDP471-DevPack-ENU.exe"
Could we rather lookup package sources based on their name:
package_sources( 'Microsoft .NET Framework 4.7.1' =>
{
url: node['ms_dotnet']['4.7.1']['url'],
checksum: node['ms_dotnet']['4.7.1']['checksum'],
}
)
Hi
I just figured out another constraint for this cookbook...
in the section of prerequisites for windows 6.1 you should include Service Pack 1 as a prerequirment
Thanks, Nadobando.
Hello,
There is a new available version of .NET:
https://www.microsoft.com/en-us/download/details.aspx?id=55167
it will be great to add this version to this cookbook.
Regards,
It would be great to see the version of .NET installed on a node by checking the attributes retrieved by ohai.
On my Windows 2012R2 box (with no update), I cannot install KB3173424 (marked in the cookbook as a MS .Net 4.6 requirement) because it requires KB2919355.
This dependency is documented here:
https://support.microsoft.com/en-us/help/3173424/servicing-stack-update-for-windows-8.1-and-windows-server-2012-r2-july-12,-2016
If I revert commit e20a0ed, everything works in my case.
But looking at this repository's history, we can see that it's not that simple:
So I'd be happy to revert to KB3021910 (which did not depend on anything), but it would cause #37 again (found by both @lbn-chef-team and @jakauppila).
Any idea?
On windows server 2012 r2 with chef-client 12.19.36 I'm getting the below error after the latest update changed the order of a couple of patch installs. Previous 3.2.0 version of this cookbook worked fine.
Recipe: ms_dotnet::ms_dotnet4
* ms_dotnet_framework[4.6.2] action install
* windows_package[Update for Microsoft Windows (KB2919442)] action install
Recipe: <Dynamically Defined Resource>
* remote_file[C:\chef\cache\package\Windows8.1-KB2919442-x64.msu] action create (up to date)
================================================================================
Error executing action `install` on resource 'windows_package[Update for Microsoft Windows (KB2919442)]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0, 3010], but received '-2145124329'
---- Begin output of start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exi
t %%%%ERRORLEVEL%%%% ----
STDOUT:
STDERR:
---- End output of start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit
%%%%ERRORLEVEL%%%% ----
Ran start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit %%%%ERRORLEVEL%
%%% returned -2145124329
Resource Declaration:
---------------------
# In C:/chef/cache/cookbooks/ms_dotnet/resources/framework.rb
77: windows_package pkg[:name] do # ~FC009 ~FC022
78: action :install
79: installer_type :custom
80: success_codes [0, 3010] if respond_to? :success_codes
81: returns [0, 3010] if respond_to? :returns
82: options pkg[:options] || '/q /norestart'
83: timeout new_resource.timeout
84: # Package specific info
85: checksum pkg[:checksum]
86: source new_resource.package_sources[pkg[:checksum]] || pkg[:url]
87: not_if pkg[:not_if] unless pkg[:not_if].nil?
88: end
89:
Compiled Resource:
------------------
# Declared in C:/chef/cache/cookbooks/ms_dotnet/resources/framework.rb:77:in `block in install_packages'
windows_package("Update for Microsoft Windows (KB2919442)") do
package_name "Update for Microsoft Windows (KB2919442)"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
source "https://download.microsoft.com/download/D/6/0/D60ED3E0-93A5-4505-8F6A-8D0A5DA16C8A/Windows8.1-KB2919442-
x64.msu"
declared_type :windows_package
cookbook_name "ms_dotnet"
options "/norestart /quiet"
timeout 600
returns [0, 3010]
installer_type :custom
checksum "c10787e669b484674584a990e069295e8b81b5366f98508010a3ae181b729482"
not_if "C:\Windows\System32\wbem\wmic.exe QFE where HotFixID='KB2919442' | FindStr KB2919442"
end
Platform:
---------
x64-mingw32
================================================================================
Error executing action `install` on resource 'ms_dotnet_framework[4.6.2]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
windows_package[Update for Microsoft Windows (KB2919442)] (C:/chef/cache/cookbooks/ms_dotnet/resources/framework.rb
line 77) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 3010], but received '-214
5124329'
---- Begin output of start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit
%%%%ERRORLEVEL%%%% ----
STDOUT:
STDERR:
---- End output of start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit %%
%%ERRORLEVEL%%%% ----
Ran start "" /wait "c:\chef\cache\package\windows8.1-kb2919442-x64.msu" /norestart /quiet & exit %%%%ERRORLEVEL%%%
% returned -2145124329
Resource Declaration:
---------------------
# In C:/chef/cache/cookbooks/ms_dotnet/recipes/ms_dotnet4.rb
24: ms_dotnet_framework v4_info['version'] do
25: timeout node['ms_dotnet']['timeout']
26: include_patches v4_info['include_patches']
27: feature_source v4_info['feature_source'] unless v4_info['feature_source'].nil?
28: perform_reboot v4_info['perform_reboot']
29: package_sources v4_info['package_sources']
30: require_support v4_info['require_support']
31: end
Compiled Resource:
------------------
# Declared in C:/chef/cache/cookbooks/ms_dotnet/recipes/ms_dotnet4.rb:24:in `from_file'
ms_dotnet_framework("4.6.2") do
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :ms_dotnet_framework
cookbook_name "ms_dotnet"
recipe_name "ms_dotnet4"
timeout 600
include_patches true
perform_reboot false
package_sources {}
require_support false
version "4.6.2"
end
Platform:
---------
x64-mingw32
Running handlers:
Running handlers complete
Chef Client failed. 2 resources updated in 37 seconds
Feature request
https://dotnet.microsoft.com/download/dotnet-framework/net48
Server 2012r2 expects that the feature name is NetFx3ServerFeatures, and this cookbook is setting it to NetFx3.
This is the logic from version 2.6.0:
if nt_version >= 6.0
# Windows Server 2012 and earlier have Server features
if nt_version >= 6.2 && ::Windows::VersionHelper.server_version?(node)
feature_name = 'NetFx3ServerFeatures'
else
feature_name = 'NetFx3'
end
The logic in the current library file for 3.5 is:
def feature_names
@feature_names ||= nt_version >= 6.0 ? %w(NetFx3) : []
end
In it's current form, the dotnet package is downloaded from MS along with updates. The package is extracted and installed along with updates (Three or four installer processes total) . During subsequent chef runs, the same events occur (extract the package, execute three or four processes) until windows realizes the packages are already installed, then it aborts.
This behaviour is ok for an underutilized server, but when running on a small instance that's under decent load, this process brings the host to an almost unresponsive state and will never complete before the next chef run. This really needs a better process to check and see if dotnot is already installed without having to extract and execute the multiple installers.
The default source URL for the 4.7.2 installer is not working. It should be updated to this:
https://download.microsoft.com/download/6/E/4/6E48E8AB-DC00-419E-9704-06DD46E5F81D/NDP472-KB4054530-x86-x64-AllOS-ENU.exe
install_required?
is always true
and it never prints
::Chef::Log.info ".NET `#{new_resource.version}' is not needed because .NET `#{current_resource.version}' is already installed"
As a side effect if reboot_pending?
is also true
and perfrom_reboot
attribute istrue
then the node will be rebooted.
v3.2.0 with #52 patch works as expected.
I think the cause of this behavior in f585848#diff-a7d2eeb2d086b81cd0d199ea024b68e3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.