Skip to content

squid: rgw: account rm --purge-data can delete users/roles/groups/oidcs too - #68060

Merged
batrick merged 2 commits into
ceph:squidfrom
cbodley:wip-75606-squid
Jun 9, 2026
Merged

batrick merged 2 commits into
ceph:squidfrom
cbodley:wip-75606-squid

Conversation

@cbodley

@cbodley cbodley commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

@cbodley
cbodley requested a review from a team as a code owner March 27, 2026 18:42
@cbodley cbodley added this to the squid milestone Mar 27, 2026
@cbodley cbodley added the rgw label Mar 27, 2026
@yuriw

yuriw commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

@cbodley suspect this broke the build https://jenkins.ceph.com/job/ceph-dev-pipeline/4229/
C{++} Error in /ceph/debs/Ubuntu/WORKDIR/ceph/src/rgw/rgw_account.cc:321:7

cbodley added 2 commits April 9, 2026 09:32
users and all of their buckets/objects can be deleted in one shot with
`radosgw-admin user rm --purge-data`. this `--purge-data` option was
copied for `account rm`, but only applied to buckets/objects and not
other account metadata like users/roles/groups/oidc-providers. if any
of those objects still existed, `account rm` would fail with `ENOTEMPTY`
until the account owner used IAM apis like DeleteUser etc to remove them
all manually

`--purge-data` now applies to all account metadata, enabling admins to
remove them in one shot

Fixes: https://tracker.ceph.com/issues/75008

Signed-off-by: Casey Bodley <[email protected]>
(cherry picked from commit a002beb)

Conflicts:
	src/rgw/rgw_account.cc: no ldpp_dout_fmt()
Signed-off-by: Casey Bodley <[email protected]>
(cherry picked from commit 1303415)

Conflicts:
	src/rgw/rgw_account.cc: no ldpp_dout_fmt()
@anrao19

anrao19 commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

FYI, pr testing is in progress...
Tracker created for same is : https://tracker.ceph.com/issues/76004

@batrick batrick added the releng-audit-fail Release engineering: failed backport verification audit. label May 14, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label May 14, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated Backport Parity Review - Backport Deviation Alert

A conflict or unapproved deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff below to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.

Affected File(s)

Range Diff

Click to expand
--- Original (a002beb6)
+++ Backport (edb916a5)
@@ -14,3 +14,7 @@
 Fixes: https://tracker.ceph.com/issues/75008
 
 Signed-off-by: Casey Bodley <[email protected]>
+(cherry picked from commit a002beb6602d1f7283e9d1b60f7ab7ae95ca9d95)
+
+Conflicts:
+	src/rgw/rgw_account.cc: no ldpp_dout_fmt()

================================================================================
RANGE DIFF
================================================================================

1:  a002beb6602 ! 1:  edb916a5762 rgw: `account rm --purge-data` can delete users/roles/groups/oidcs too
    @@ Commit message
         Fixes: https://tracker.ceph.com/issues/75008
     
         Signed-off-by: Casey Bodley <[email protected]>
    +    (cherry picked from commit a002beb6602d1f7283e9d1b60f7ab7ae95ca9d95)
    +
    +    Conflicts:
    +            src/rgw/rgw_account.cc: no ldpp_dout_fmt()
     
      ## PendingReleaseNotes ##
     @@
    - * DASHBOARD: RGW Service form updated to take input regarding QAT compression.
    -   - QAT compression is an optional field which can be set to 'Hardware' or 'Software' by selecting options from provided dropdwon. If 'None' is selected, compression is removed altogether.
    - * CephFS: The `peer_add` command is deprecated in favor of the `peer_bootstrap` command.
    ++
    + >=20.0.0
    + 
    + * RGW: Lua scripts will not run against health checks.
    +@@
    +   does not match rados_write_op_zero, and offset and length are swapped, which
    +   results in an unexpected response.
    + 
    ++>=19.2.4
    ++
     +* RGW: For `radosgw-admin account rm`, the `--purge-data` option previously applied only
     +  to buckets and objects, but now deletes account users, roles, groups, and oidc-providers
     +  too instead of failing with ENOTEMPTY.
    - * RADOS: When objects are read during deep scrubs, the data is read in strides,
    -   and the scrubbing process is delayed between each read in order to avoid monopolizing
    -   the I/O capacity of the OSD.
    ++
    + >=19.2.2
    + 
    + * RGW: PutObjectLockConfiguration can now be used to enable S3 Object Lock on an
     
      ## src/rgw/rgw_account.cc ##
     @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
    @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
     +        err_msg = fmt::format("unable to delete user {}", info.user_id.to_str());
     +        return ret;
     +      }
    -+      ldpp_dout_fmt(dpp, 1, "Deleted account user {}", info.user_id.to_str());
    ++      ldpp_dout(dpp, 1) << "Deleted account user " << info.user_id.to_str() << dendl;
     +    }
     +  } while (!users.next_marker.empty());
      
    @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
              err_msg = fmt::format("unable to delete bucket {}", ent.bucket.name);
              return ret;
            }
    -+      ldpp_dout_fmt(dpp, 1, "Deleted account bucket {}", ent.bucket.name);
    ++      ldpp_dout(dpp, 1) << "Deleted account bucket " << ent.bucket.name << dendl;
          }
        } while (!buckets.next_marker.empty());
      
    @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
     +        err_msg = fmt::format("unable to delete role {}", info.arn);
     +        return ret;
     +      }
    -+      ldpp_dout_fmt(dpp, 1, "Deleted account role {}", info.arn);
    ++      ldpp_dout(dpp, 1) << "Deleted account role " << info.arn << dendl;
     +    }
     +  } while (!roles.next_marker.empty());
      
    @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
     +        err_msg = fmt::format("unable to delete group {}", info.id);
     +        return ret;
     +      }
    -+      ldpp_dout_fmt(dpp, 1, "Deleted account group {}", info.id);
    ++      ldpp_dout(dpp, 1) << "Deleted account group " << info.id << dendl;
     +    }
     +  } while (!groups.next_marker.empty());
      
    @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
     +      err_msg = fmt::format("unable to delete oidc provider {}", info.provider_url);
     +      return ret;
     +    }
    -+    ldpp_dout_fmt(dpp, 1, "Deleted account oidc provider {}", info.provider_url);
    ++    ldpp_dout(dpp, 1) << "Deleted account oidc provider " << info.provider_url << dendl;
     +  }
     +
        return driver->delete_account(dpp, y, info, objv);

Automated Backport Parity Review - Backport Deviation Alert

A conflict or unapproved deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff below to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.

Affected File(s)

Range Diff

Click to expand
--- Original (1303415f)
+++ Backport (c0bae750)
@@ -1,3 +1,7 @@
 rgw: `account rm` also checks and removes sns topics
 
 Signed-off-by: Casey Bodley <[email protected]>
+(cherry picked from commit 1303415f4892b0c3be9293750c5ad2d71aac56f9)
+
+Conflicts:
+	src/rgw/rgw_account.cc: no ldpp_dout_fmt()

================================================================================
RANGE DIFF
================================================================================

1:  1303415f489 ! 1:  c0bae750741 rgw: `account rm` also checks and removes sns topics
    @@ Commit message
         rgw: `account rm` also checks and removes sns topics
     
         Signed-off-by: Casey Bodley <[email protected]>
    +    (cherry picked from commit 1303415f4892b0c3be9293750c5ad2d71aac56f9)
    +
    +    Conflicts:
    +            src/rgw/rgw_account.cc: no ldpp_dout_fmt()
     
      ## src/rgw/rgw_account.cc ##
     @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
    -     ldpp_dout_fmt(dpp, 1, "Deleted account oidc provider {}", info.provider_url);
    +     ldpp_dout(dpp, 1) << "Deleted account oidc provider " << info.provider_url << dendl;
        }
      
     +  rgw::sal::TopicList topics;
    @@ src/rgw/rgw_account.cc: int remove(const DoutPrefixProvider* dpp,
     +        err_msg = fmt::format("unable to delete topic {}", topic_name);
     +        return ret;
     +      }
    -+      ldpp_dout_fmt(dpp, 1, "Deleted account topic {}", topic_name);
    ++      ldpp_dout(dpp, 1) << "Deleted account topic " << topic_name << dendl;
     +    }
     +  } while (!topics.next_marker.empty());
     +

Commit Parity Visualizer

BACKPORT PR #68060 SOURCE PR SOURCE STATUS
edb916a rgw: account rm --purge-data can delete users/roles/groups/oidcs too PR #67405 a002beb rgw: account rm --purge-data can delete users/roles/groups/oidcs too
c0bae75 rgw: account rm also checks and removes sns topics 1303415 rgw: account rm also checks and removes sns topics

🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

CI Run Log: View Workflow Details

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label May 14, 2026
@anrao19

anrao19 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

pr testing completed and approved by @ivancich , more deatails : https://tracker.ceph.com/issues/76004
@cbodley , if no further testing is needed then this pr can be merged

@anrao19

anrao19 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

jenkins test api

@anrao19

anrao19 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

@batrick
batrick merged commit 9a4cc8a into ceph:squid Jun 9, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation needs-qa ready-to-merge releng-audit-fail Release engineering: failed backport verification audit. rgw TESTED

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants