File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed
acceptance/tests/resource/service Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 17
17
package_name = { 'el' => 'httpd' ,
18
18
'centos' => 'httpd' ,
19
19
'fedora' => 'httpd' ,
20
+ 'amazon' => 'httpd' ,
20
21
'sles' => 'apache2' ,
21
22
'debian' => 'cron' , # apache2 does not create systemd service symlinks in Debian
22
23
'ubuntu' => 'cron' , # See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807
43
44
package { '#{ package_name [ platform ] } ':
44
45
ensure => present,
45
46
}
46
- if ($os['name'] == 'Fedora') and ($os['release']['major'] == '23') {
47
- package{'libnghttp2':
48
- ensure => latest,
49
- install_options => '--best',
50
- before => Package['httpd'],
51
- }
52
- }
53
47
}
54
48
manifest_service_masked = %Q{
55
49
service { '#{ package_name [ platform ] } ':
Original file line number Diff line number Diff line change 6
6
require 'forwardable'
7
7
require 'fileutils'
8
8
require 'concurrent'
9
+ require_relative 'concurrent/lock'
9
10
10
11
# The class for handling configuration files.
11
12
class Puppet ::Settings
@@ -147,8 +148,21 @@ def initialize
147
148
@configuration_file = nil
148
149
149
150
# And keep a per-environment cache
150
- @cache = Concurrent ::Hash . new { |hash , key | hash [ key ] = Concurrent ::Hash . new }
151
- @values = Concurrent ::Hash . new { |hash , key | hash [ key ] = Concurrent ::Hash . new }
151
+ # We can't use Concurrent::Map because we want to preserve insertion order
152
+ @cache_lock = Puppet ::Concurrent ::Lock . new
153
+ @cache = Concurrent ::Hash . new do |hash , key |
154
+ @cache_lock . synchronize do
155
+ break hash [ key ] if hash . key? ( key )
156
+ hash [ key ] = Concurrent ::Hash . new
157
+ end
158
+ end
159
+ @values_lock = Puppet ::Concurrent ::Lock . new
160
+ @values = Concurrent ::Hash . new do |hash , key |
161
+ @values_lock . synchronize do
162
+ break hash [ key ] if hash . key? ( key )
163
+ hash [ key ] = Concurrent ::Hash . new
164
+ end
165
+ end
152
166
153
167
# The list of sections we've used.
154
168
@used = [ ]
You can’t perform that action at this time.
0 commit comments