chef 16.8.14-universal-mingw32 → 16.9.32-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -4
- data/README.md +1 -1
- data/chef.gemspec +20 -2
- data/lib/chef/compliance/default_attributes.rb +5 -1
- data/lib/chef/compliance/fetcher/automate.rb +2 -2
- data/lib/chef/compliance/fetcher/chef_server.rb +2 -2
- data/lib/chef/compliance/reporter/automate.rb +1 -2
- data/lib/chef/compliance/reporter/chef_server_automate.rb +2 -2
- data/lib/chef/compliance/runner.rb +11 -8
- data/lib/chef/http/ssl_policies.rb +27 -14
- data/lib/chef/knife/core/formatting_options.rb +49 -0
- data/lib/chef/knife/core/node_presenter.rb +0 -25
- data/lib/chef/knife/core/status_presenter.rb +1 -26
- data/lib/chef/knife/core/windows_bootstrap_context.rb +1 -1
- data/lib/chef/knife/node_show.rb +2 -1
- data/lib/chef/knife/search.rb +2 -1
- data/lib/chef/knife/status.rb +8 -11
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/provider/package.rb +53 -19
- data/lib/chef/provider/package/dnf.rb +39 -12
- data/lib/chef/provider/package/dnf/dnf_helper.py +18 -5
- data/lib/chef/provider/package/dnf/python_helper.rb +6 -6
- data/lib/chef/provider/package/freebsd/pkgng.rb +3 -1
- data/lib/chef/provider/yum_repository.rb +2 -2
- data/lib/chef/resource/chef_gem.rb +2 -2
- data/lib/chef/resource/cron/cron_d.rb +1 -0
- data/lib/chef/resource/file.rb +1 -1
- data/lib/chef/resource/gem_package.rb +2 -2
- data/lib/chef/resource/homebrew_cask.rb +3 -3
- data/lib/chef/resource/http_request.rb +1 -1
- data/lib/chef/resource/locale.rb +1 -1
- data/lib/chef/resource/mdadm.rb +2 -2
- data/lib/chef/resource/osx_profile.rb +7 -7
- data/lib/chef/resource/remote_directory.rb +1 -1
- data/lib/chef/resource/ruby.rb +1 -5
- data/lib/chef/resource/ruby_block.rb +1 -1
- data/lib/chef/resource/user/windows_user.rb +5 -0
- data/lib/chef/resource/windows_certificate.rb +2 -12
- data/lib/chef/resource/yum_repository.rb +5 -0
- data/lib/chef/shell.rb +32 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/version_string.rb +1 -1
- data/spec/data/rubygems.org/latest_specs.4.8.gz +0 -0
- data/spec/data/rubygems.org/nonexistent_gem +0 -0
- data/spec/data/rubygems.org/sexp_processor +0 -0
- data/spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz +0 -0
- data/spec/data/ssl/binary/chef-rspec-der.cert +0 -0
- data/spec/data/ssl/binary/chef-rspec-der.key +0 -0
- data/spec/functional/resource/dnf_package_spec.rb +319 -16
- data/spec/functional/resource/ohai_spec.rb +2 -10
- data/spec/functional/resource/windows_certificate_spec.rb +204 -384
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/compliance/runner_spec.rb +33 -7
- data/spec/unit/http/ssl_policies_spec.rb +106 -78
- data/spec/unit/knife/bootstrap_spec.rb +5 -17
- data/spec/unit/knife/core/status_presenter_spec.rb +54 -0
- data/spec/unit/mixin/openssl_helper_spec.rb +0 -7
- data/spec/unit/provider/package/freebsd/pkgng_spec.rb +1 -1
- data/spec/unit/provider/package/rubygems_spec.rb +39 -7
- data/spec/unit/resource/user/windows_user_spec.rb +36 -0
- metadata +32 -14
- data/spec/data/trusted_certs_empty/.gitkeep +0 -0
- data/spec/data/trusted_certs_empty/README.md +0 -1
- data/spec/scripts/ssl-serve.rb +0 -47
@@ -475,7 +475,7 @@ class Chef
|
|
475
475
|
end
|
476
476
|
|
477
477
|
# @api private
|
478
|
-
# Fetches the CookbookVersion object for the given name and
|
478
|
+
# Fetches the CookbookVersion object for the given name and identifier
|
479
479
|
# specified in the lock_data.
|
480
480
|
# TODO: This only implements Chef 11 compatibility mode, which means that
|
481
481
|
# cookbooks are fetched by the "dotted_decimal_identifier": a
|
@@ -28,14 +28,41 @@ class Chef
|
|
28
28
|
class Package < Chef::Provider
|
29
29
|
extend Chef::Mixin::SubclassDirective
|
30
30
|
|
31
|
-
# subclasses declare this if they want all their arguments as arrays of packages and names
|
31
|
+
# subclasses declare this if they want all their arguments as arrays of packages and names.
|
32
|
+
# any new packages using this should also use allow_nils below.
|
33
|
+
#
|
32
34
|
subclass_directive :use_multipackage_api
|
33
|
-
|
35
|
+
|
36
|
+
# subclasses declare this if they want sources (filenames) pulled from their package names.
|
37
|
+
# this is for package providers that take a path into the filesystem (rpm, dpkg).
|
38
|
+
#
|
34
39
|
subclass_directive :use_package_name_for_source
|
40
|
+
|
35
41
|
# keeps package_names_for_targets and versions_for_targets indexed the same as package_name at
|
36
|
-
# the cost of having the subclass needing to deal with nils
|
42
|
+
# the cost of having the subclass needing to deal with nils. all providers are encouraged to
|
43
|
+
# migrate to using this as it simplifies dealing with package aliases in subclasses.
|
44
|
+
#
|
37
45
|
subclass_directive :allow_nils
|
38
46
|
|
47
|
+
# subclasses that implement complex pattern matching using constraints, particularly the yum and
|
48
|
+
# dnf classes, should filter the installed version against the desired version constraint and
|
49
|
+
# return nil if it does not match. this means that 'nil' does not mean that no version of the
|
50
|
+
# package is installed, but that the installed version does not satisfy the desired constraints.
|
51
|
+
# (the package plus the constraints are not installed)
|
52
|
+
#
|
53
|
+
# [ this may arguably be useful for all package providers and it greatly simplifies the logic
|
54
|
+
# in the superclass that gets executed, so maybe this should always be used now? ]
|
55
|
+
#
|
56
|
+
# note that when using this feature that the current_resource.version must be loaded with the
|
57
|
+
# correct currently installed version, without doing the filtering -- for reporting and for
|
58
|
+
# correctly displaying version upgrades. that means there are 3 different arrays which must be
|
59
|
+
# loaded by the subclass: candidate_version, magic_version and current_resource.version.
|
60
|
+
#
|
61
|
+
# NOTE: magic_version is a terrible name, but I couldn't think of anything better, at least this
|
62
|
+
# way it stands out clearly.
|
63
|
+
#
|
64
|
+
subclass_directive :use_magic_version
|
65
|
+
|
39
66
|
#
|
40
67
|
# Hook that subclasses use to populate the candidate_version(s)
|
41
68
|
#
|
@@ -414,19 +441,21 @@ class Chef
|
|
414
441
|
each_package do |package_name, new_version, current_version, candidate_version|
|
415
442
|
case action
|
416
443
|
when :upgrade
|
417
|
-
if
|
418
|
-
#
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
444
|
+
if current_version.nil?
|
445
|
+
# with use_magic_version there may be a package installed, but it fails the user's
|
446
|
+
# requested new_resource.version constraints
|
447
|
+
logger.trace("#{new_resource} has no existing installed version. Installing install #{candidate_version}")
|
448
|
+
target_version_array.push(candidate_version)
|
449
|
+
elsif version_equals?(current_version, new_version)
|
450
|
+
# this is a short-circuit to avoid needing to (expensively) query the candidate_version which must come later
|
451
|
+
logger.trace("#{new_resource} #{package_name} #{new_version} is already installed")
|
423
452
|
target_version_array.push(nil)
|
424
453
|
elsif candidate_version.nil?
|
425
454
|
logger.trace("#{new_resource} #{package_name} has no candidate_version to upgrade to")
|
426
455
|
target_version_array.push(nil)
|
427
|
-
elsif current_version
|
428
|
-
logger.trace("#{new_resource}
|
429
|
-
target_version_array.push(
|
456
|
+
elsif version_equals?(current_version, candidate_version)
|
457
|
+
logger.trace("#{new_resource} #{package_name} #{candidate_version} is already installed")
|
458
|
+
target_version_array.push(nil)
|
430
459
|
elsif !allow_downgrade && version_compare(current_version, candidate_version) == 1
|
431
460
|
logger.trace("#{new_resource} #{package_name} has installed version #{current_version}, which is newer than available version #{candidate_version}. Skipping...)")
|
432
461
|
target_version_array.push(nil)
|
@@ -436,21 +465,20 @@ class Chef
|
|
436
465
|
end
|
437
466
|
|
438
467
|
when :install
|
439
|
-
if new_version
|
468
|
+
if new_version && !use_magic_version?
|
440
469
|
if version_requirement_satisfied?(current_version, new_version)
|
441
470
|
logger.trace("#{new_resource} #{package_name} #{current_version} satisfies #{new_version} requirement")
|
442
471
|
target_version_array.push(nil)
|
443
472
|
elsif current_version && !allow_downgrade && version_compare(current_version, new_version) == 1
|
444
473
|
logger.warn("#{new_resource} #{package_name} has installed version #{current_version}, which is newer than available version #{new_version}. Skipping...)")
|
445
474
|
target_version_array.push(nil)
|
446
|
-
elsif version_equals?(current_version, candidate_version)
|
447
|
-
logger.trace("#{new_resource} #{package_name} #{candidate_version} is already installed")
|
448
|
-
target_version_array.push(nil)
|
449
475
|
else
|
450
476
|
logger.trace("#{new_resource} #{package_name} #{current_version} needs updating to #{new_version}")
|
451
477
|
target_version_array.push(new_version)
|
452
478
|
end
|
453
479
|
elsif current_version.nil?
|
480
|
+
# with use_magic_version there may be a package installed, but it fails the user's
|
481
|
+
# requested new_resource.version constraints
|
454
482
|
logger.trace("#{new_resource} #{package_name} not installed, installing #{candidate_version}")
|
455
483
|
target_version_array.push(candidate_version)
|
456
484
|
else
|
@@ -511,8 +539,14 @@ class Chef
|
|
511
539
|
each_package do |package_name, new_version, current_version, candidate_version|
|
512
540
|
next if new_version.nil? || current_version.nil?
|
513
541
|
|
514
|
-
if
|
515
|
-
|
542
|
+
if use_magic_version?
|
543
|
+
if !magic_version && candidate_version.nil?
|
544
|
+
missing.push(package_name)
|
545
|
+
end
|
546
|
+
else
|
547
|
+
if !version_requirement_satisfied?(current_version, new_version) && candidate_version.nil?
|
548
|
+
missing.push(package_name)
|
549
|
+
end
|
516
550
|
end
|
517
551
|
end
|
518
552
|
missing
|
@@ -525,7 +559,7 @@ class Chef
|
|
525
559
|
def each_package
|
526
560
|
package_name_array.each_with_index do |package_name, i|
|
527
561
|
candidate_version = candidate_version_array[i]
|
528
|
-
current_version = current_version_array[i]
|
562
|
+
current_version = use_magic_version? ? magic_version[i] : current_version_array[i]
|
529
563
|
new_version = new_version_array[i]
|
530
564
|
yield package_name, new_version, current_version, candidate_version
|
531
565
|
end
|
@@ -34,6 +34,7 @@ class Chef
|
|
34
34
|
allow_nils
|
35
35
|
use_multipackage_api
|
36
36
|
use_package_name_for_source
|
37
|
+
use_magic_version
|
37
38
|
|
38
39
|
# all rhel variants >= 8 will use DNF
|
39
40
|
provides :package, platform_family: "rhel", platform_version: ">= 8"
|
@@ -71,6 +72,16 @@ class Chef
|
|
71
72
|
current_resource
|
72
73
|
end
|
73
74
|
|
75
|
+
def load_after_resource
|
76
|
+
# force the installed version array to repopulate
|
77
|
+
@current_version = []
|
78
|
+
@after_resource = Chef::Resource::DnfPackage.new(new_resource.name)
|
79
|
+
after_resource.package_name(new_resource.package_name)
|
80
|
+
after_resource.version(get_current_versions)
|
81
|
+
|
82
|
+
after_resource
|
83
|
+
end
|
84
|
+
|
74
85
|
def define_resource_requirements
|
75
86
|
requirements.assert(:install, :upgrade, :remove, :purge) do |a|
|
76
87
|
a.assertion { !new_resource.source || ::File.exist?(new_resource.source) }
|
@@ -87,9 +98,15 @@ class Chef
|
|
87
98
|
end
|
88
99
|
end
|
89
100
|
|
101
|
+
def magic_version
|
102
|
+
package_name_array.each_with_index.map do |pkg, i|
|
103
|
+
magical_version(i).version_with_arch
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
90
107
|
def get_current_versions
|
91
108
|
package_name_array.each_with_index.map do |pkg, i|
|
92
|
-
|
109
|
+
current_version(i).version_with_arch
|
93
110
|
end
|
94
111
|
end
|
95
112
|
|
@@ -107,7 +124,7 @@ class Chef
|
|
107
124
|
alias upgrade_package install_package
|
108
125
|
|
109
126
|
def remove_package(names, versions)
|
110
|
-
resolved_names = names.each_with_index.map { |name, i|
|
127
|
+
resolved_names = names.each_with_index.map { |name, i| magical_version(i).to_s unless name.nil? }
|
111
128
|
dnf(options, "-y", "remove", resolved_names)
|
112
129
|
flushcache
|
113
130
|
end
|
@@ -137,10 +154,10 @@ class Chef
|
|
137
154
|
def resolved_package_lock_names(names)
|
138
155
|
names.each_with_index.map do |name, i|
|
139
156
|
unless name.nil?
|
140
|
-
if
|
157
|
+
if magical_version(i).version.nil?
|
141
158
|
available_version(i).name
|
142
159
|
else
|
143
|
-
|
160
|
+
magical_version(i).name
|
144
161
|
end
|
145
162
|
end
|
146
163
|
end
|
@@ -205,14 +222,24 @@ class Chef
|
|
205
222
|
end
|
206
223
|
|
207
224
|
# @return [Array<Version>]
|
208
|
-
def
|
209
|
-
@
|
210
|
-
@
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
@
|
225
|
+
def magical_version(index)
|
226
|
+
@magical_version ||= []
|
227
|
+
@magical_version[index] ||= if new_resource.source
|
228
|
+
python_helper.package_query(:whatinstalled, available_version(index).name, version: safe_version_array[index], arch: safe_arch_array[index], options: options)
|
229
|
+
else
|
230
|
+
python_helper.package_query(:whatinstalled, package_name_array[index], version: safe_version_array[index], arch: safe_arch_array[index], options: options)
|
231
|
+
end
|
232
|
+
@magical_version[index]
|
233
|
+
end
|
234
|
+
|
235
|
+
def current_version(index)
|
236
|
+
@current_version ||= []
|
237
|
+
@current_version[index] ||= if new_resource.source
|
238
|
+
python_helper.package_query(:whatinstalled, available_version(index).name, arch: safe_arch_array[index], options: options)
|
239
|
+
else
|
240
|
+
python_helper.package_query(:whatinstalled, package_name_array[index], arch: safe_arch_array[index], options: options)
|
241
|
+
end
|
242
|
+
@current_version[index]
|
216
243
|
end
|
217
244
|
|
218
245
|
# cache flushing is accomplished by simply restarting the python helper. this produces a roughly
|
@@ -98,14 +98,27 @@ def query(command):
|
|
98
98
|
q = q.available()
|
99
99
|
|
100
100
|
if 'epoch' in command:
|
101
|
-
|
101
|
+
# We assume that any glob is "*" so just omit the filter since the dnf libraries have no
|
102
|
+
# epoch__glob filter. That means "?" wildcards in epochs will fail. The workaround is to
|
103
|
+
# not use the version filter here but to put the version with all the globs in the package name.
|
104
|
+
if not dnf.util.is_glob_pattern(command['epoch']):
|
105
|
+
q = q.filterm(epoch=int(command['epoch']))
|
102
106
|
if 'version' in command:
|
103
|
-
|
107
|
+
if dnf.util.is_glob_pattern(command['version']):
|
108
|
+
q = q.filterm(version__glob=command['version'])
|
109
|
+
else:
|
110
|
+
q = q.filterm(version=command['version'])
|
104
111
|
if 'release' in command:
|
105
|
-
|
112
|
+
if dnf.util.is_glob_pattern(command['release']):
|
113
|
+
q = q.filterm(release__glob=command['release'])
|
114
|
+
else:
|
115
|
+
q = q.filterm(release=command['release'])
|
106
116
|
|
107
117
|
if 'arch' in command:
|
108
|
-
|
118
|
+
if dnf.util.is_glob_pattern(command['arch']):
|
119
|
+
q = q.filterm(arch__glob=command['arch'])
|
120
|
+
else:
|
121
|
+
q = q.filterm(arch=command['arch'])
|
109
122
|
|
110
123
|
# only apply the default arch query filter if it returns something
|
111
124
|
archq = q.filter(arch=[ 'noarch', hawkey.detect_arch() ])
|
@@ -170,4 +183,4 @@ try:
|
|
170
183
|
raise RuntimeError("bad command")
|
171
184
|
finally:
|
172
185
|
if base is not None:
|
173
|
-
base.
|
186
|
+
base.close()
|
@@ -42,13 +42,13 @@ class Chef
|
|
42
42
|
def dnf_command
|
43
43
|
# platform-python is used for system tools on RHEL 8 and is installed under /usr/libexec
|
44
44
|
@dnf_command ||= begin
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
45
|
+
cmd = which("platform-python", "python", "python3", "python2", "python2.7", extra_path: "/usr/libexec") do |f|
|
46
|
+
shell_out("#{f} -c 'import dnf'").exitstatus == 0
|
47
|
+
end
|
48
|
+
raise Chef::Exceptions::Package, "cannot find dnf libraries, you may need to use yum_package" unless cmd
|
49
49
|
|
50
|
-
|
51
|
-
|
50
|
+
"#{cmd} #{DNF_HELPER}"
|
51
|
+
end
|
52
52
|
end
|
53
53
|
|
54
54
|
def start
|
@@ -42,7 +42,9 @@ class Chef
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def current_installed_version
|
45
|
-
|
45
|
+
# pkgng up to version 1.15.99.7 returns 70 for pkg not found,
|
46
|
+
# later versions return 1
|
47
|
+
pkg_info = shell_out!("pkg", "info", new_resource.package_name, env: nil, returns: [0, 1, 70])
|
46
48
|
pkg_info.stdout[/^Version +: (.+)$/, 1]
|
47
49
|
end
|
48
50
|
|
@@ -33,7 +33,7 @@ class Chef
|
|
33
33
|
def load_current_resource; end
|
34
34
|
|
35
35
|
action :create do
|
36
|
-
declare_resource(:template,
|
36
|
+
declare_resource(:template, ::File.join(new_resource.reposdir, "#{new_resource.repositoryid}.repo")) do
|
37
37
|
if template_available?(new_resource.source)
|
38
38
|
source new_resource.source
|
39
39
|
else
|
@@ -81,7 +81,7 @@ class Chef
|
|
81
81
|
only_if "yum repolist all | grep -P '^#{new_resource.repositoryid}([ \t]|$)'"
|
82
82
|
end
|
83
83
|
|
84
|
-
declare_resource(:file,
|
84
|
+
declare_resource(:file, ::File.join(new_resource.reposdir, "#{new_resource.repositoryid}.repo")) do
|
85
85
|
action :delete
|
86
86
|
notifies :create, "ruby_block[package-cache-reload-#{new_resource.repositoryid}]", :immediately
|
87
87
|
end
|
@@ -49,7 +49,7 @@ class Chef
|
|
49
49
|
|
50
50
|
To install a gem while #{ChefUtils::Dist::Infra::PRODUCT} is configuring the node (the converge phase), set the `compile_time` property to `false`:
|
51
51
|
```ruby
|
52
|
-
chef_gem '
|
52
|
+
chef_gem 'loofah' do
|
53
53
|
compile_time false
|
54
54
|
action :install
|
55
55
|
end
|
@@ -57,7 +57,7 @@ class Chef
|
|
57
57
|
|
58
58
|
To install a gem while the resource collection is being built (the compile phase), set the `compile_time` property to `true`:
|
59
59
|
```ruby
|
60
|
-
chef_gem '
|
60
|
+
chef_gem 'loofah' do
|
61
61
|
compile_time true
|
62
62
|
action :install
|
63
63
|
end
|
data/lib/chef/resource/file.rb
CHANGED
@@ -32,7 +32,7 @@ class Chef
|
|
32
32
|
|
33
33
|
provides :file
|
34
34
|
|
35
|
-
description "Use the **file** resource to manage files directly on a node."
|
35
|
+
description "Use the **file** resource to manage files directly on a node. Note: Use the **cookbook_file** resource to copy a file from a cookbook's `/files` directory. Use the **template** resource to create a file based on a template in a cookbook's `/templates` directory. And use the **remote_file** resource to transfer a file to a node from a remote location."
|
36
36
|
|
37
37
|
if ChefUtils.windows?
|
38
38
|
# Use Windows rights instead of standard *nix permissions
|
@@ -60,7 +60,7 @@ class Chef
|
|
60
60
|
|
61
61
|
unless casked?
|
62
62
|
converge_by("install cask #{new_resource.cask_name} #{new_resource.options}") do
|
63
|
-
shell_out!("#{new_resource.homebrew_path} cask
|
63
|
+
shell_out!("#{new_resource.homebrew_path} install --cask #{new_resource.cask_name} #{new_resource.options}",
|
64
64
|
user: new_resource.owner,
|
65
65
|
env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
|
66
66
|
cwd: ::Dir.home(new_resource.owner))
|
@@ -75,7 +75,7 @@ class Chef
|
|
75
75
|
|
76
76
|
if casked?
|
77
77
|
converge_by("uninstall cask #{new_resource.cask_name}") do
|
78
|
-
shell_out!("#{new_resource.homebrew_path} cask
|
78
|
+
shell_out!("#{new_resource.homebrew_path} uninstall --cask #{new_resource.cask_name}",
|
79
79
|
user: new_resource.owner,
|
80
80
|
env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
|
81
81
|
cwd: ::Dir.home(new_resource.owner))
|
@@ -93,7 +93,7 @@ class Chef
|
|
93
93
|
# @return [Boolean]
|
94
94
|
def casked?
|
95
95
|
unscoped_name = new_resource.cask_name.split("/").last
|
96
|
-
shell_out!("#{new_resource.homebrew_path} cask
|
96
|
+
shell_out!("#{new_resource.homebrew_path} list --cask 2>/dev/null",
|
97
97
|
user: new_resource.owner,
|
98
98
|
env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
|
99
99
|
cwd: ::Dir.home(new_resource.owner)).stdout.split.include?(unscoped_name)
|
@@ -26,7 +26,7 @@ class Chef
|
|
26
26
|
|
27
27
|
provides :http_request
|
28
28
|
|
29
|
-
description "Use the **http_request** resource to send an HTTP request (GET
|
29
|
+
description "Use the **http_request** resource to send an HTTP request (`GET`, `PUT`, `POST`, `DELETE`, `HEAD`, or `OPTIONS`) with an arbitrary message. This resource is often useful when custom callbacks are necessary."
|
30
30
|
|
31
31
|
default_action :get
|
32
32
|
allowed_actions :get, :patch, :put, :post, :delete, :head, :options
|
data/lib/chef/resource/locale.rb
CHANGED
@@ -125,7 +125,7 @@ class Chef
|
|
125
125
|
# @raise [Mixlib::ShellOut::ShellCommandFailed] not a supported language or locale
|
126
126
|
#
|
127
127
|
def generate_locales
|
128
|
-
shell_out!("locale-gen #{unavailable_locales.join(" ")}")
|
128
|
+
shell_out!("locale-gen #{unavailable_locales.join(" ")}", timeout: 1800)
|
129
129
|
end
|
130
130
|
|
131
131
|
# Sets the system locale for the current computer.
|
data/lib/chef/resource/mdadm.rb
CHANGED
@@ -36,7 +36,7 @@ class Chef
|
|
36
36
|
|
37
37
|
property :chunk, Integer,
|
38
38
|
default: 16,
|
39
|
-
description: "The chunk size. This property should not be used for a RAID 1 mirrored pair (i.e. when the level property is set to 1)."
|
39
|
+
description: "The chunk size. This property should not be used for a RAID 1 mirrored pair (i.e. when the `level` property is set to `1`)."
|
40
40
|
|
41
41
|
property :devices, Array,
|
42
42
|
default: lazy { [] },
|
@@ -63,7 +63,7 @@ class Chef
|
|
63
63
|
description: "An optional property to specify the name of the RAID device if it differs from the resource block's name."
|
64
64
|
|
65
65
|
property :layout, String,
|
66
|
-
description: "The RAID5 parity algorithm. Possible values: left-asymmetric (or la), left-symmetric (or ls), right-asymmetric (or ra), or right-symmetric (or rs)."
|
66
|
+
description: "The RAID5 parity algorithm. Possible values: `left-asymmetric` (or `la`), `left-symmetric` (or ls), `right-asymmetric` (or `ra`), or `right-symmetric` (or `rs`)."
|
67
67
|
|
68
68
|
action_class do
|
69
69
|
def load_current_resource
|