Skip to content

CLDSRV-1043: Fail KMS requests that exceed a time limit - #6358

Open
dvasilas wants to merge 3 commits into
development/9.6from
improvement/CLDSRV-1043-fail-kms-requests-over-time-limit
Open

dvasilas wants to merge 3 commits into
development/9.6from
improvement/CLDSRV-1043-fail-kms-requests-over-time-limit

Conversation

@dvasilas

@dvasilas dvasilas commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

KMIP and AWS KMS requests have no time limit: a request to a KMS that doesn't respond keeps its caller waiting indefinitely.

This PR adds a timeout to each attempt to a kmip or aws_kms KMS.
A request over the limit fails with a 500 error.

@bert-e

bert-e commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Hello dvasilas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.82%. Comparing base (60d77d2) to head (f217abc).
⚠️ Report is 3 commits behind head on development/9.6.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/Config.js 88.12% <100.00%> (+0.15%) ⬆️

... and 3 files with indirect coverage changes

@@                 Coverage Diff                 @@
##           development/9.6    #6358      +/-   ##
===================================================
+ Coverage            90.76%   90.82%   +0.05%     
===================================================
  Files                  207      207              
  Lines                39016    39046      +30     
===================================================
+ Hits                 35413    35463      +50     
+ Misses                3603     3583      -20     
Flag Coverage Δ
checksums-disabled-tests 46.21% <38.23%> (-0.01%) ⬇️
file-ft-tests 75.87% <38.23%> (+<0.01%) ⬆️
file-ft-tests-null-compat 76.37% <38.23%> (+<0.01%) ⬆️
kmip-ft-tests 43.99% <97.05%> (+0.11%) ⬆️
mongo-v0-ft-tests 76.92% <38.23%> (-0.01%) ⬇️
mongo-v1-ft-tests 76.90% <38.23%> (-0.03%) ⬇️
multiple-backend 44.57% <38.23%> (-0.01%) ⬇️
s3c-ft-tests-v0 71.68% <38.23%> (-0.03%) ⬇️
s3c-ft-tests-v0-null-compat 71.73% <38.23%> (-0.03%) ⬇️
s3c-ft-tests-v1 71.65% <38.23%> (-0.03%) ⬇️
sur-tests 46.32% <38.23%> (+1.20%) ⬆️
sur-tests-inflights 48.47% <38.23%> (-0.01%) ⬇️
unit 80.55% <100.00%> (+0.01%) ⬆️
utapi-v2-tests 45.12% <38.23%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread package.json Outdated
"@opentelemetry/instrumentation-ioredis": "~0.70.0",
"@opentelemetry/instrumentation-mongodb": "~0.75.0",
"@scality/arsenal": "^8.6.1",
"@scality/arsenal": "git+https://github.com/scality/Arsenal#574ed2041c4a963e0c30a73e64c21d3807e5c0c9",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arsenal is pinned to a raw commit (574ed204…) instead of a release tag. Git-based deps must pin to a tag. Release the Arsenal change (8.6.3?) and pin to that version before merging.

Temporary, until arsenal 8.6.4 is released. httpagent 1.1.1 is resolved
as the tarball arsenal's own lockfile uses: installing arsenal from git
builds it with its lockfile in the same yarn cache, and a git resolution
here makes yarn reject that cache entry.
Set by requestTimeoutMs on a kmip or aws_kms entry, 5000 ms by default.
The KMIP functional job gets a KMS that accepts connections and never answers.
@dvasilas
dvasilas force-pushed the improvement/CLDSRV-1043-fail-kms-requests-over-time-limit branch from 9917afd to f217abc Compare November 19, 2026 13:47
@dvasilas
dvasilas requested a review from a team November 19, 2026 16:20

@nicolas2bert nicolas2bert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
On follow up caught by Claude:
The AWS SDK's requestTimeout counts from the start of the request until the response headers arrive, and then it stops. Once the headers are in, nothing limits reading the body.

So this case still hangs forever:

  • The KMS (or a proxy, or a network that drops packets) sends 200 OK and the headers.
  • Then it sends nothing more.
  • The S3 request waits forever, just like before the PR.

@dvasilas

dvasilas commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

LGTM On follow up caught by Claude: The AWS SDK's requestTimeout counts from the start of the request until the response headers arrive, and then it stops. Once the headers are in, nothing limits reading the body.

So this case still hangs forever:

  • The KMS (or a proxy, or a network that drops packets) sends 200 OK and the headers.
  • Then it sends nothing more.
  • The S3 request waits forever, just like before the PR.

I created a follow up ticket ARSN-684

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants