summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJennifer Davis <iennae@gmail.com>2017-04-19 15:50:46 -0700
committerJennifer Davis <iennae@gmail.com>2017-04-19 15:50:46 -0700
commit700c89d94784dfb6dbe01e53967a422294a17cc4 (patch)
treeefe0e1b890a7ac20eaa274579deca9ee219039c4
parente265487be7f503119057621d6ef125667f06e39c (diff)
downloadchef-700c89d94784dfb6dbe01e53967a422294a17cc4.tar.gz
Update package resource with default for timeout.consistent_timeout_usage
Currently the timeout attribute is inconsistent in behavior between windows and non-windows platforms. This was initially observed in chef-ingredient with allowing the resource to be of type NilClass. Converges would fail on Windows but succeed on other platforms. This PR moves the default value to the package superclass and removes the attribute from windows_package. Signed-off-by: Jennifer Davis <iennae@gmail.com>
-rw-r--r--lib/chef/resource/package.rb2
-rw-r--r--lib/chef/resource/windows_package.rb1
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/resource/package.rb b/lib/chef/resource/package.rb
index 5647f203d2..580390cb8b 100644
--- a/lib/chef/resource/package.rb
+++ b/lib/chef/resource/package.rb
@@ -40,7 +40,7 @@ class Chef
property :response_file, String, desired_state: false
property :response_file_variables, Hash, default: lazy { {} }, desired_state: false
property :source, String, desired_state: false
- property :timeout, [ String, Integer ], desired_state: false
+ property :timeout, [ String, Integer ], desired_state: false, default: 600
end
end
diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb
index e37bad4b0a..3734773356 100644
--- a/lib/chef/resource/windows_package.rb
+++ b/lib/chef/resource/windows_package.rb
@@ -42,7 +42,6 @@ class Chef
# Unique to this resource
property :installer_type, Symbol
- property :timeout, [ String, Integer ], default: 600
# In the past we accepted return code 127 for an unknown reason and 42 because of a bug
property :returns, [ String, Integer, Array ], default: [ 0 ], desired_state: false
property :source, String,