openvox 8.30.0 → 9.0.0.pre.alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcf52c4710584e363c52de7ad3edcf6ee510cfc3117fa3bf87aa1e082f33ca56
4
- data.tar.gz: 1a2c01a5f3fe5fc187acc86b98638e44ae9840ff8d7f546f2c8ebf3d31739043
3
+ metadata.gz: 339c5fb2d2500d3313f1cce4ce036c2195687ab085c27ff51b057b8268129cf4
4
+ data.tar.gz: 1f1d1fc0714e7d123acbbcb46956187ee74509342a006d1acef23a7c1fc6e841
5
5
  SHA512:
6
- metadata.gz: 34a0255bb2676b55da6ea8a5059074f25b578f2f70d8ed0cbf008e4ab0e30b8826a69a83688c6a8eea52c764b598edb731019eac55cb36b95f42422a40dcd9d7
7
- data.tar.gz: 6d7d4d889feb3b7495f2674c8cf1a232e03c6b7b49fde5cde13ab84062378d24069c087b0f1049a405e4551ae6999642c574ea1b55a137262ffe94fdc931bc04
6
+ metadata.gz: 2718c3a0382123b2293d5b25aa8ccf3c28f8f3a9bbf6c818e1e4bc0d294ea925a1647188acfd84560b1ba6c48f4d7e88552346686d3f634f59b78706bb642476
7
+ data.tar.gz: de6fbe865701dec9ef8a1e42afc4d9ad02ef3adcaa1397090c3e20e4b33025dd774ac8dbb0903e684ca671c0586af497c0fd90a60b37644decbf7cb2667e112c
data/CHANGELOG.md CHANGED
@@ -2,133 +2,58 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [8.30.0](https://github.com/openvoxproject/openvox/tree/8.30.0) (2026-10-07)
5
+ ## [9.0.0-alpha2](https://github.com/openvoxproject/openvox/tree/9.0.0-alpha2) (2026-06-10)
6
6
 
7
- [Full Changelog](https://github.com/openvoxproject/openvox/compare/8.29.0...8.30.0)
7
+ [Full Changelog](https://github.com/openvoxproject/openvox/compare/9.0.0-alpha1...9.0.0-alpha2)
8
8
 
9
- **Fixed bugs:**
10
-
11
- - \[Bug\]: use of "server\_list" \(instead of server\) throws an error [\#658](https://github.com/OpenVoxProject/openvox/issues/658)
12
- - \[Bug\]: Ruby crashes on child side of fork pre-exec macOS 26 \(Tahoe\) [\#538](https://github.com/OpenVoxProject/openvox/issues/538)
13
- - \[Backport 8.x\] Pin json below 3 to unblock CI [\#676](https://github.com/OpenVoxProject/openvox/pull/676) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
14
- - \[backport 8.x\] fix: `Deferred` resolution of Puppet-language functions \(e.g. mocks in tests\) failing due to lack of `:global_scope` [\#671](https://github.com/OpenVoxProject/openvox/pull/671) ([griggi-ws](https://github.com/griggi-ws))
15
- - \[Backport 8.x\] print "Loading facts" just once [\#663](https://github.com/OpenVoxProject/openvox/pull/663) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
16
-
17
- **Closed issues:**
9
+ **Breaking changes:**
18
10
 
19
- - json 3.0.0 breaks Puppet::Util::Json and the test suite [\#654](https://github.com/OpenVoxProject/openvox/issues/654)
20
-
21
- **Merged pull requests:**
22
-
23
- - \[Backport 8.x\] Skip the tests that need jruby-openssl in FIPS mode [\#714](https://github.com/OpenVoxProject/openvox/pull/714) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
24
- - Promote openfact 5.7.2 into 8.x [\#711](https://github.com/OpenVoxProject/openvox/pull/711) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
25
- - Promote puppet-runtime 2026.09.29.1 into 8.x [\#704](https://github.com/OpenVoxProject/openvox/pull/704) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
26
- - \[Backport 8.x\] Kill the forked agent run if it outlives runtimeout [\#698](https://github.com/OpenVoxProject/openvox/pull/698) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
27
- - \[Backport 8.x\] Wait for certificates in the forked child, not in the daemon [\#697](https://github.com/OpenVoxProject/openvox/pull/697) ([nmburgan](https://github.com/nmburgan))
28
- - openfact: Update 5.7.0 -\> 5.7.1 [\#678](https://github.com/OpenVoxProject/openvox/pull/678) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
29
- - \[Backport 8.x\] Proper markdown for alias reference documentation. [\#650](https://github.com/OpenVoxProject/openvox/pull/650) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
30
-
31
- ## [8.29.0](https://github.com/openvoxproject/openvox/tree/8.29.0) (2026-09-04)
32
-
33
- [Full Changelog](https://github.com/openvoxproject/openvox/compare/8.28.1...8.29.0)
11
+ - return to preprocessing deferred functions by default [\#462](https://github.com/OpenVoxProject/openvox/pull/462) ([binford2k](https://github.com/binford2k))
12
+ - Decouple :posix feature from :syslog library check [\#458](https://github.com/OpenVoxProject/openvox/pull/458) ([silug](https://github.com/silug))
13
+ - remove pe\_serverversion fact [\#397](https://github.com/OpenVoxProject/openvox/pull/397) ([corporate-gadfly](https://github.com/corporate-gadfly))
34
14
 
35
15
  **Implemented enhancements:**
36
16
 
37
- - openfact: Allow 6.x [\#578](https://github.com/OpenVoxProject/openvox/pull/578) ([bastelfreak](https://github.com/bastelfreak))
38
-
39
- **Fixed bugs:**
40
-
41
- - \[Bug\]: Sometimes Error "This 'if' statement has no effect", sometimes not [\#542](https://github.com/OpenVoxProject/openvox/issues/542)
42
- - \[Bug\]: Centralized filebucket not working properly [\#367](https://github.com/OpenVoxProject/openvox/issues/367)
43
- - \[Bug\]: lines in file resource content looking like a checksum throws an error [\#169](https://github.com/OpenVoxProject/openvox/issues/169)
44
- - \[Backport 8.x\] Fix excessive reads of /proc/mounts [\#621](https://github.com/OpenVoxProject/openvox/pull/621) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
45
- - \[Backport 8.x\] Report errors when renewing a certificate fails [\#611](https://github.com/OpenVoxProject/openvox/pull/611) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
46
- - \[Backport 8.x\] fix: Pacman provider uses unrecognized option '--update' [\#565](https://github.com/OpenVoxProject/openvox/pull/565) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
47
-
48
- **Security fixes:**
49
-
50
- - Promote puppet-runtime 2026.09.02.1 into 8.x [\#629](https://github.com/OpenVoxProject/openvox/pull/629) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
51
-
52
- **Closed issues:**
53
-
54
- - \[Deprecation\] Replace `puppet master` Terminology in User-Facing Docs/Help [\#347](https://github.com/OpenVoxProject/openvox/issues/347)
55
- - \[Deprecation\] Fine-Grained `filetimeout` Control [\#345](https://github.com/OpenVoxProject/openvox/issues/345)
56
- - \[Deprecation\] Data-Binding Settings [\#338](https://github.com/OpenVoxProject/openvox/issues/338)
57
- - \[Deprecation\] `file { content => <checksum> }` Filebucket Retrieval Behavior [\#335](https://github.com/OpenVoxProject/openvox/issues/335)
58
- - \[Deprecation\] `Puppet::Indirector::Hiera` Terminus [\#332](https://github.com/OpenVoxProject/openvox/issues/332)
59
-
60
- **Merged pull requests:**
61
-
62
- - \[Backport 8.x\] puppet generate: print module directory when types are missing [\#618](https://github.com/OpenVoxProject/openvox/pull/618) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
63
- - \[Backport 8.x\] Fix a small typo in the markdown docs \(redux\) [\#606](https://github.com/OpenVoxProject/openvox/pull/606) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
64
- - Remove unloadable CC-BY-1.0 RDoc template and generator [\#588](https://github.com/OpenVoxProject/openvox/pull/588) ([silug](https://github.com/silug))
65
- - \[Backport 8.x\] Set `PUPPET_EXTRA_OPTS` variable to empty [\#561](https://github.com/OpenVoxProject/openvox/pull/561) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
66
-
67
- ## [8.28.1](https://github.com/openvoxproject/openvox/tree/8.28.1) (2026-07-07)
68
-
69
- [Full Changelog](https://github.com/openvoxproject/openvox/compare/8.28.0...8.28.1)
17
+ - Add windows-msys2-x64 build for OpenVox 9 [\#468](https://github.com/OpenVoxProject/openvox/pull/468) ([Sharpie](https://github.com/Sharpie))
70
18
 
71
19
  **Fixed bugs:**
72
20
 
73
- - \[Bug\]: ca\_refresh\_interval is not respected — agent refreshes CA on every run when server responds 304 [\#435](https://github.com/OpenVoxProject/openvox/issues/435)
74
- - \[Bug\]: Puppet 8 introduced a regex node definition regression [\#14](https://github.com/OpenVoxProject/openvox/issues/14)
75
- - \[Backport 8.x\] Update ca\_last\_update/crl\_last\_update on HTTP 304 [\#526](https://github.com/OpenVoxProject/openvox/pull/526) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
76
- - \[Backport 8.x\] Copy input mtime to files generated by puppet generate types [\#523](https://github.com/OpenVoxProject/openvox/pull/523) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
77
- - \[Backport 8.x\] Fix regex node lookup regression from PUP-11515 [\#515](https://github.com/OpenVoxProject/openvox/pull/515) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
78
- - \[Backport 8.x\] Tolerate concurrent creation of directories [\#507](https://github.com/OpenVoxProject/openvox/pull/507) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
79
-
80
- **Closed issues:**
81
-
82
- - \[Deprecation\] `Puppet::SSL::Certificate` Class [\#344](https://github.com/OpenVoxProject/openvox/issues/344)
83
- - \[Deprecation\] PAL Script Evaluation APIs [\#343](https://github.com/OpenVoxProject/openvox/issues/343)
84
- - \[Deprecation\] `source_permissions` File Parameter [\#340](https://github.com/OpenVoxProject/openvox/issues/340)
85
- - \[Deprecation\] `pluginsync` Setting [\#339](https://github.com/OpenVoxProject/openvox/issues/339)
86
- - \[Deprecation\] `configprint` Setting [\#337](https://github.com/OpenVoxProject/openvox/issues/337)
87
- - \[Deprecation\] `regsubst()` Encoding Argument [\#336](https://github.com/OpenVoxProject/openvox/issues/336)
21
+ - Manage group members on EL 10 without libuser [\#476](https://github.com/OpenVoxProject/openvox/pull/476) ([Sharpie](https://github.com/Sharpie))
22
+ - Fix File.open Ruby 3.2 regression in FileSystem::Uniquefile [\#450](https://github.com/OpenVoxProject/openvox/pull/450) ([JonasVerhofste](https://github.com/JonasVerhofste))
88
23
 
89
24
  **Merged pull requests:**
90
25
 
91
- - Promote puppet-resource\_api 1.9.2 into 8.x [\#527](https://github.com/OpenVoxProject/openvox/pull/527) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
92
- - Promote puppet-resource\_api 1.9.1 into 8.x [\#518](https://github.com/OpenVoxProject/openvox/pull/518) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
93
- - \[Backport 8.x\] Fix handling of Puppet::Pops serialization issues [\#514](https://github.com/OpenVoxProject/openvox/pull/514) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
94
- - Promote puppet-runtime 2026.06.24.1 into 8.x [\#501](https://github.com/OpenVoxProject/openvox/pull/501) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
95
- - Add arm64 support to acceptance 8.x [\#499](https://github.com/OpenVoxProject/openvox/pull/499) ([jpartlow](https://github.com/jpartlow))
96
- - Add jruby 9.4.15 to CI [\#487](https://github.com/OpenVoxProject/openvox/pull/487) ([bastelfreak](https://github.com/bastelfreak))
26
+ - Promote puppet-runtime 2026.06.09.1 into main [\#479](https://github.com/OpenVoxProject/openvox/pull/479) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
27
+ - CI: Use bot account for backports [\#472](https://github.com/OpenVoxProject/openvox/pull/472) ([bastelfreak](https://github.com/bastelfreak))
28
+ - Add JRuby 10.0.5.0 and 10.1.0.0 to test matrix [\#463](https://github.com/OpenVoxProject/openvox/pull/463) ([silug](https://github.com/silug))
97
29
 
98
- ## [8.28.0](https://github.com/openvoxproject/openvox/tree/8.28.0) (2026-06-10)
30
+ ## [9.0.0-alpha1](https://github.com/openvoxproject/openvox/tree/9.0.0-alpha1) (2026-05-20)
99
31
 
100
- [Full Changelog](https://github.com/openvoxproject/openvox/compare/8.27.0...8.28.0)
32
+ [Full Changelog](https://github.com/openvoxproject/openvox/compare/8.27.0...9.0.0-alpha1)
101
33
 
102
34
  **Implemented enhancements:**
103
35
 
104
- - Backport: Add Platform definitions for Fedora 44 to 8.x [\#459](https://github.com/OpenVoxProject/openvox/pull/459) ([Sharpie](https://github.com/Sharpie))
36
+ - Add platform definitions for Fedora 44 [\#455](https://github.com/OpenVoxProject/openvox/pull/455) ([Sharpie](https://github.com/Sharpie))
37
+ - Promote openfact 5.6.1 into main [\#436](https://github.com/OpenVoxProject/openvox/pull/436) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
105
38
 
106
39
  **Fixed bugs:**
107
40
 
108
- - \[Backport 8.x\] Fix File.open Ruby 3.2 regression in FileSystem::Uniquefile [\#478](https://github.com/OpenVoxProject/openvox/pull/478) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
109
- - \[Backport 8.x\] Manage group members on EL 10 without libuser [\#477](https://github.com/OpenVoxProject/openvox/pull/477) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
41
+ - avoid badly anchored regular expression [\#414](https://github.com/OpenVoxProject/openvox/pull/414) ([corporate-gadfly](https://github.com/corporate-gadfly))
110
42
 
111
43
  **Merged pull requests:**
112
44
 
113
- - Promote puppet-runtime 2026.06.09.1 into 8.x [\#480](https://github.com/OpenVoxProject/openvox/pull/480) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
45
+ - Promote puppet-runtime 2026.05.20.1 into main [\#453](https://github.com/OpenVoxProject/openvox/pull/453) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
46
+ - Switch from puppet-strings to openvox-strings [\#434](https://github.com/OpenVoxProject/openvox/pull/434) ([tuxmea](https://github.com/tuxmea))
47
+ - Update acceptance defaults and descriptions for OpenVox 9 [\#431](https://github.com/OpenVoxProject/openvox/pull/431) ([nmburgan](https://github.com/nmburgan))
48
+ - Promote puppet-runtime 2026.05.07.1 into main [\#429](https://github.com/OpenVoxProject/openvox/pull/429) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
49
+ - Change branch name in promote workflow [\#428](https://github.com/OpenVoxProject/openvox/pull/428) ([nmburgan](https://github.com/nmburgan))
50
+ - Changes to prepare for 8.x branching [\#425](https://github.com/OpenVoxProject/openvox/pull/425) ([nmburgan](https://github.com/nmburgan))
51
+ - Add release version check and stop trying to bump to an RC version [\#413](https://github.com/OpenVoxProject/openvox/pull/413) ([nmburgan](https://github.com/nmburgan))
114
52
 
115
53
  ## [8.27.0](https://github.com/openvoxproject/openvox/tree/8.27.0) (2026-05-15)
116
54
 
117
55
  [Full Changelog](https://github.com/openvoxproject/openvox/compare/8.26.2...8.27.0)
118
56
 
119
- **Fixed bugs:**
120
-
121
- - avoid badly anchored regular expression [\#414](https://github.com/OpenVoxProject/openvox/pull/414) ([corporate-gadfly](https://github.com/corporate-gadfly))
122
-
123
- **Merged pull requests:**
124
-
125
- - 8.x Backport: Fix rubocop 1.86.2 lint [\#448](https://github.com/OpenVoxProject/openvox/pull/448) ([Sharpie](https://github.com/Sharpie))
126
- - Promote puppet-runtime 2026.05.11.1 into 8.x [\#439](https://github.com/OpenVoxProject/openvox/pull/439) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
127
- - Promote openfact 5.6.1 into 8.x [\#438](https://github.com/OpenVoxProject/openvox/pull/438) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
128
- - Promote puppet-runtime 2026.05.07.1 into 8.x [\#430](https://github.com/OpenVoxProject/openvox/pull/430) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
129
- - Changes to prepare for 8.x branching [\#425](https://github.com/OpenVoxProject/openvox/pull/425) ([nmburgan](https://github.com/nmburgan))
130
- - Add release version check and stop trying to bump to an RC version [\#413](https://github.com/OpenVoxProject/openvox/pull/413) ([nmburgan](https://github.com/nmburgan))
131
-
132
57
  ## [8.26.2](https://github.com/openvoxproject/openvox/tree/8.26.2) (2026-04-18)
133
58
 
134
59
  [Full Changelog](https://github.com/openvoxproject/openvox/compare/8.26.1...8.26.2)
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ end
16
16
  # the runtime_dependencies in openvox.gemspec match the runtime dependencies here
17
17
  # (like openfact, semantic_puppet, and puppet-resource_api)
18
18
 
19
- gem "openfact", *location_for(ENV['OPENFACT_LOCATION'] || [">= 5.0", "< 7"])
19
+ gem "openfact", *location_for(ENV['OPENFACT_LOCATION'] || ["~> 5.0"])
20
20
  gem "semantic_puppet", *location_for(ENV['SEMANTIC_PUPPET_LOCATION'] || ["~> 1.0"])
21
21
  gem "puppet-resource_api", *location_for(ENV['RESOURCE_API_LOCATION'] || ["~> 2.0"])
22
22
  # Need to update the openssl gem on MacOS to avoid SSL errors.
@@ -45,18 +45,18 @@ end
45
45
  group(:test) do
46
46
  # 1.16.0 - 1.16.2 are broken on Windows
47
47
  gem 'ffi', '>= 1.15.5', '< 2', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2', require: false
48
- gem "json-schema", '>= 2', '< 7', require: false
48
+ gem "json-schema", '>= 2', '< 6', require: false
49
49
  gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 13.0')
50
50
  gem "rspec", "~> 3.1", require: false
51
51
  gem "rspec-expectations", ["~> 3.9", "!= 3.9.3"]
52
- gem "rspec-its", "~> 2.0", require: false
52
+ gem "rspec-its", "~> 1.1", require: false
53
53
  gem 'rspec-mocks', '< 3.13.3', require: false # breaking change afterwards: https://github.com/rspec/rspec-mocks/pull/1596
54
54
  gem 'vcr', '~> 6.1', require: false
55
55
  gem 'webmock', '~> 3.0', require: false
56
56
  gem 'webrick', '~> 1.7', require: false
57
57
  gem 'yard', require: false
58
58
 
59
- gem 'rubocop', '~> 1.86.1', require: false, platforms: [:ruby]
59
+ gem 'rubocop', '~> 1.87.0', require: false, platforms: [:ruby]
60
60
  gem 'rubocop-i18n', '~> 3.0', require: false, platforms: [:ruby]
61
61
  gem 'rubocop-performance', '~> 1.0', require: false, platforms: [:ruby]
62
62
  gem 'rubocop-rake', '~> 0.6', require: false, platforms: [:ruby]
@@ -77,7 +77,7 @@ group(:packaging) do
77
77
  gem 'vanagon', *location_for(ENV['VANAGON_LOCATION'] || 'https://github.com/openvoxproject/vanagon#main')
78
78
  end
79
79
  gem 'artifactory'
80
- gem 'json', '< 3'
80
+ gem 'json'
81
81
  gem 'octokit'
82
82
  end
83
83
 
data/Rakefile CHANGED
@@ -159,11 +159,10 @@ begin
159
159
  HEADER
160
160
  config.user = "openvoxproject"
161
161
  config.project = "openvox"
162
- config.exclude_labels = %w[dependencies duplicate question invalid wontfix wont-fix modulesync skip-changelog skip-8.x-changelog]
162
+ config.exclude_labels = %w[dependencies duplicate question invalid wontfix wont-fix modulesync skip-changelog]
163
163
  config.since_tag = "8.18.1"
164
164
  config.future_release = Puppet::PUPPETVERSION
165
- config.exclude_tags_regex = /\A[7,9]\./
166
- config.release_branch = "8.x"
165
+ config.exclude_tags_regex = /\A7\./
167
166
  end
168
167
  rescue LoadError
169
168
  task :changelog do
@@ -1,3 +1,2 @@
1
1
  # You may specify parameters to the puppet client here
2
2
  #PUPPET_EXTRA_OPTS=--waitforcert=500
3
- PUPPET_EXTRA_OPTS=
data/lib/puppet/agent.rb CHANGED
@@ -22,12 +22,6 @@ class Puppet::Agent
22
22
  class RunTimeoutError < Exception # rubocop:disable Lint/InheritException
23
23
  end
24
24
 
25
- # Exit status the forked child uses to tell the daemon that the SSL state
26
- # machine gave up waiting for a certificate, so the daemon can exit as it
27
- # did when the wait happened in the parent. Must not collide with the
28
- # detailed exit codes returned by a run (0, 1, 2, 4, 6) or with 254 (NoMemoryError).
29
- CERTIFICATE_FAILURE_EXIT_STATUS = 253
30
-
31
25
  attr_reader :client_class, :client, :should_fork
32
26
 
33
27
  def initialize(client_class, should_fork = true)
@@ -66,28 +60,12 @@ class Puppet::Agent
66
60
  end
67
61
  end
68
62
 
69
- result = run_in_fork(should_fork) do
70
- # waiting for certs may sleep for awhile depending on onetime, waitforcert and maxwaitforcert!
71
- #
72
- # This happens in the forked child, not in the long-lived daemon. Refreshing
73
- # the CRL or renewing the certificate resolves the server's name, and on
74
- # Ruby 3.3+ that runs in short-lived native threads. If the daemon forks
75
- # while one of those threads is exiting, the child inherits glibc's
76
- # resolv.conf lock in the locked state and every name lookup in the run
77
- # hangs (#485). Keeping the lookups out of the parent avoids that.
78
- #
79
- # The state machine calls exit when it gives up waiting for a certificate
80
- # (waitforcert 0 or maxwaitforcert exceeded). Report that back so the
81
- # daemon exits, as it did when the wait happened in the parent.
82
- begin
83
- ssl_context = wait_for_certificates(client_options)
84
- rescue SystemExit
85
- next CERTIFICATE_FAILURE_EXIT_STATUS
86
- rescue StandardError => detail
87
- Puppet.log_exception(detail, _("Could not obtain certificates: %{detail}") % { detail: detail })
88
- next nil
89
- end
63
+ # waiting for certs may sleep for awhile depending on onetime, waitforcert and maxwaitforcert!
64
+ # this needs to happen before forking so that if we fail to obtain certs and try to exit, then
65
+ # we exit the main process and not the forked child.
66
+ ssl_context = wait_for_certificates(client_options)
90
67
 
68
+ result = run_in_fork(should_fork) do
91
69
  with_client(client_options[:transaction_uuid], client_options[:job_id]) do |client|
92
70
  client_args = client_options.merge(:pluginsync => Puppet::Configurer.should_pluginsync?)
93
71
  begin
@@ -137,9 +115,6 @@ class Puppet::Agent
137
115
  end
138
116
  end
139
117
  end
140
- # The child could not obtain a certificate and the state machine asked to exit.
141
- exit(1) if result == CERTIFICATE_FAILURE_EXIT_STATUS
142
-
143
118
  true
144
119
  end
145
120
  Puppet.notice _("Shutdown/restart in progress (%{status}); skipping run") % { status: Puppet::Application.run_status.inspect } unless block_run
@@ -171,55 +146,8 @@ class Puppet::Agent
171
146
  atForkHandler.parent
172
147
  end
173
148
 
174
- _, status = wait_for_child(child_pid)
175
- status.exitstatus
176
- end
177
-
178
- # Wait for the forked child to exit. The child enforces `runtimeout` on its
179
- # own run, but it may fail to exit afterwards (a stranded thread, a hung
180
- # subprocess, etc.). Without a deadline here, the parent blocks forever and
181
- # the agent stops checking in. Once the run timeout plus a grace period has
182
- # elapsed, the child is killed so the daemon can carry on.
183
- def wait_for_child(child_pid)
184
- deadline = child_deadline
185
- return Process.waitpid2(child_pid) unless deadline
186
-
187
- loop do
188
- result = Process.waitpid2(child_pid, Process::WNOHANG)
189
- return result if result
190
-
191
- if monotonic_now >= deadline
192
- Puppet.err _("Agent run (pid %{pid}) did not exit within %{timeout} seconds of the run timeout, killing it") %
193
- { pid: child_pid, timeout: child_grace_period }
194
- begin
195
- Process.kill(:KILL, child_pid)
196
- rescue Errno::ESRCH
197
- # The child exited between the last check and the kill.
198
- end
199
- return Process.waitpid2(child_pid)
200
- end
201
-
202
- sleep 1
203
- end
204
- end
205
-
206
- # After the run timeout fires inside the child, it may still need to send
207
- # its report, which is bounded by the HTTP connect and read timeouts.
208
- def child_grace_period
209
- Puppet[:http_connect_timeout] + Puppet[:http_read_timeout]
210
- end
211
-
212
- # Returns the absolute monotonic deadline for the child, or nil when
213
- # `runtimeout` is disabled.
214
- def child_deadline
215
- runtimeout = Puppet[:runtimeout]
216
- return nil if runtimeout.nil? || runtimeout <= 0
217
-
218
- monotonic_now + runtimeout + child_grace_period
219
- end
220
-
221
- def monotonic_now
222
- Process.clock_gettime(Process::CLOCK_MONOTONIC)
149
+ exit_code = Process.waitpid2(child_pid)
150
+ exit_code[1].exitstatus
223
151
  end
224
152
 
225
153
  private
@@ -304,14 +304,13 @@ class Puppet::Application::Ssl < Puppet::Application
304
304
  @cert_provider.delete_request(certname)
305
305
  cert
306
306
  rescue Puppet::HTTP::ResponseError => e
307
- body = e.response.body.to_s.strip
308
- raise Puppet::Error.new(_("Failed to renew certificate: %{code} %{reason}%{body}") % {
309
- code: e.response.code,
310
- reason: e.response.reason,
311
- body: body.empty? ? '' : ": #{body}"
312
- }, e)
307
+ if e.response.code == 404
308
+ nil
309
+ else
310
+ raise Puppet::Error.new(_("Failed to download certificate: %{message}") % { message: e.message }, e)
311
+ end
313
312
  rescue => e
314
- raise Puppet::Error.new(_("Failed to renew certificate: %{message}") % { message: e.message }, e)
313
+ raise Puppet::Error.new(_("Failed to download certificate: %{message}") % { message: e.message }, e)
315
314
  end
316
315
 
317
316
  def verify(certname)
@@ -2100,14 +2100,16 @@ EOT
2100
2100
  what is being done.",
2101
2101
  },
2102
2102
  :preprocess_deferred => {
2103
- :default => false,
2103
+ :default => true,
2104
2104
  :type => :boolean,
2105
2105
  :desc => "Whether Puppet should call deferred functions before applying
2106
2106
  the catalog. If set to `true`, all prerequisites required for the
2107
2107
  deferred function must be satisfied before the Puppet run. If set to
2108
2108
  `false`, deferred functions follow Puppet relationships and
2109
2109
  ordering. In this way, Puppet can install the prerequisites required for a
2110
- deferred function and call the deferred function in the same run.",
2110
+ deferred function and call the deferred function in the same run.
2111
+ Please note that many functions that return complex datatypes will fail
2112
+ when disabling preprocessing and this option may be removed in the future.",
2111
2113
  },
2112
2114
  :summarize => {
2113
2115
  :default => false,
@@ -12,7 +12,7 @@ Puppet.features.add(:syslog, :libs => ["syslog"])
12
12
  # We can use POSIX user functions
13
13
  Puppet.features.add(:posix) do
14
14
  require 'etc'
15
- !Etc.getpwuid(0).nil? && Puppet.features.syslog?
15
+ !Puppet::Util::Platform.windows? && !Etc.getpwuid(0).nil?
16
16
  end
17
17
 
18
18
  # We can use Microsoft Windows functions
@@ -30,7 +30,7 @@
30
30
  # `tree_each($data) |$value| { <PUPPET CODE BLOCK> }`
31
31
  #
32
32
  # The parameter `$path` is always given as an `Array` containing the path that when applied to
33
- # the tree as `$data.dig(*$path)` yields the `$value`.
33
+ # the tree as `$data.dig(*$path) yields the `$value`.
34
34
  # The `$value` is the value at that path.
35
35
  #
36
36
  # For `Array` values, the path will contain `Integer` entries with the array index,
@@ -45,14 +45,11 @@ module Puppet
45
45
  end
46
46
 
47
47
  # Determines if the output file is up-to-date with respect to the input file.
48
- # Generated files are stamped with their input's mtime, so the output is
49
- # up-to-date only on an exact match; an input with older timestamps (e.g.
50
- # a module downgrade) also triggers regeneration.
51
48
  # @param [String, nil] The path to output to, or nil if determined by input
52
49
  # @return [Boolean] Returns true if the output is up-to-date or false if not.
53
50
  def up_to_date?(outputdir)
54
51
  f = effective_output_path(outputdir)
55
- Puppet::FileSystem.exist?(f) && (Puppet::FileSystem.stat(@path) <=> Puppet::FileSystem.stat(f)) == 0
52
+ Puppet::FileSystem.exist?(f) && (Puppet::FileSystem.stat(@path) <=> Puppet::FileSystem.stat(f)) <= 0
56
53
  end
57
54
 
58
55
  # Gets the filename of the output file.
@@ -124,7 +121,7 @@ module Puppet
124
121
  environment.modules.each do |mod|
125
122
  directory = File.join(Puppet::Util::Autoload.cleanpath(mod.plugin_directory), 'puppet', 'type')
126
123
  unless Puppet::FileSystem.exist?(directory)
127
- Puppet.debug "Skipping '#{mod.name}' module because there is no readable puppet/type/ directory under: #{directory}"
124
+ Puppet.debug "Skipping '#{mod.name}' module because it contains no custom types."
128
125
  next
129
126
  end
130
127
 
@@ -243,7 +240,6 @@ module Puppet
243
240
  Puppet::FileSystem.open(effective_output_path, nil, 'w:UTF-8') do |file|
244
241
  file.write(result)
245
242
  end
246
- Puppet::FileSystem.touch(effective_output_path, mtime: Puppet::FileSystem.stat(input.path).mtime)
247
243
  rescue Exception => e
248
244
  @bad_input = true
249
245
  Puppet.log_exception(e, _("Failed to generate '%{effective_output_path}': %{message}") % { effective_output_path: effective_output_path, message: e.message })
@@ -62,22 +62,21 @@ class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
62
62
  end
63
63
  end.flatten + Puppet[:factpath].split(File::PATH_SEPARATOR)
64
64
 
65
- dirs.select! { |dir| FileTest.directory?(dir) }
66
-
67
- # Even though we no longer directly load facts in the terminus,
68
- # print out each .rb in the facts directory as module
69
- # developers may find that information useful for debugging purposes
70
- unless dirs.empty?
71
- Puppet.info _("Loading facts")
72
- if Puppet::Util::Log.sendlevel?(:debug)
73
- dirs.each do |dir|
74
- Dir.glob("#{dir}/*.rb").each do |file|
75
- Puppet.debug { "Loading facts from #{file}" }
76
- end
65
+ dirs = dirs.select do |dir|
66
+ next false unless FileTest.directory?(dir)
67
+
68
+ # Even through we no longer directly load facts in the terminus,
69
+ # print out each .rb in the facts directory as module
70
+ # developers may find that information useful for debugging purposes
71
+ if Puppet::Util::Log.sendlevel?(:info)
72
+ Puppet.info _("Loading facts")
73
+ Dir.glob("#{dir}/*.rb").each do |file|
74
+ Puppet.debug { "Loading facts from #{file}" }
77
75
  end
78
76
  end
79
- end
80
77
 
78
+ true
79
+ end
81
80
  dirs << request.options[:custom_dir] if request.options[:custom_dir]
82
81
  Puppet.runtime[:facter].search(*dirs)
83
82
  end
@@ -7,12 +7,6 @@ class Puppet::Node::ServerFacts
7
7
  # Add implementation information
8
8
  server_facts["serverimplementation"] = Puppet.implementation
9
9
 
10
- # Add our server Puppet Enterprise version, if available.
11
- pe_version_file = '/opt/puppetlabs/server/pe_version'
12
- if File.readable?(pe_version_file) and !File.zero?(pe_version_file)
13
- server_facts['pe_serverversion'] = File.read(pe_version_file).chomp
14
- end
15
-
16
10
  # Add our server version to the fact list
17
11
  server_facts["serverversion"] = Puppet.version.to_s
18
12
 
@@ -48,10 +48,7 @@ class DeferredResolver
48
48
  # # Server facts are always about the local node's version etc.
49
49
  # @scope.set_server_facts(node.server_facts)
50
50
 
51
- # Must be wrapped in with_context_overrides to ensure global_scope is valid for Puppet-language functions
52
- compiler.with_context_overrides do
53
- resolver.resolve_futures(catalog)
54
- end
51
+ resolver.resolve_futures(catalog)
55
52
  nil
56
53
  end
57
54
 
@@ -21,8 +21,6 @@ module SubLookup
21
21
  def split_key(key)
22
22
  return [key] if key.match(SPECIAL).nil?
23
23
 
24
- # Rubocop 1.86.2 starts mis-classifying the "raise yield" constructions as a failure.
25
- # rubocop:disable Lint/ParenthesesAsGroupedExpression
26
24
  segments = key.split(/(\s*"[^"]+"\s*|\s*'[^']+'\s*|[^'".]+)/)
27
25
  if segments.empty?
28
26
  # Only happens if the original key was an empty string
@@ -47,7 +45,6 @@ module SubLookup
47
45
  else
48
46
  raise yield('Syntax error')
49
47
  end
50
- # rubocop:enable Lint/ParenthesesAsGroupedExpression
51
48
  end
52
49
 
53
50
  # Perform a sub-lookup using the given _segments_ to access the given _value_. Each segment must be a string. A string
@@ -305,7 +305,7 @@ module Serialization
305
305
  if tos.empty?
306
306
  semantic = Puppet::Pops::SemanticError.new(issue, nil, EMPTY_HASH)
307
307
  else
308
- file, line = Puppet::Pops::PuppetStack.stacktrace
308
+ file, line = stacktrace
309
309
  semantic = Puppet::Pops::SemanticError.new(issue, nil, { :file => file, :line => line })
310
310
  end
311
311
  end
@@ -248,7 +248,7 @@ Puppet::Type.type(:package).provide :pacman, :parent => Puppet::Provider::Packag
248
248
  else
249
249
  fail _("Source %{source} is not supported by pacman") % { source: source }
250
250
  end
251
- pacman "--noconfirm", "--noprogressbar", "--upgrade", source
251
+ pacman "--noconfirm", "--noprogressbar", "--update", source
252
252
  end
253
253
 
254
254
  def install_from_repo
@@ -146,10 +146,7 @@ Puppet::Type.type(:package).provide :puppetserver_gem, :parent => :gem do
146
146
  puppet_default_vendor_gems = '/opt/puppetlabs/puppet/lib/ruby/vendor_gems'
147
147
  puppetserver_default_gem_path = [puppetserver_default_gem_home, puppetserver_default_vendored_jruby_gems, puppet_default_vendor_gems].join(':')
148
148
 
149
- pe_puppetserver_conf_file = '/etc/puppetlabs/puppetserver/conf.d/pe-puppet-server.conf'
150
- os_puppetserver_conf_file = '/etc/puppetlabs/puppetserver/puppetserver.conf'
151
- puppetserver_conf_file = Puppet.runtime[:facter].value(:pe_server_version) ? pe_puppetserver_conf_file : os_puppetserver_conf_file
152
- puppetserver_conf = Hocon.load(puppetserver_conf_file)
149
+ puppetserver_conf = Hocon.load('/etc/puppetlabs/puppetserver/puppetserver.conf')
153
150
 
154
151
  gem_env = {}
155
152
  if puppetserver_conf.empty? || puppetserver_conf.key?('jruby-puppet') == false
@@ -14,7 +14,7 @@ etc.), prevent Puppet from making changes (`noop`), and change logging verbosity
14
14
 
15
15
  ## Available Metaparameters
16
16
 
17
- }.dup.strip + "\n"
17
+ }.dup
18
18
  begin
19
19
  params = []
20
20
  Puppet::Type.eachmetaparam { |param|
@@ -34,13 +34,13 @@ class Puppet::Resource::Type
34
34
  EMPTY_ARRAY = [].freeze
35
35
 
36
36
  LOOKAROUND_OPERATORS = {
37
- "(" => 'lp',
38
- "?" => "qu",
39
- "<" => "lt",
40
- ">" => "gt",
41
- "!" => "ex",
42
- "=" => "eq",
43
- ")" => 'rp'
37
+ "(" => 'LP',
38
+ "?" => "QU",
39
+ "<" => "LT",
40
+ ">" => "GT",
41
+ "!" => "EX",
42
+ "=" => "EQ",
43
+ ")" => 'RP'
44
44
  }.freeze
45
45
 
46
46
  attr_accessor :file, :line, :doc, :code, :parent, :resource_type_collection, :override
@@ -206,7 +206,7 @@ class Puppet::Resource::Type
206
206
 
207
207
  def name
208
208
  if type == :node && name_is_regex?
209
- # Normalize lookaround regex pattern to a unique, lookup-safe lowercase string.
209
+ # Normalize lookarround regex patthern
210
210
  internal_name = @name.source.downcase.gsub(/\(\?[^)]*\)/) do |str|
211
211
  str.gsub(/./) { |ch| LOOKAROUND_OPERATORS[ch] || ch }
212
212
  end
@@ -121,10 +121,6 @@ class Puppet::SSL::StateMachine
121
121
  rescue Puppet::HTTP::ResponseError => e
122
122
  if e.response.code == 304
123
123
  Puppet.info(_("CA certificate is unmodified, using existing CA certificate"))
124
- # 304 confirms the local CA is current, so reset the TTL.
125
- # Otherwise ca_last_update (backed by ca.pem mtime) never advances
126
- # past the initial download and needs_refresh? triggers on every run.
127
- @cert_provider.ca_last_update = Time.now
128
124
  else
129
125
  Puppet.info(_("Failed to refresh CA certificate, using existing CA certificate: %{message}") % { message: e.message })
130
126
  end
@@ -223,8 +219,6 @@ class Puppet::SSL::StateMachine
223
219
  rescue Puppet::HTTP::ResponseError => e
224
220
  if e.response.code == 304
225
221
  Puppet.info(_("CRL is unmodified, using existing CRL"))
226
- # 304 confirms the local CRL is current, so reset the TTL.
227
- @cert_provider.crl_last_update = Time.now
228
222
  else
229
223
  Puppet.info(_("Failed to refresh CRL, using existing CRL: %{message}") % { message: e.message })
230
224
  end