From a1e5a01f1adac239c165e393726998f1189b6563 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Fri, 15 Nov 2019 00:48:14 -0500 Subject: [PATCH] [windows] add MSI max timeout knob (#654) * [windows] add MSI max timeout knob * [windows] attribute: update attribute description * [attributes] bump default to 900s to give more time for uninstalls on tiny instances --- attributes/default.rb | 4 ++++ recipes/_install-windows.rb | 2 ++ 2 files changed, 6 insertions(+) diff --git a/attributes/default.rb b/attributes/default.rb index 4514334bb7271..c1b13d9063ede 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -191,6 +191,10 @@ # the blacklist will be resolved enabling this feature. default['datadog']['windows_blacklist_silent_fail'] = false +# Attribute to specify timeout in seconds on MSI operations (install/uninstall) +# Default should suffice, but provides a knob in case instances with limited resources timeout. +default['datadog']['windows_msi_timeout'] = 900 + # Agent installer checksum # Expected checksum to validate correct agent installer is downloaded (Windows only) default['datadog']['windows_agent_checksum'] = nil diff --git a/recipes/_install-windows.rb b/recipes/_install-windows.rb index 734eab03d0d87..2b7320f03a2d5 100644 --- a/recipes/_install-windows.rb +++ b/recipes/_install-windows.rb @@ -68,6 +68,7 @@ package 'Datadog Agent removal' do package_name 'Datadog Agent' + timeout node['datadog']['windows_msi_timeout'] action :nothing end @@ -118,6 +119,7 @@ source temp_file installer_type installer_type options install_options + timeout node['datadog']['windows_msi_timeout'] action :install # Before 3.0.0, we adviced users to use the windows cookbook ~> 1.38.0, # we should probably keep the compatibilty for some time.