Code Monkey home page Code Monkey logo

ms_dotnet's People

Contributors

aae42 avatar annih avatar brugidou avatar damfle avatar jakauppila avatar jmauro avatar jugatsu avatar kamaradclimber avatar kenzob73 avatar olivierlemasle avatar smurawski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ms_dotnet's Issues

Installation of .NET 4.6 on Windows 2012 R2 requires Windows updates

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:

virtualbox_amysta-cookbook_web_1466810330379_40128_25_06_2016_01_33_48

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.

Can't use hash

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...

windows_version_helper constants spam warnings during ChefSpec runs

...../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.

Next release should have specs

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.

Installing dot net 4.5.2 does not work remotely (over winrm)

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

  1. don't run it remote for the first run
  2. use psexec for the installer
    I have a pull requests I can submit, but its a great departure from using windows_package

Installation behaves as if .NET already installed.

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:

  • ms_dotnet_framework[install] action install (up to date)

Missing prereq for 4.7.1 on Server 2012R2

I was updating our wrapper cookbook from 4.0.1 to 4.2.0 and in testing (with box 'opentable/win-2012r2-standard-amd64-nocm') found a missing prereq when attempting to install 4.7.1:

image

package_sources not working

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?

Expected process to exit with [0, 3010], but received '16389' (client 12.21.3/ Windows 2008 R2)

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.

Possible to reboot as part of install?

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.

package_helper.rb

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.

Version not updated and broken links still available

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?

Unsatisfiable Run List Item on ms_dotnet

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?

Consider support for .Net Framework security rollups

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.

https://blogs.msdn.microsoft.com/dotnet/2018/02/13/net-framework-february-2018-security-and-quality-rollup/

.Net 4.8 incorrectly detected as installed

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.

Windows server 2016 - preinstalled .NET

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,

`action_class do` not supported on chef-client < 12.6

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.

KB3021910 has been replaced

Hello,

The KB3021910 has been replaced by KB3173424.

http://www.catalog.update.microsoft.com/ScopedViewInline.aspx?updateid=07a0954d-ee90-4c6c-b017-47837af9c5ba

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_dotnet4 recipe skipes installing 4.5.2 version on clean Windows 7 SP1

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.

.NET 4.7 not being installed, it's failing on map function on a String

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

windows_package is deprecated

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.

Having issue with 3.0.0 and windows8.1-kb2919442-x64.msu

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

Elaborate winrm issue workarounds

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?

install .Net 3.5 on win server 2016, failed

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

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

Reboot after dependencies installation

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.

unable to install 4.5.2

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

Release for .NET 4.7.1

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.

Unable to use DevPack for .Net installation due to lookup via checksum

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'],
}
)

KB3173424 requires KB2919355

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:

  • .Net 4.6 depends on KB2919355, so this update has been added in #25 (to fix #24)
  • Then, as KB2919355 depends on KB2919442, the "prerequisites of the prerequisites" were added in #27.
  • Then KB2919442 was replaced by KB3021910 in #31 to fix #29 (and for me it works perfectly)
  • Then KB3021910 was replaced by KB3173424 in #38 to fix #37
    ... and KB3173424 depends on KB2919355, which is a nice loop!

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?

ms_dotnet 3.2.1 fails patch install for .net4.6.2

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

dotnet3 has the wrong feature name in the library file for server 2012r2

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

Needs better checking before deployment

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.

v3.2.1 not idempotent on Windows 7 sp1

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.