Commit c834352
committed
rgw/sts: replacing load_stats with list_buckets
to correctly create a federated user in oidc namespace.
The idea was to check if the federated user had any buckets
associated with it from the time when the logic for creating
a shadow user was not in place, and this was done by calling
read_stats which returned -ENOENT when the user did not exist,
which was erroneously interpreted as buckets not existing for
the user - but this logic correctly led to creation of user
in oidc namespace. Later read_stats() was replaced by load_stats()
and load_stats() does not return -ENOENT when a user does
not exist, hence according to the code, the federated user
was not getting created in 'oidc' namespace. Hence replaced load_stats()
with list_buckets() and corrected the code to create a user
in oidc namespace if the user did not own any bucket.
Fixes: https://tracker.ceph.com/issues/69924
Signed-off-by: Pritha Srivastava <[email protected]>1 parent cc45b84 commit c834352
1 file changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
682 | 684 | | |
683 | 685 | | |
684 | | - | |
| 686 | + | |
685 | 687 | | |
686 | 688 | | |
687 | 689 | | |
| |||
0 commit comments