Skip to content

mgr/dashboard: Stale RGW user/account metadata cache in mgr after delete and recreate - #69968

Merged
afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:fix-rgw-cache-invalid
Jul 14, 2026
Merged

afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:fix-rgw-cache-invalid

Conversation

@nmunet

@nmunet nmunet commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

fixes: https://tracker.ceph.com/issues/77544

Screencast.From.2026-07-06.22-48-23.mp4

Root Cause
The Dashboard caches RGW client instances for performance. When a user is deleted, the cached instance with stale credentials remains in memory. Upon user recreation, the Dashboard attempts to reuse the old cached instance, causing RGW to return a negative cache hit and authentication failure.

Solution
Implemented automatic cache invalidation during user deletion:

Store reference to cached client instance before deletion attempt
Delete user via RGW Admin API
Only invalidate cache after successful deletion
Prevents negative cache hits when user is recreated with same UID

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.

@nmunet
nmunet force-pushed the fix-rgw-cache-invalid branch from 8041fd7 to 6bf1347 Compare July 7, 2026 05:55

@afreen23 afreen23 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 — clean cache invalidation after successful delete. Prevents stale entries on user recreate.

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Jul 13, 2026
@afreen23

Copy link
Copy Markdown
Contributor

jenkins test windows

@nmunet

nmunet commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Failing e2e are not relevant to this PR
"before each" hook for "should display inventory".when cluster creation is completed Hosts page "before each" hook for "should display inventory"
"before each" hook for "should drain, remove and add the host back".Host Page "before each" hook for "should drain, remove and add the host back"
Add hosts (example #2).Cluster expansion host addition Add hosts (example #2)
Remove hosts (example #2).Cluster expansion host addition Remove hosts (example #2)
should redirect to overview landing page after adding storage.when cluster creation is completed should redirect to overview landing page after adding storage
should force maintenance and exit.Host Page should force maintenance and exit
should check if rgw daemon is running on all hosts.Host Page should check if rgw daemon is running on all hosts
should have removed "_no_schedule" label.when cluster creation is completed Hosts page should have removed "_no_schedule" label
should add one more host.when cluster creation is completed Hosts page should add one more host
should check if monitoring stacks are running on the root host.when cluster creation is completed Hosts page should check if monitoring stacks are running on the root host
should check if atleast 3 osds are created.OSDs page should check if atleast 3 osds are created
"before each" hook for "should check if title contains Create Services".Create cluster create services page "before each" hook for "should check if title contains Create Services"
"before each" hook for "should check if rgw service is created".Services page "before each" hook for "should check if rgw service is created"
"before each" hook for "should check cluster resources table is present".Create Cluster Review page fields check "before each" hook for "should check cluster resources table is present"
"before each" hook for "should identify device".Physical Disks page "before each" hook for "should identify device"
"before each" hook for "should check if title contains Create OSDs".Add storage - create osds page "before each" hook for "should check if title contains Create OSDs"

@afreen23
afreen23 merged commit ef47d68 into ceph:main Jul 14, 2026
6 checks passed
@afreen23
afreen23 deleted the fix-rgw-cache-invalid branch July 14, 2026 08:16
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Jul 14, 2026
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/29317422610

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

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants