(PE-45827) Query PuppetDB's unauthenticated status endpoint in check_puppetdb_status_endpoint - #313
Merged
Conversation
…puppetdb_status_endpoint
check_puppetdb_status_endpoint's SSL probe queried /pdb/meta/v1/version,
which requires a client cert or token, so a bare `curl -k` is rejected
("Must supply a certificate or token"). Since PE-45384/PE-44906
(SECVULN-1792) disable PuppetDB's cleartext 8080 listener by default, the
cleartext fallback also fails (connection refused), so the check spins the
full 60s and hard-fails with "PuppetDB took too long to start" on every
upgrade -- even though PuppetDB is healthy on the SSL port.
A previous fix [1] switched this check to SSL but kept the
/pdb/meta/v1/version endpoint, which is not allow-unauthenticated, so the
bug persisted (observed across the entire 2025.12.x upgrade lane, e.g.
full-upgrade_nightly_2025.12.x #66 on beaker-pe 3.6.6).
Query /status/v1/services/puppetdb-status and validate "state":"running"
instead -- /status/v1/* is allow-unauthenticated, matching the working
sleep_until_puppetdb_started fix (beaker-puppet, PE-45697). SSL-first with
a cleartext fallback for older/nonstandard configs; response-content
validation is preserved via the running-state match.
[1]: ba68b99
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jonathannewman
approved these changes
Aug 14, 2026
Contributor
Author
|
acceptance tests have been failing since Feb of 2025, merging and will follow up on the failing cells later |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
check_puppetdb_status_endpointhard-fails withPuppetDB took too long to starton every PE upgrade since PuppetDB's cleartext8080listener became disabled-by-default (PE-45384 / PE-44906, SECVULN-1792) — even though PuppetDB is healthy on the SSL port.The earlier fix for this (
ba68b99, PE-45827) switched the probe to SSL but kept the/pdb/meta/v1/versionendpoint, which is notallow-unauthenticated. A barecurl -k(no cert/token) is rejected:Neither returns valid content, so the loop times out. Observed across the entire
2025.12.xupgrade lane, e.g.full-upgrade_nightly_2025.12.x#66 (46 failed cells) running beaker-pe 3.6.6 — i.e. the shipped PE-45827 fix does not actually resolve its own AC ("no longer fails when the cleartext listener is disabled").Fix
Query
/status/v1/services/puppetdb-statusand validate"state" : "running"instead./status/v1/*isallow-unauthenticatedin PuppetDB'sauth.conf, socurl -kgets a real, content-validated response with no client cert — the same endpoint the workingsleep_until_puppetdb_started(beaker-puppet, PE-45697) uses. SSL-first with a cleartext fallback for older/nonstandard configs; the original PE-14934 response-content validation is preserved via the running-state match.Testing
bundle exec rspec spec/beaker-pe/install/pe_utils_spec.rb -e check_puppetdb_status_endpoint— 4 examples, 0 failures. Specs now assert the status endpoint and explicitly reject any/pdb/meta/probe so this can't silently regress.BEAKER_PE_VERSIONpointed at this branch (per PE-45827's re-verify path).Related
ba68b99(PE-45827).sleep_until_puppetdb_started), PE-45695 (pe_acceptance_tests call sites).🤖 Generated with Claude Code