beaker-pe 3.6.6 → 3.6.7
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 +8 -0
- data/lib/beaker-pe/install/pe_utils.rb +20 -10
- 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: 8c64a23179a869b41ceb2ea32740a983e8a27172939f4347b6401d94265c1f26
|
|
4
|
+
data.tar.gz: 1f961918eda0b697d7246d4abef2cf451f742a5f816a9667e3d2259ca415d7b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '07931522f4f5f30eb04235539a1b9d3d30b3cc16eb551bb7d78b5eed7f010b62b9bcd07de1b15b66be5419bdf273b44c097710484b8976597b8b1ce67efab31c'
|
|
7
|
+
data.tar.gz: 27cd5ed3c62caa3899b980fd3f63c0c3c5c0c5f5f52e1dca4601d50ba70a7c1132b2dc07a56a019caff526e83cb9c74523dd25c6321cc26fb0463c95344acc7a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.6.7](https://github.com/puppetlabs/beaker-pe/tree/3.6.7) (2026-08-14)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.6.6...3.6.7)
|
|
6
|
+
|
|
7
|
+
**Fixed bugs:**
|
|
8
|
+
|
|
9
|
+
- \(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))
|
|
10
|
+
|
|
3
11
|
## [3.6.6](https://github.com/puppetlabs/beaker-pe/tree/3.6.6) (2026-08-12)
|
|
4
12
|
|
|
5
13
|
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.6.5...3.6.6)
|
|
@@ -1850,21 +1850,31 @@ EOM
|
|
|
1850
1850
|
# Prefer the ssl status endpoint. PuppetDB's jetty listener is
|
|
1851
1851
|
# explicitly configured with `client-auth = want`, not `need`
|
|
1852
1852
|
# (see puppet_enterprise::puppetdb::jetty_ini.pp), and
|
|
1853
|
-
# /
|
|
1854
|
-
#
|
|
1855
|
-
#
|
|
1856
|
-
#
|
|
1857
|
-
#
|
|
1858
|
-
#
|
|
1859
|
-
|
|
1860
|
-
|
|
1853
|
+
# /status/v1/* is allow-unauthenticated in PuppetDB's auth.conf,
|
|
1854
|
+
# so `curl -k` gets a real, content-validated response with no
|
|
1855
|
+
# client cert needed. This is the only path that still works
|
|
1856
|
+
# once the cleartext listener is disabled by default
|
|
1857
|
+
# (PE-45384/PE-44906, SECVULN-1792).
|
|
1858
|
+
#
|
|
1859
|
+
# NB: /pdb/meta/v1/version is NOT allow-unauthenticated -- it
|
|
1860
|
+
# requires a cert or token, so a bare `curl -k` against it is
|
|
1861
|
+
# rejected with "Must supply a certificate or token". PE-45827
|
|
1862
|
+
# switched this check to ssl but kept /pdb/meta/v1/version, so it
|
|
1863
|
+
# still hard-failed ("PuppetDB took too long to start") on
|
|
1864
|
+
# cleartext-disabled upgrade hosts. Query the status endpoint and
|
|
1865
|
+
# validate the running state instead, matching the working
|
|
1866
|
+
# sleep_until_puppetdb_started (beaker-puppet, PE-45697). PE-45827.
|
|
1867
|
+
status_endpoint = "status/v1/services/puppetdb-status"
|
|
1868
|
+
running = /"state"\s*:\s*"running"/
|
|
1869
|
+
output = on(host, "curl -s -k https://localhost:#{ssl_port}/#{status_endpoint}", :accept_all_exit_codes => true)
|
|
1870
|
+
match = output.stdout =~ running
|
|
1861
1871
|
|
|
1862
1872
|
# Fall back to the cleartext port for older or nonstandard
|
|
1863
1873
|
# configurations where the ssl endpoint doesn't behave as
|
|
1864
1874
|
# above.
|
|
1865
1875
|
if !match
|
|
1866
|
-
output = on(host, "curl -s http://localhost:#{nonssl_port}
|
|
1867
|
-
match = output.stdout =~
|
|
1876
|
+
output = on(host, "curl -s http://localhost:#{nonssl_port}/#{status_endpoint}", :accept_all_exit_codes => true)
|
|
1877
|
+
match = output.stdout =~ running
|
|
1868
1878
|
end
|
|
1869
1879
|
|
|
1870
1880
|
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
|