bolt 3.23.0 → 3.23.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bolt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/bolt/config/transport/local.rb +1 -0
- data/lib/bolt/plugin/puppetdb.rb +1 -1
- data/lib/bolt/version.rb +1 -1
- data/lib/bolt_server/file_cache.rb +10 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f08b10db67ef79aadf22a542f6564aa502743f53619f41c40aff4761e2e0c0
|
4
|
+
data.tar.gz: 81d8b927c1349299ba568358a2f155d624fb28f7b65ae5985bcfc8b6fe24eb6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e66f8d5adc727228b09e212de34c7de796c556a0d91153e1599cbf619b30b98c9358ea3683c2e00650375ecac8745fdf7a79977a42d6761967ce98c5c2ac71
|
7
|
+
data.tar.gz: a6dedd218bc2db8e5365906366a1cbeef5e99b02f606c80677081eccc71172fa7f15f3798630847239228feafc861278938044e98b2107429c8e34cea7143f9c
|
data/lib/bolt/plugin/puppetdb.rb
CHANGED
@@ -88,7 +88,7 @@ module Bolt
|
|
88
88
|
|
89
89
|
facts.uniq!
|
90
90
|
# Returns {'mycertname' => [{'path' => ['nested', 'fact'], 'value' => val'}], ... }
|
91
|
-
fact_values = @puppetdb_client.fact_values(targets, facts)
|
91
|
+
fact_values = @puppetdb_client.fact_values(targets, facts, opts['instance'])
|
92
92
|
|
93
93
|
targets.map do |certname|
|
94
94
|
target_data = fact_values[certname]
|
data/lib/bolt/version.rb
CHANGED
@@ -8,6 +8,7 @@ require 'digest'
|
|
8
8
|
require 'fileutils'
|
9
9
|
require 'net/http'
|
10
10
|
require 'logging'
|
11
|
+
require 'timeout'
|
11
12
|
|
12
13
|
require 'bolt/error'
|
13
14
|
|
@@ -38,8 +39,7 @@ module BoltServer
|
|
38
39
|
|
39
40
|
if do_purge
|
40
41
|
@purge = Concurrent::TimerTask.new(execution_interval: purge_interval,
|
41
|
-
|
42
|
-
run_now: true) { expire(purge_ttl) }
|
42
|
+
run_now: true) { expire(purge_ttl, purge_timeout) }
|
43
43
|
@purge.execute
|
44
44
|
end
|
45
45
|
end
|
@@ -171,13 +171,15 @@ module BoltServer
|
|
171
171
|
serial_execute { download_file(file_path, sha, file_data['uri']) }
|
172
172
|
end
|
173
173
|
|
174
|
-
def expire(purge_ttl)
|
174
|
+
def expire(purge_ttl, purge_timeout)
|
175
175
|
expired_time = Time.now - purge_ttl
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
176
|
+
Timeout.timeout(purge_timeout) do
|
177
|
+
@cache_dir_mutex.with_write_lock do
|
178
|
+
Dir.glob(File.join(@cache_dir, '*')).select { |f| File.directory?(f) }.each do |dir|
|
179
|
+
if (mtime = File.mtime(dir)) < expired_time && dir != tmppath
|
180
|
+
@logger.debug("Removing #{dir}, last used at #{mtime}")
|
181
|
+
FileUtils.remove_dir(dir)
|
182
|
+
end
|
181
183
|
end
|
182
184
|
end
|
183
185
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.23.
|
4
|
+
version: 3.23.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|