beaker-pe 3.6.6 → 3.6.8
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 +4 -4
- data/CHANGELOG.md +26 -10
- data/lib/beaker-pe/install/pe_utils.rb +43 -16
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +9 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e808082867ede5c141a2d6e9def116fcd87d33d1c97ca2a16a401e158794df4
|
|
4
|
+
data.tar.gz: 96feaaf93f3f957dd331277c3f182cf702aa9c6ec3f1c0212c9381c3ccd819cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 975b99a50a8c499ac0e1afef7bf86939b088073bda0a9ba2236c1851858454ea96b6b9f7a8c9570cd23dc16b4cfb27299527aeb385c33b1a7a969199d873aaef
|
|
7
|
+
data.tar.gz: 28cbb7db3d6523034643dcd5134509209839a9368de7f274a41bfd1ae72c704f76573d13227efc073335874d85c4bfb9c3c414a5a435703760479cd3d2c7c6e4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.6.8](https://github.com/puppetlabs/beaker-pe/tree/3.6.8) (2026-09-17)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.6.7...3.6.8)
|
|
6
|
+
|
|
7
|
+
**Merged pull requests:**
|
|
8
|
+
|
|
9
|
+
- \(PE-32680\) Fix GPG key refresh for PE 2023.8.0 and earlier [\#308](https://github.com/puppetlabs/beaker-pe/pull/308) ([cthorn42](https://github.com/cthorn42))
|
|
10
|
+
|
|
11
|
+
## [3.6.7](https://github.com/puppetlabs/beaker-pe/tree/3.6.7) (2026-08-14)
|
|
12
|
+
|
|
13
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.6.6...3.6.7)
|
|
14
|
+
|
|
15
|
+
**Fixed bugs:**
|
|
16
|
+
|
|
17
|
+
- \(PE-45827\) Query PuppetDB's unauthenticated status endpoint in check\_puppetdb\_status\_endpoint [\#313](https://github.com/puppetlabs/beaker-pe/pull/313) ([steveax](https://github.com/steveax))
|
|
18
|
+
|
|
3
19
|
## [3.6.6](https://github.com/puppetlabs/beaker-pe/tree/3.6.6) (2026-08-12)
|
|
4
20
|
|
|
5
21
|
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.6.5...3.6.6)
|
|
@@ -100,19 +116,19 @@
|
|
|
100
116
|
|
|
101
117
|
## [2.19.0](https://github.com/puppetlabs/beaker-pe/tree/2.19.0) (2024-06-21)
|
|
102
118
|
|
|
103
|
-
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/
|
|
119
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/2.18.0...2.19.0)
|
|
104
120
|
|
|
105
121
|
**Implemented enhancements:**
|
|
106
122
|
|
|
107
123
|
- \(PE-38685\) Beaker 6 upgrade [\#281](https://github.com/puppetlabs/beaker-pe/pull/281) ([tlehman](https://github.com/tlehman))
|
|
108
124
|
|
|
109
|
-
## [
|
|
125
|
+
## [2.18.0](https://github.com/puppetlabs/beaker-pe/tree/2.18.0) (2024-06-11)
|
|
110
126
|
|
|
111
|
-
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/2.
|
|
127
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.2.0...2.18.0)
|
|
112
128
|
|
|
113
|
-
## [2.
|
|
129
|
+
## [3.2.0](https://github.com/puppetlabs/beaker-pe/tree/3.2.0) (2024-06-11)
|
|
114
130
|
|
|
115
|
-
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.1.0...2.
|
|
131
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.1.0...3.2.0)
|
|
116
132
|
|
|
117
133
|
**Implemented enhancements:**
|
|
118
134
|
|
|
@@ -120,19 +136,19 @@
|
|
|
120
136
|
|
|
121
137
|
## [3.1.0](https://github.com/puppetlabs/beaker-pe/tree/3.1.0) (2024-05-22)
|
|
122
138
|
|
|
123
|
-
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/
|
|
139
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.0.1...3.1.0)
|
|
124
140
|
|
|
125
141
|
**Merged pull requests:**
|
|
126
142
|
|
|
127
143
|
- \(PE-37784\) Remove upper bound for beaker-puppet [\#273](https://github.com/puppetlabs/beaker-pe/pull/273) ([nmburgan](https://github.com/nmburgan))
|
|
128
144
|
|
|
129
|
-
## [
|
|
145
|
+
## [3.0.1](https://github.com/puppetlabs/beaker-pe/tree/3.0.1) (2024-04-10)
|
|
130
146
|
|
|
131
|
-
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.0.1
|
|
147
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/2.17.0...3.0.1)
|
|
132
148
|
|
|
133
|
-
## [
|
|
149
|
+
## [2.17.0](https://github.com/puppetlabs/beaker-pe/tree/2.17.0) (2024-04-10)
|
|
134
150
|
|
|
135
|
-
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/2.16.1...
|
|
151
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/2.16.1...2.17.0)
|
|
136
152
|
|
|
137
153
|
## [2.16.1](https://github.com/puppetlabs/beaker-pe/tree/2.16.1) (2024-03-19)
|
|
138
154
|
|
|
@@ -510,13 +510,13 @@ NOASK
|
|
|
510
510
|
end
|
|
511
511
|
|
|
512
512
|
#PE-32680, GPG expired on older PE versions, need to update with a new GPG key on the primary server
|
|
513
|
-
#only affects PE versions
|
|
513
|
+
#only affects PE versions 2023.8.0 and earlier, and only needed for debian, ubuntu, and sles agent platforms
|
|
514
514
|
# @param [Host] host to see if we need to update the gpg key
|
|
515
515
|
# @param [String] location of the GPG key we intend to overwrite
|
|
516
|
-
#
|
|
517
|
-
#
|
|
516
|
+
# Defaults to Puppet's public release key (same key, renewed self-signature); override
|
|
517
|
+
# via the GPG_URL environment variable if a different source is needed.
|
|
518
518
|
def gpg_key_overwrite(host, location)
|
|
519
|
-
gpg_url = ENV['GPG_URL'] || 'https://
|
|
519
|
+
gpg_url = ENV['GPG_URL'] || 'https://yum.puppet.com/RPM-GPG-KEY-puppet'
|
|
520
520
|
case location
|
|
521
521
|
when 'tarball'
|
|
522
522
|
path_to_gpg_key = "#{host['working_dir']}/#{host['dist']}/packages/GPG-KEY-puppet"
|
|
@@ -528,9 +528,26 @@ NOASK
|
|
|
528
528
|
raise(StandardError, "gpg_key_overwrite requires a valid location: tarball, or pe_repo. #{location} was supplied")
|
|
529
529
|
end
|
|
530
530
|
|
|
531
|
-
if (host['roles'].include?('master') || host['roles'].include?('pe_postgres')) && version_is_less(host[:pe_ver], '
|
|
531
|
+
if (host['roles'].include?('master') || host['roles'].include?('pe_postgres')) && version_is_less(host[:pe_ver], '2023.8.1') && hosts.any? {|agent| agent['platform'] =~ /(debian)|(ubuntu)|(sles)/}
|
|
532
|
+
# Some PE releases also ship a separately-dated copy of this key alongside the
|
|
533
|
+
# undated one (e.g. GPG-KEY-puppet-2025-04-06), which frictionless install scripts
|
|
534
|
+
# may reference directly. Find any such siblings before we remove the undated file,
|
|
535
|
+
# so we can refresh them with the same content too.
|
|
536
|
+
gpg_key_dir = File.dirname(path_to_gpg_key)
|
|
537
|
+
gpg_key_basename = File.basename(path_to_gpg_key)
|
|
538
|
+
dated_gpg_keys = on(host, "ls -1 #{gpg_key_dir}/#{gpg_key_basename}-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] 2>/dev/null", :acceptable_exit_codes => [0,1,2]).stdout.split("\n")
|
|
539
|
+
|
|
532
540
|
on(host, "rm -f #{path_to_gpg_key}")
|
|
533
|
-
|
|
541
|
+
# The puppet-agent tarball fetch above already uses retry_on to survive network
|
|
542
|
+
# blips; do the same here so a transient curl failure doesn't abort the whole run.
|
|
543
|
+
retry_on(host, "curl --fail #{gpg_url} --output #{path_to_gpg_key}", {
|
|
544
|
+
desired_exit_codes: [0],
|
|
545
|
+
max_retries: 3,
|
|
546
|
+
verbose: 'true'
|
|
547
|
+
})
|
|
548
|
+
unless dated_gpg_keys.empty?
|
|
549
|
+
on(host, dated_gpg_keys.map { |dated_gpg_key| "cp #{path_to_gpg_key} #{dated_gpg_key}" }.join(' && '))
|
|
550
|
+
end
|
|
534
551
|
if location == 'pe_repo'
|
|
535
552
|
gpg_key_overwrite(host, 'pe_repo_env')
|
|
536
553
|
elsif location == 'pe_repo_env'
|
|
@@ -1850,21 +1867,31 @@ EOM
|
|
|
1850
1867
|
# Prefer the ssl status endpoint. PuppetDB's jetty listener is
|
|
1851
1868
|
# explicitly configured with `client-auth = want`, not `need`
|
|
1852
1869
|
# (see puppet_enterprise::puppetdb::jetty_ini.pp), and
|
|
1853
|
-
# /
|
|
1854
|
-
#
|
|
1855
|
-
#
|
|
1856
|
-
#
|
|
1857
|
-
#
|
|
1858
|
-
#
|
|
1859
|
-
|
|
1860
|
-
|
|
1870
|
+
# /status/v1/* is allow-unauthenticated in PuppetDB's auth.conf,
|
|
1871
|
+
# so `curl -k` gets a real, content-validated response with no
|
|
1872
|
+
# client cert needed. This is the only path that still works
|
|
1873
|
+
# once the cleartext listener is disabled by default
|
|
1874
|
+
# (PE-45384/PE-44906, SECVULN-1792).
|
|
1875
|
+
#
|
|
1876
|
+
# NB: /pdb/meta/v1/version is NOT allow-unauthenticated -- it
|
|
1877
|
+
# requires a cert or token, so a bare `curl -k` against it is
|
|
1878
|
+
# rejected with "Must supply a certificate or token". PE-45827
|
|
1879
|
+
# switched this check to ssl but kept /pdb/meta/v1/version, so it
|
|
1880
|
+
# still hard-failed ("PuppetDB took too long to start") on
|
|
1881
|
+
# cleartext-disabled upgrade hosts. Query the status endpoint and
|
|
1882
|
+
# validate the running state instead, matching the working
|
|
1883
|
+
# sleep_until_puppetdb_started (beaker-puppet, PE-45697). PE-45827.
|
|
1884
|
+
status_endpoint = "status/v1/services/puppetdb-status"
|
|
1885
|
+
running = /"state"\s*:\s*"running"/
|
|
1886
|
+
output = on(host, "curl -s -k https://localhost:#{ssl_port}/#{status_endpoint}", :accept_all_exit_codes => true)
|
|
1887
|
+
match = output.stdout =~ running
|
|
1861
1888
|
|
|
1862
1889
|
# Fall back to the cleartext port for older or nonstandard
|
|
1863
1890
|
# configurations where the ssl endpoint doesn't behave as
|
|
1864
1891
|
# above.
|
|
1865
1892
|
if !match
|
|
1866
|
-
output = on(host, "curl -s http://localhost:#{nonssl_port}
|
|
1867
|
-
match = output.stdout =~
|
|
1893
|
+
output = on(host, "curl -s http://localhost:#{nonssl_port}/#{status_endpoint}", :accept_all_exit_codes => true)
|
|
1894
|
+
match = output.stdout =~ running
|
|
1868
1895
|
end
|
|
1869
1896
|
|
|
1870
1897
|
sleep 1
|
data/lib/beaker-pe/version.rb
CHANGED
|
@@ -2671,24 +2671,25 @@ NOASK
|
|
|
2671
2671
|
subject.check_puppetdb_status_endpoint(unixhost)
|
|
2672
2672
|
end
|
|
2673
2673
|
|
|
2674
|
-
it '
|
|
2674
|
+
it 'queries the allow-unauthenticated ssl status endpoint, not /pdb/meta (PE-45827)' do
|
|
2675
2675
|
allow(subject).to receive(:version_is_less).and_return(false)
|
|
2676
2676
|
allow(subject).to receive(:sleep)
|
|
2677
|
-
ssl_result = double(Beaker::Result, :stdout => '{"
|
|
2678
|
-
expect(subject).to receive(:on).with(anything, %r{-k https://localhost:8081/}, anything).once.and_return(ssl_result)
|
|
2677
|
+
ssl_result = double(Beaker::Result, :stdout => '{"puppetdb-status":{"state":"running"}}', :exit_code => 0)
|
|
2678
|
+
expect(subject).to receive(:on).with(anything, %r{-k https://localhost:8081/status/v1/services/puppetdb-status}, anything).once.and_return(ssl_result)
|
|
2679
|
+
expect(subject).not_to receive(:on).with(anything, %r{/pdb/meta/}, anything)
|
|
2679
2680
|
expect(subject).not_to receive(:on).with(anything, %r{http://localhost:8080/}, anything)
|
|
2680
2681
|
|
|
2681
2682
|
expect { subject.check_puppetdb_status_endpoint(unixhost) }.not_to raise_error
|
|
2682
2683
|
end
|
|
2683
2684
|
|
|
2684
|
-
context 'when the ssl endpoint never returns
|
|
2685
|
-
it 'falls back to the cleartext endpoint' do
|
|
2685
|
+
context 'when the ssl endpoint never returns a running state (older or nonstandard config)' do
|
|
2686
|
+
it 'falls back to the cleartext status endpoint' do
|
|
2686
2687
|
allow(subject).to receive(:version_is_less).and_return(false)
|
|
2687
2688
|
allow(subject).to receive(:sleep)
|
|
2688
2689
|
ssl_result = double(Beaker::Result, :stdout => '', :exit_code => 0)
|
|
2689
|
-
nonssl_result = double(Beaker::Result, :stdout => '{"
|
|
2690
|
-
expect(subject).to receive(:on).with(anything, %r{-k https://localhost:8081/}, anything).once.ordered.and_return(ssl_result)
|
|
2691
|
-
expect(subject).to receive(:on).with(anything, %r{http://localhost:8080/}, anything).once.ordered.and_return(nonssl_result)
|
|
2690
|
+
nonssl_result = double(Beaker::Result, :stdout => '{"puppetdb-status":{"state":"running"}}', :exit_code => 0)
|
|
2691
|
+
expect(subject).to receive(:on).with(anything, %r{-k https://localhost:8081/status/v1/services/puppetdb-status}, anything).once.ordered.and_return(ssl_result)
|
|
2692
|
+
expect(subject).to receive(:on).with(anything, %r{http://localhost:8080/status/v1/services/puppetdb-status}, anything).once.ordered.and_return(nonssl_result)
|
|
2692
2693
|
|
|
2693
2694
|
expect { subject.check_puppetdb_status_endpoint(unixhost) }.not_to raise_error
|
|
2694
2695
|
end
|