Skip to content

rgw/s3vector: add session admin api, config options for stats and periodic eviction of inactive sessions - #70553

Closed
9401adarsh wants to merge 44 commits into
ceph:wip-s3vectorfrom
9401adarsh:wip-s3vector-session-followup
Closed

9401adarsh wants to merge 44 commits into
ceph:wip-s3vectorfrom
9401adarsh:wip-s3vector-session-followup

Conversation

@9401adarsh

Copy link
Copy Markdown
Contributor

rgw/s3vector: finish follow-up tasks listed in #68731 (comment).

Changes

  • Add rgw_s3vector_session_index_cache_size and
    rgw_s3vector_session_metadata_cache_size configuration options.
  • Add /admin/vectorbucket session operations:
    • GET ...?vectorbucket=<bucket>&session=true returns whether that
      vector bucket has an active session, plus its index and metadata cache statistics.
    • GET ...?uid=<user>&session=true lists active vector-bucket sessions
      owned by the specified user, with pagination support.
    • DELETE ...?vectorbucket=<bucket>&session=true removes that vector
      bucket’s active session; succeeds even if no session is currently active.
  • Require RGW buckets capabilities for session admin operations.
  • Add rgw_s3vector_session_inactive_timeout; inactive sessions are removed by the
    background manager after the configured timeout.
  • Keep concurrent session lookups through the shared mutex while atomically recording
    session activity.
  • Add coverage for session admin operations and inactivity eviction.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@9401adarsh
9401adarsh marked this pull request as ready for review July 27, 2026 03:46
@9401adarsh
9401adarsh requested a review from a team as a code owner July 27, 2026 03:46
Copilot AI review requested due to automatic review settings July 27, 2026 03:46
@github-actions

github-actions Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: rgw_s3vector_session_metadata_cache_size (rgw.yaml.in)
+ added: rgw_s3vector_session_index_cache_size (rgw.yaml.in)
+ added: rgw_s3vector_session_inactive_timeout (rgw.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

13 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

…d within last x seconds, x is set as a config value (rgw_s3vector_session_inactive_timeout)

Signed-off-by: Adarsh <[email protected]>

rgw/s3vector: modify descriptions for session cache size config options

Signed-off-by: Adarsh <[email protected]>
…ucket

currently supported ops

i) GET /admin/vectorbucket?vectorbucket=<bucket>&session=true returns session/cache status for a single vector bucket.
ii) GET /admin/vectorbucket?uid=<uid>&session=true lists vector bucket sessions for a user, with optional pagination via marker and max-entries.
iii) DELETE /admin/vectorbucket?vectorbucket=<bucket>&session=true removes the in-memory session for a vector bucket if it exists.

Requests without session=true on /admin/vectorbucket are currently accepted as no-ops so the REST surface can grow later with additional vector bucket admin modes

rgw/s3vectors: expose session stats and remove methods in background method for REST

rgw/s3vector: add new files for REST resources at /admin/vectorbucket.

rgw/s3vector: add header imports for rest uptake of /admin/vectorbucket uptake

Signed-off-by: Adarsh <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@9401adarsh
9401adarsh force-pushed the wip-s3vector-session-followup branch from bd4f02f to f50ed1f Compare August 20, 2026 04:32
Signed-off-by: Adarsh <[email protected]>

rgw/s3vector: fix tests to reflect only api changes, conflicts, fetch conf values

Signed-off-by: Adarsh <[email protected]>

rgw/s3vector: fix tests

Signed-off-by: Adarsh <[email protected]>
@9401adarsh
9401adarsh force-pushed the wip-s3vector-session-followup branch from f50ed1f to 085e895 Compare August 20, 2026 05:20
@9401adarsh

Copy link
Copy Markdown
Contributor Author

@yuvalif, have addressed all comments.

Just had one final doubt, for check_caps I have used "buckets" for now. please let me know if i should change it to "vectorbuckets".

final test summary:


=================================================================================== 1 passed, 1 warning in 17.65s ===================================================================================
adarsh9401@folio07:~/ceph-ws/my-fork/ceph/src/test/rgw/s3vectors(wip-s3vector-session-followup-rebased)$ S3VTESTS_CONF="s3vtests.conf.SAMPLE" pytest s3vector_test.py
======================================================================================== test session starts ========================================================================================
platform linux -- Python 3.9.23, pytest-8.4.1, pluggy-1.5.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/adarsh9401/ceph-ws/my-fork/ceph/src/test/rgw/s3vectors
configfile: pytest.ini
plugins: benchmark-4.0.0
collected 57 items                                                                                                                                                                                  

s3vector_test.py ...s....................................................s                                                                                                                    [100%]

========================================================================================= warnings summary ==========================================================================================
s3vector_test.py: 55 warnings
  /home/adarsh9401/.local/lib/python3.9/site-packages/boto3/compat.py:89: PythonDeprecationWarning: Boto3 will no longer support Python 3.9 starting April 29, 2026. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.10 or later. More information can be found here: https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/
    warnings.warn(warning, PythonDeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================================================================== 55 passed, 2 skipped, 55 warnings in 334.49s (0:05:34) =======================================================================

@9401adarsh
9401adarsh requested a balanced review from Copilot August 24, 2026 23:34

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yuvalif

yuvalif commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@yuvalif, have addressed all comments.

Just had one final doubt, for check_caps I have used "buckets" for now. please let me know if i should change it to "vectorbuckets".

final test summary:


=================================================================================== 1 passed, 1 warning in 17.65s ===================================================================================
adarsh9401@folio07:~/ceph-ws/my-fork/ceph/src/test/rgw/s3vectors(wip-s3vector-session-followup-rebased)$ S3VTESTS_CONF="s3vtests.conf.SAMPLE" pytest s3vector_test.py
======================================================================================== test session starts ========================================================================================
platform linux -- Python 3.9.23, pytest-8.4.1, pluggy-1.5.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/adarsh9401/ceph-ws/my-fork/ceph/src/test/rgw/s3vectors
configfile: pytest.ini
plugins: benchmark-4.0.0
collected 57 items                                                                                                                                                                                  

s3vector_test.py ...s....................................................s                                                                                                                    [100%]

========================================================================================= warnings summary ==========================================================================================
s3vector_test.py: 55 warnings
  /home/adarsh9401/.local/lib/python3.9/site-packages/boto3/compat.py:89: PythonDeprecationWarning: Boto3 will no longer support Python 3.9 starting April 29, 2026. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.10 or later. More information can be found here: https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/
    warnings.warn(warning, PythonDeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================================================================== 55 passed, 2 skipped, 55 warnings in 334.49s (0:05:34) =======================================================================

@cbodley was wonderign regardign the admin capabilities for vector buckets. should we reuse the existing "buckets" capabilities or use new "vectorbuckets" ones?

@yuvalif
yuvalif requested a review from a team as a code owner August 27, 2026 08:15
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@yuvalif
yuvalif force-pushed the wip-s3vector branch 2 times, most recently from ea5d4ff to 2359632 Compare September 17, 2026 05:07
@yuvalif
yuvalif deleted the branch ceph:wip-s3vector September 17, 2026 17:16
@yuvalif yuvalif closed this Sep 17, 2026
@yuvalif

yuvalif commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

this was automatically closed because wip-s3vector was merged to main
please reopen against main

@yuvalif

yuvalif commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

rebased on top of main. also added documentation and fixes here: #72014

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants