Repository navigation
Conversation
bc8b3c4 to
e774886
Compare
CI failure: rake 13.4.2 regression (not related to this PR)All test jobs fail with Root cause: This affects all new PRs on smart-proxy, not just this one. PR #935 passed because its bundle cache still had rake 13.3.1. Diff in # 13.3.1 — option_list never adds -v
def option_list
(ENV["TESTOPTS"] || ENV["TESTOPT"] || ENV["TEST_OPTS"] || ENV["TEST_OPT"] || @options || "")
end
# 13.4.2 — now adds -v when verbose is true
def option_list(verbose: @verbose)
opts = ENV["TESTOPTS"] || ENV["TESTOPT"] || ENV["TEST_OPTS"] || ENV["TEST_OPT"] || @options || ""
if verbose && !opts.split.include?("-v")
opts = opts.empty? ? "-v" : "#{opts} -v"
end
opts
endFix options:
|
ekohl
left a comment
There was a problem hiding this comment.
Makes sense, but 1 minor comment inline.
e774886 to
8071686
Compare
|
Friendly ping. |
8071686 to
f4925d8
Compare
|
Ping. |
f4925d8 to
64d7652
Compare
…TP read timeout ForemanRequest uses a bare Net::HTTP instance whose read_timeout defaults to Ruby's hardcoded 60s. Under high-concurrency registration load this causes 500 errors when Foreman takes longer than 60s to process POST /register. Introduces :foreman_request_timeout (documented in settings.yml.example) and applies it to http.read_timeout in ForemanRequest#http_init. subscription-manager's default server_timeout is 180s, so the setting now defaults to 180s when unset instead of silently inheriting Ruby's unrelated 60s Net::HTTP default. Set it to 0 to opt back into that 60s default. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
64d7652 to
4b30a6b
Compare
|
I've set the default to 180s to match |
Problem
ForemanRequestuses a bareNet::HTTPinstance whoseread_timeoutdefaults to Ruby's hardcoded 60s. Under high-concurrency registration load this causes 500 errors when Foreman takes longer than 60s to processPOST /register.Fix
Introduces
:foreman_request_timeoutand documents it insettings.yml.example, then applies it tohttp.read_timeoutinForemanRequest#http_init.subscription-manager's own client-sideserver_timeoutalready defaults to 180s, so smart-proxy cutting the connection at 60s was strictly bad — it turned a slow-but-recoverable request into a hard failure. The setting now defaults to 180s when unset, matching subscription-manager, instead of silently inheriting Ruby's unrelated 60s default.:foreman_request_timeout: 0is kept as an escape hatch back to that 60s behavior.Validated with an isolated A/B in a lab environment, ramping concurrent registrations up, on both an RPM/puppet-based deployment and a containerized (foremanctl) deployment: raising the timeout to 180s reduced failures in the moderate-to-high concurrency range, though it doesn't help at the very top end where failures come from genuine backend saturation rather than this timeout.
Fixes https://projects.theforeman.org/issues/39229