Repository navigation
squid: rgw: add radosgw-admin bucket suspend/unsuspend commands - #71104
Conversation
|
Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR |
|
Hi — Releng Audit is failing for two reasons:
Thanks! |
|
ok to test |
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
|
This PR has been added to squid integration testing by anuchaithra started 2026-08-20-07:39. |
@RaminNietzsche , build creation fails request you to review : https://shaman.ceph.com/builds/ceph/wip-anuchaithra-testing-20260820.073852-squid/ |
|
@anrao19 Thanks for the ping. The shaman failure is a compile error from this backport, not infra.
Fix: drop that helper; keep |
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Automated Backport Parity Review
Discrepancies detected between the backport PR and the original source PR(s). Please see the Commit Parity Visualizer below.
Commit Parity Visualizer
| BACKPORT PR #71104 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| fee3cdd rgw: add radosgw-admin bucket suspend/unsuspend commands | PR #69645 | 6439e70 rgw: add radosgw-admin bucket suspend/unsuspend commands |
| 611719d rgw: address bucket suspend review feedback | 09a3e44 rgw: address bucket suspend review feedback | |
| ec77243 rgw: update radosgw-admin help.t for bucket suspend | b4b8d4a rgw: update radosgw-admin help.t for bucket suspend | |
| 0f850b6 squid: drop bucket_deleted helper from suspend backport | <<<< EXTRA IN BACKPORT >>>> |
Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations
A conflict or 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.
This does not necessarily indicate an issue but a maintainer should review.
**Click to expand conflict summaries.**
Deviation in Backport fee3cdd (cherry-pick of 6439e70)
Affected File(s)
src/rgw/driver/rados/rgw_bucket.ccsrc/rgw/rgw_admin.cc
Range Diff
Click to expand
--- Original (6439e70b)
+++ Backport (fee3cddd)
@@ -12,3 +12,14 @@
Includes admin documentation, release note, QA workunit, and unit tests.
Signed-off-by: ramin.najarbashi <[email protected]>
+(cherry picked from commit 6439e70bfb264b91218be4f1f96dfd3703515384)
+
+Conflicts:
+ src/rgw/rgw_admin.cc
+ Path is src/rgw/rgw_admin.cc on squid (radosgw-admin/radosgw-admin.cc on
+ main). Do not introduce WITH_RADOSGW_RADOS guards around bucket
+ check/sync; add BUCKET_SUSPEND/UNSUSPEND enums, commands, and
+ non_master_ops_list entries only.
+ src/rgw/driver/rados/rgw_bucket.cc
+ Keep suspended flag in bucket stats; use bucket_info.owner for the
+ owner encode (bucket_info already in scope in bucket_stats()).
================================================================================
RANGE DIFF
================================================================================
1: 6439e70bfb2 ! 1: fee3cddd3a4 rgw: add radosgw-admin bucket suspend/unsuspend commands
@@ Commit message
Includes admin documentation, release note, QA workunit, and unit tests.
Signed-off-by: ramin.najarbashi <[email protected]>
+ (cherry picked from commit 6439e70bfb264b91218be4f1f96dfd3703515384)
+
+ Conflicts:
+ src/rgw/rgw_admin.cc
+ Path is src/rgw/rgw_admin.cc on squid (radosgw-admin/radosgw-admin.cc on
+ main). Do not introduce WITH_RADOSGW_RADOS guards around bucket
+ check/sync; add BUCKET_SUSPEND/UNSUSPEND enums, commands, and
+ non_master_ops_list entries only.
+ src/rgw/driver/rados/rgw_bucket.cc
+ Keep suspended flag in bucket stats; use bucket_info.owner for the
+ owner encode (bucket_info already in scope in bucket_stats()).
## PendingReleaseNotes ##
@@
- both --marker and --object-version options together (e.g., ``--marker=obj1 --object-version=abc123``).
- This enables proper pagination through versioned bucket listings without duplicates or
- infinite loops. For non-versioned buckets, use only --marker as before (backward compatible).
+ >=19.2.6
+
++* RADOS: PG autoscaler allows overlapping roots. Each root receives a PG target based
++ on its OSDs, with OSDs shared across multiple roots contributing proportionally
++ less to each root's allocation.
++
++* CephFS: CephFS snapshots metadata is now mutable. It is now possible to add,
++ update and remove existing key-value pairs that are part of a snapshot
++ metadata via libcephfs API ceph_do_snap_md_op().
++
++* CephFS: MDS dmclock support for subvolume QoS. With this feature, MDS assigns QoS
++ to throttle client metadata requests (e.g., create, mkdir, lookup, and so on) to
++ subvolumes, where each subvolume QoS is shared among multiple client sessions at
++ that time.
++
++* librados/neorados: The C++ APIs for executing Ceph Class (CLS) methods
++ have undergone a breaking change to enforce compile-time type safety, replacing
++ legacy string-based parameters with strongly-typed ClsMethod structs. C++
++ developers must update their method calls to use these new structs, which ensure
++ read/write semantics are correctly applied.
++
++* RGW: S3 ListObjects and ListObjectVersions now support the
++ ``x-amz-optional-object-attributes: RestoreStatus`` request header to include
++ restore status in listing responses. Restore status is stored in the bucket
++ index, so only objects written or restored after this upgrade will populate
++ the field. Existing objects are unaffected.
++* RGW: New S3 Control APIs to apply PublicAccessBlock configuration to User Accounts.
++* ceph-volume: Raw BlueStore OSD preparation now pre-formats NVMe devices and
++ skips the slower BlueStore discard phase,reducing mkfs time on
++ very large namespaces.
++* RGW: Omap backing for the RGW Datalog is deprecated and support will be removed in a future version.
++ - The `rgw default data log backing` option is removed and it is no longer
++ possible to create clusters with an omap based datalog.
++ - `radosgw-admin datalog type` will only accept `--log_type=fifo`.
++* RGW: iam:RemoveClientIdFromOIDCProvider is now a recognized action for
++ policy, corrected from a typo of iam:RemoveCientIdFromOIDCProvider
++
++* MGR: The default values of ``mon_target_pg_per_osd`` and ``mon_max_pg_per_osd``
++ have been increased from 100 and 250 to 200 and 500, respectively. These values
++ enhance the PG autoscaler's ability to calculate reasonable ``pg_num`` values
++ for pools under its control. These in turn increase parallelism and performance,
++ and improve the ``balancer`` module's ability to acheive uniform OSD utilization.
++
++ [This concomitant PR](https://github.com/ceph/ceph/pull/67694) ensures that
++ upgrades are not delayed or disrupted by PG splitting as a result of this change.
++
++ Clusters with effective ``bluestore_osd_memory_target`` values smaller than
++ the default 4GiB may wish to explicitly set the previous default values in
++ the central config store before upgrading. This will reduce the potential
++ for increased memory starvation. Clusters with SSDs split into more than two
++ OSDs may also wish to pin their current values in advance, or redeploy those
++ SSDs with at most two OSDs per.
++
++* RGW: Bucket Logging suppports creating log buckets in EC pools.
++ Implicit logging object commits are now performed asynchronously.
++* RGW: radosgw-admin bucket list now supports pagination for versioned buckets by using
++ both --marker and --object-version options together (e.g., ``--marker=obj1 --object-version=abc123``).
++ This enables proper pagination through versioned bucket listings without duplicates or
++ infinite loops. For non-versioned buckets, use only --marker as before (backward compatible).
+* RGW: ``radosgw-admin bucket suspend`` and ``bucket unsuspend`` can suspend an
+ individual bucket without suspending its owner. S3 requests against a suspended
+ bucket fail with ``403 BucketSuspended``. The ``suspended`` field is now included
+ in ``radosgw-admin bucket stats`` output.
- * RGW: OpenSSL engine support is deprecated in favor of provider support.
- - Removed the `openssl_engine_opts` configuration option. OpenSSL engine configuration in string format is no longer supported.
- - Added the `openssl_conf` configuration option for loading specified providers as default providers.
++* RGW: OpenSSL engine support is deprecated in favor of provider support.
++ - Removed the `openssl_engine_opts` configuration option. OpenSSL engine configuration in string format is no longer supported.
++ - Added the `openssl_conf` configuration option for loading specified providers as default providers.
++ Configuration file syntax follows the OpenSSL standard (see https://github.com/openssl/openssl/blob/master/doc/man5/config.pod).
++ If the default provider is required when also using custom providers,
++ it must be explicitly loaded in the configuration file or code (see https://github.com/openssl/openssl/blob/master/README-PROVIDERS.md).
++* RGW: Fixed bucket notification events so the 'x_amz_request_id' in NotificationEvent now matches the 'x_amz_request_id' returned by the corresponding S3 operation.
++* RGW: The rgw_gc_max_deferred and rgw_gc_max_deferred_entries_size options have been removed, as they did not do anything.
++ - Updated the default for rgw_gc_max_queue_size to account for the extra space from removing rgw_gc_max_deferred_entries_size.
++* RGW: The default value of ``rgw_thread_pool_size`` has been reduced from 512 to 128.
++ Benchmarks showed that the lower thread count improves throughput and reduces latency
++ on NVMe and HDD based environments. Users with specific workload requirements can
++ tune this value; see also ``rgw_max_concurrent_requests``.
++
++
++* DASHBOARD: A new Overview landing page provides an at-a-glance cluster summary
++ with health status, capacity, performance metrics, and quick-access links. All the
++ previous legacy landing pages are removed.
++* 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.
++* DASHBOARD: NVMe-oF management workflows have been revamped with DH-HMAC-CHAP
++ in-band authentication support for both unidirectional (host-to-controller) and
++ bidirectional (mutual) authentication, namespace host masking, and an integrated
++ subsystem creation wizard that combines NQN setup, host addition, and
++ authentication configuration in a single guided flow. Subsystem HA is now enabled
++ by default. Gateway group creation and deletion are now supported directly from
++ the dashboard, including per-gateway node management. NVMe-oF performance and
++ overview Grafana dashboards are embedded directly in the Block > NVMe/TCP tab.
++* DASHBOARD: RGW Storage Classes now support Glacier and Local storage class
++ types with full create, list, edit, and delete operations.
++* DASHBOARD: RGW S3 Bucket Notifications are now fully manageable from the dashboard.
++ Notification destinations (topics) support full CRUD operations (create, list, edit, delete)
++ for configuring webhook endpoints, Kafka brokers, and AMQP queues. Bucket notification
++ configurations can be created, listed, edited, and deleted to define which S3 events
++ trigger notifications and which destination to use.
++* DASHBOARD: RGW User Accounts can now be linked to individual RGW users,
++ root account user functionality has been added, and the bucket form
++ differentiates account users from standalone RGW users.
++* DASHBOARD: RGW tiering now supports read-through configuration and bucket
++ tiering options in lifecycle policies.
++* DASHBOARD: RGW multisite setup improvements: the RGW module is now
++ auto-enabled on primary and secondary clusters during multisite automation,
++ FQDN endpoints are supported (not only IPs), and users can re-use existing
++ realm/zonegroup/zone configurations when setting up replication.
++* DASHBOARD: RGW archive zone configuration is now available from the dashboard.
++* DASHBOARD: SMB shares now support QoS rate limiting, including per-share
++ bandwidth limits and cluster-wide rate limiting configuration.
++* DASHBOARD: NFS export management has been enhanced with subvolume group and
++ subvolume selection in the edit export form, CephFS snapshot visibility
++ toggling per export, and IPv6 address support. NFS cluster and export listing
++ is now available.
++* DASHBOARD: CephFS volume creation now supports selecting existing pools for
++ metadata and data instead of always creating new ones.
++* DASHBOARD: Certificate management is now integrated into the dashboard.
++ Service detail views include a Certificate tab showing certificate status, and
++ the service create/edit modal supports certmgr-based certificate provisioning.
++ Certificate health alerts are surfaced in the dashboard and Prometheus.
++* DASHBOARD: The onboarding (cluster creation) wizard has been redesigned with
++ an updated layout and improved visual flow.
++* DASHBOARD: The dashboard UI has been modernized with the Carbon Design
++ System — including forms, modals, notifications, icons, performance charts,
++ and multi-cluster views.
++* DASHBOARD: Logging infrastructure has been migrated from Promtail to Grafana
++ Alloy.
++* DASHBOARD: Prometheus configuration now supports a remote write section for
++ forwarding metrics to external systems.
++* DASHBOARD: `ceph dashboard sso enable oauth2` checks for oauth2-proxy service for SSO enablement. If the `oauth2-proxy` service goes down, cephadm will automatically disable Dashboard OAuth2 SSO.
++* Monitoring: New Grafana dashboards have been added for Application Overview,
++ CephFS, CephFS Subvolume, NVMe-oF (performance and overview), SMB Overview,
++ and RGW Bucket Notification. The Grafana dashboards naming convention has been
++ standardized. Grafana has been upgraded to version 12.3.1.
++* Monitoring: Added ``NVMeoFHostKeepAliveTimeout`` Prometheus alert that fires
++ when an NVMe-oF host keepalive times out.
++* Monitoring: Certificate management health checks now generate Prometheus
++ alerts and dashboard warnings for certificate expiration and errors.
++ - CephCertificateError: Fires when a Ceph certificate has expired (critical severity).
++ - CephCertificateWarning: Fires when a Ceph certificate is about to expire (warning severity).
++
++* CephFS: The `peer_add` command is deprecated in favor of the `peer_bootstrap` command.
++* 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.
++ The default stride size (``osd_deep_scrub_stride``) was 512 KBytes, and is now 4 MBytes.
++* RADOS: When an OSD is overloaded with queued snap-trim operations, no
++ regular (non-urgent) scrubs will be scheduled on that OSD. This is
++ determined by comparing the total snap-trim queue lengths for all PGs
++ for which the OSD is a primary against ``osd_scrub_queued_snaptrims_limit``,
++ which defaults to 500.
++ This restriction does not apply to operator-initiated scrubs, nor to repair scrubs.
++ It can be disabled by setting ``osd_scrub_queued_snaptrims_limit`` to 0.
++* RGW: Add SSE-KMS secrets cache
++
++* RADOS: Stretch mode can now be entered even if the two dividing buckets differ
++ in weight by a small fraction (default 0.1). This is tunable via
++ `mon_stretch_max_bucket_weight_delta`.
++
++* CephFS: The offline CephFS tools (cephfs-data-scan, cephfs-journal-tool,
++ and cephfs-table-tool) now include progress tracking with ETA (Estimated Time of
++ Arrival) for long-running operations. Progress updates are displayed automatically
++ at regular intervals, showing completion percentage, processed items, and time
++ estimates. This feature is enabled by default for relevant commands including
++ scan_extents, scan_inodes, and other state-changing operations.
++ Related Tracker: https://tracker.ceph.com/issues/63191
++* RBD: Fixed incorrect behavior of the "start-time" argument for mirror
++ snapshot and trash purge schedules, where it previously offset the schedule
++ anchor instead of defining it. The argument now requires an ISO 8601
++ date-time. The `schedule ls` output displays the start time in UTC, including
++ the date and time in the format "%Y-%m-%d %H:%M:00". The `schedule status`
++ output now displays the next schedule time in UTC.
++* CephFS Mirroring: Now utilizes a multi-threaded architecture to improve synchronization
++ performance. The workload is split into two distinct thread pools: a crawler thread pool, which
++ manages snapshot crawl and a data synchronization thread pool, which handles concurrent file
++ transfers. Users can fine-tune these operations using configuration parameters:
++ cephfs_mirror_max_concurrent_directory_syncs (controlling the number of concurrent snapshots being crawled)
++ and cephfs_mirror_max_datasync_threads (controlling the total threads available for data sync).
++ For more information, see https://tracker.ceph.com/issues/73452
++* CephFS Mirroring: Improved incremental synchronization behavior in CephFS mirroring. Previously,
++ block-level delta synchronization was used for all files regardless of size. With this change,
++ blockdiff is applied only to files larger than a configurable threshold, while smaller files are
++ synchronized using full copy, as blockdiff is not efficient for small files. The threshold is
++ controlled by the new configuration option cephfs_mirror_blockdiff_min_file_size (default: 16_M).
++ For more information, see https://tracker.ceph.com/issues/73452
++* CephFS Mirroring: Improved mirror daemon status reporting. The command
++ ``ceph fs snapshot mirror daemon status`` now shows the remote cluster's
++ monitor addresses and cluster ID for each configured peer, making it easier
++ to verify peer connectivity and troubleshoot mirroring issues.
++* CephFS Mirroring: The ``fs mirror peer status`` admin socket command reports
++ additional per-directory sync metrics (sync mode, throughput, crawl and
++ data-sync queue timing, bytes/files progress, and ETA). Output is grouped
++ under ``metrics/<mirrored-dir-path>/peer/<peer-uuid>``. For more information,
++ see https://tracker.ceph.com/issues/73453
++* CephFS Mirroring: Per-directory snapshot sync progress is exposed as labeled perf
++ counters in the ``cephfs_mirror_directory`` group (``counter dump`` on the mirror
++ daemon admin socket, exportable via ``ceph-exporter``). Counters mirror
++ ``fs mirror peer status`` fields (directory state, current sync, last sync, and
++ snap summary) and are labeled by peer UUID and mirrored directory path. See
++ https://tracker.ceph.com/issues/73457
++* CephFS Mirroring: The mirroring module provides ``ceph fs snapshot mirror status``,
++ a Ceph CLI command similar to the ``fs mirror peer status`` admin socket interface
++ for viewing per-directory snapshot sync metrics. The output layout matches
++ ``fs mirror peer status`` for core sync fields and additionally includes
++ ``metrics_updated_at`` (time of the last omap write). Optional filters by
++ mirrored directory path and peer UUID are supported. For more information,
++ see https://tracker.ceph.com/issues/76686
++* CephFS Mirroring: Introduced snapshot checkpoints feature that allows users to mark
++ specific snapshots as important milestones and track their replication status to remote
++ sites. Checkpoints automatically detect if a snapshot has already been synced and provide
++ visibility into disaster recovery readiness. The feature includes four new CLI commands:
++ ``ceph fs snapshot mirror checkpoint add`` to mark a snapshot,
++ ``ceph fs snapshot mirror checkpoint now`` to checkpoint the latest snapshot,
++ ``ceph fs snapshot mirror checkpoint ls`` to list all checkpoints with their status
++ (created/complete/failed), and ``ceph fs snapshot mirror checkpoint remove`` to remove
++ a checkpoint. Checkpoint metadata is persistent across daemon restarts. This feature is
++ useful for compliance auditing, application consistency verification, and SLA tracking.
++ For more information, see https://tracker.ceph.com/issues/73454
++* RBD: Mirror snapshot creation and trash purge schedules are now automatically
++ staggered when no explicit "start-time" is specified. This reduces scheduling
++ spikes and distributes work more evenly over time.
++* RBD: Introduced a new ``RBD_LOCK_MODE_EXCLUSIVE_TRANSIENT`` policy for
++ ``rbd_lock_acquire()``. This is a low-level interface intended to allow
++ a peer to grab exclusive lock manually for short periods of time with other
++ peers pausing their activity and waiting for the lock to be released rather
++ than instantly aborting I/O and returning an error. It's possible to switch
++ from ``RBD_LOCK_MODE_EXCLUSIVE`` to ``RBD_LOCK_MODE_EXCLUSIVE_TRANSIENT``
++ policy and vice versa even if the lock is already held.
++* RGW: In multisite deployments, zone endpoints configured in the zonegroup
++ (e.g. ``https://zone-a.example.com``) can now be resolved to all IP addresses
++ returned by DNS, with inter-zone traffic distributed across them using
++ round-robin and per-IP health tracking. This enables DNS-based service discovery
++ for inter-zone traffic without an external load balancer. This feature is disabled
++ by default: to opt in, set ``rgw_rest_conn_connect_to_resolved_ips = true``. The
++ per-IP retry-after-failure timeout is controlled by ``rgw_rest_conn_ip_fail_timeout_secs``
++ (default: 2 seconds). Deployments that work around libcurl's single-address behavior
++ by repeating the same endpoint multiple times in zone configuration should review that
++ setup before enabling, as round-robin distribution makes such duplication unnecessary.
++
++* OSD: A health warning is reported when BlueFS usage exceeds the
++ configured ratio of the main OSD data device size. This warning is
++ informational and can be muted with:
++ ``ceph health mute BLUESTORE_BLUEFS_OVERSIZED``
++* MGR: The Manager now automatically increases ``mgr_stats_period`` when its
++ message queue is congested, reducing daemon reporting frequency to prevent
++ overload. The period recovers automatically once the queue clears. This
++ behavior is controlled by the new ``mgr_stats_period_autotune`` (default:
++ ``true``) and ``mgr_stats_period_autotune_queue_threshold`` (default: ``100``)
++ config options.
++* MGR: The Manager cache system has been redesigned from a TTL-based (time-to-live)
++ approach to an event-driven invalidation strategy. The cache now automatically
++ invalidates entries when underlying cluster maps are updated. The cache is enabled
++ by default. The previous `mgr_ttl_cache_expire_seconds` configuration option has
++ been removed and replaced with `mgr_map_cache_enabled` (default: true).
++* The ``last_degraded`` timestamp is added to the ``pg_stat_t`` structure to
++ track the initial point of redundancy loss when a PG enters an undersized or
++ degraded state. This timestamp is latched until the PG returns to a clean
++ state and a subsequent redundancy loss occurs. Used in conjunction with
++ ``last_clean``, the ``last_degraded`` timestamp enables the calculation of
++ data vulnerability and durability scores.
+ * RBD: It's possible to specify source cluster's ``mon_host`` and ``key`` for
+ ``native`` format migration via the migration spec now. This eliminates the
+ dependency on ``<cluster-name>.conf`` file in a known location which is
## doc/man/8/radosgw-admin.rst ##
@@ doc/man/8/radosgw-admin.rst: as follows:
:command:`bucket stats`
- List bucket statistics plus other internal information about a bucket.
+ Returns bucket statistics.
+:command:`bucket suspend`
+ Suspend an individual bucket. S3 requests against the bucket fail with
@@ qa/workunits/rgw/test_rgw_bucket_suspend.py (new)
## src/rgw/driver/rados/rgw_bucket.cc ##
@@ src/rgw/driver/rados/rgw_bucket.cc: static int bucket_stats(rgw::sal::Driver* driver, const rgw::SiteConfig& site,
- logrecord_ut.gmtime(formatter->dump_stream("judge_reshard_lock_time"));
+ formatter->dump_int("index_generation", index.gen);
formatter->dump_bool("object_lock_enabled", bucket_info.obj_lock_enabled());
formatter->dump_bool("mfa_enabled", bucket_info.mfa_enabled());
+- ::encode_json("owner", bucket->get_info().owner, formatter);
+ formatter->dump_bool("suspended", (bucket_info.flags & BUCKET_SUSPENDED) != 0);
- ::encode_json("owner", bucket_info.owner, formatter);
++ ::encode_json("owner", bucket_info.owner, formatter);
if (has_index) {
+ formatter->dump_int("num_shards", index.layout.normal.num_shards);
- ## src/rgw/radosgw-admin/radosgw-admin.cc ##
-@@ src/rgw/radosgw-admin/radosgw-admin.cc: void usage()
+ ## src/rgw/rgw_admin.cc ##
+@@ src/rgw/rgw_admin.cc: void usage()
cout << " bucket link link bucket to specified user\n";
cout << " bucket unlink unlink bucket from specified user\n";
cout << " bucket stats returns bucket statistics\n";
@@ src/rgw/radosgw-admin/radosgw-admin.cc: void usage()
cout << " bucket rm remove bucket\n";
cout << " bucket check check bucket index by verifying size and object count stats\n";
cout << " bucket check olh check for olh index entries and objects that are pending removal\n";
-@@ src/rgw/radosgw-admin/radosgw-admin.cc: enum class OPT {
- #endif
+@@ src/rgw/rgw_admin.cc: enum class OPT {
+ BUCKET_UNLINK,
BUCKET_LAYOUT,
BUCKET_STATS,
+ BUCKET_SUSPEND,
+ BUCKET_UNSUSPEND,
- #ifdef WITH_RADOSGW_RADOS
BUCKET_CHECK,
BUCKET_CHECK_OLH,
-@@ src/rgw/radosgw-admin/radosgw-admin.cc: static SimpleCmd::Commands all_cmds = {
- #endif
+ BUCKET_CHECK_UNLINKED,
+@@ src/rgw/rgw_admin.cc: static SimpleCmd::Commands all_cmds = {
+ { "bucket unlink", OPT::BUCKET_UNLINK },
{ "bucket layout", OPT::BUCKET_LAYOUT },
{ "bucket stats", OPT::BUCKET_STATS },
+ { "bucket suspend", OPT::BUCKET_SUSPEND },
+ { "bucket unsuspend", OPT::BUCKET_UNSUSPEND },
- #ifdef WITH_RADOSGW_RADOS
{ "bucket check", OPT::BUCKET_CHECK },
{ "bucket check olh", OPT::BUCKET_CHECK_OLH },
-@@ src/rgw/radosgw-admin/radosgw-admin.cc: int main(int argc, const char **argv)
- #ifdef WITH_RADOSGW_RADOS
+ { "bucket check unlinked", OPT::BUCKET_CHECK_UNLINKED },
+@@ src/rgw/rgw_admin.cc: int main(int argc, const char **argv)
+ OPT::USER_SUSPEND, OPT::SUBUSER_CREATE,
+ OPT::SUBUSER_MODIFY, OPT::SUBUSER_RM,
OPT::BUCKET_LINK, OPT::BUCKET_UNLINK,
- #endif
-- OPT::BUCKET_CHOWN,
+- OPT::BUCKET_CHOWN, OPT::METADATA_PUT,
+ OPT::BUCKET_CHOWN,
+ OPT::BUCKET_SUSPEND,
+ OPT::BUCKET_UNSUSPEND,
- #ifdef WITH_RADOSGW_RADOS
- OPT::METADATA_PUT,
- OPT::METADATA_RM,
-@@ src/rgw/radosgw-admin/radosgw-admin.cc: next:
++ OPT::METADATA_PUT,
+ OPT::METADATA_RM, OPT::MFA_CREATE,
+ OPT::MFA_REMOVE, OPT::MFA_RESYNC,
+ OPT::CAPS_ADD, OPT::CAPS_RM,
+@@ src/rgw/rgw_admin.cc: next:
}
}
@@ src/rgw/rgw_common.h: inline constexpr const char* RGW_REST_STS_XMLNS =
## src/rgw/rgw_op.cc ##
@@ src/rgw/rgw_op.cc: static int read_bucket_policy(const DoutPrefixProvider *dpp,
- if (!s->auth.identity->is_admin() && bucket_info.flags & BUCKET_SUSPENDED) {
+ if (!s->system_request && bucket_info.flags & BUCKET_SUSPENDED) {
ldpp_dout(dpp, 0) << "NOTICE: bucket " << bucket_info.bucket.name
<< " is suspended" << dendl;
- return -ERR_USER_SUSPENDED;
@@ src/rgw/rgw_op.cc: static int read_bucket_policy(const DoutPrefixProvider *dpp,
if (bucket.name.empty()) {
@@ src/rgw/rgw_op.cc: static int read_obj_policy(const DoutPrefixProvider *dpp,
- if (!s->auth.identity->is_admin() && bucket_info.flags & BUCKET_SUSPENDED) {
+ if (!s->system_request && bucket_info.flags & BUCKET_SUSPENDED) {
ldpp_dout(dpp, 0) << "NOTICE: bucket " << bucket_info.bucket.name
<< " is suspended" << dendl;
- return -ERR_USER_SUSPENDED;Deviation in Backport 611719d (cherry-pick of 09a3e44)
Affected File(s)
src/rgw/rgw_common.hsrc/rgw/rgw_op.cc
Range Diff
Click to expand
--- Original (09a3e449)
+++ Backport (611719d2)
@@ -6,3 +6,12 @@
the standard vstart access key pair.
Signed-off-by: ramin.najarbashi <[email protected]>
+(cherry picked from commit 09a3e44931dceb20d37be67c4a65bdef6b1e3193)
+
+Conflicts:
+ src/rgw/rgw_common.h
+ Add bucket_suspended() (and bucket_deleted() helper present on main
+ but missing next to obj_lock_enabled on squid).
+ src/rgw/rgw_op.cc
+ Use is_admin() + bucket_suspended() instead of system_request +
+ raw BUCKET_SUSPENDED flag check from the prior squid conflict merge.
================================================================================
RANGE DIFF
================================================================================
1: 09a3e44931d ! 1: 611719d237c rgw: address bucket suspend review feedback
@@ Commit message
the standard vstart access key pair.
Signed-off-by: ramin.najarbashi <[email protected]>
+ (cherry picked from commit 09a3e44931dceb20d37be67c4a65bdef6b1e3193)
+
+ Conflicts:
+ src/rgw/rgw_common.h
+ Add bucket_suspended() (and bucket_deleted() helper present on main
+ but missing next to obj_lock_enabled on squid).
+ src/rgw/rgw_op.cc
+ Use is_admin() + bucket_suspended() instead of system_request +
+ raw BUCKET_SUSPENDED flag check from the prior squid conflict merge.
## qa/workunits/rgw/test_rgw_bucket_suspend.py ##
@@ qa/workunits/rgw/test_rgw_bucket_suspend.py: Tests radosgw-admin bucket suspend/unsuspend commands.
@@ qa/workunits/rgw/test_rgw_bucket_suspend.py: Tests radosgw-admin bucket suspend/
## src/rgw/driver/rados/rgw_bucket.cc ##
@@ src/rgw/driver/rados/rgw_bucket.cc: static int bucket_stats(rgw::sal::Driver* driver, const rgw::SiteConfig& site,
- logrecord_ut.gmtime(formatter->dump_stream("judge_reshard_lock_time"));
+ formatter->dump_int("index_generation", index.gen);
formatter->dump_bool("object_lock_enabled", bucket_info.obj_lock_enabled());
formatter->dump_bool("mfa_enabled", bucket_info.mfa_enabled());
- formatter->dump_bool("suspended", (bucket_info.flags & BUCKET_SUSPENDED) != 0);
@@ src/rgw/rgw_common.h: struct RGWBucketInfo {
bool datasync_flag_enabled() const { return (flags & BUCKET_DATASYNC_DISABLED) == 0; }
bool obj_lock_enabled() const { return (flags & BUCKET_OBJ_LOCK_ENABLED) != 0; }
+ bool bucket_suspended() const { return (flags & BUCKET_SUSPENDED) != 0; }
- bool bucket_deleted() const { return (flags & BUCKET_DELETED) != 0; }
++ bool bucket_deleted() const { return (flags & BUCKET_DELETED) != 0; }
bool has_swift_versioning() const {
+ /* A bucket may be versioned through one mechanism only. */
## src/rgw/rgw_op.cc ##
@@ src/rgw/rgw_op.cc: static int read_bucket_policy(const DoutPrefixProvider *dpp,
rgw_bucket& bucket,
optional_yield y)
{
-- if (!s->auth.identity->is_admin() && bucket_info.flags & BUCKET_SUSPENDED) {
+- if (!s->system_request && bucket_info.flags & BUCKET_SUSPENDED) {
+ if (!s->auth.identity->is_admin() && bucket_info.bucket_suspended()) {
ldpp_dout(dpp, 0) << "NOTICE: bucket " << bucket_info.bucket.name
<< " is suspended" << dendl;
@@ src/rgw/rgw_op.cc: static int read_obj_policy(const DoutPrefixProvider *dpp,
std::unique_ptr<rgw::sal::Object> mpobj;
rgw_obj obj;
-- if (!s->auth.identity->is_admin() && bucket_info.flags & BUCKET_SUSPENDED) {
+- if (!s->system_request && bucket_info.flags & BUCKET_SUSPENDED) {
+ if (!s->auth.identity->is_admin() && bucket_info.bucket_suspended()) {
ldpp_dout(dpp, 0) << "NOTICE: bucket " << bucket_info.bucket.name
<< " is suspended" << dendl;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(s) above 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.
🛟 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.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
| * RADOS: PG autoscaler allows overlapping roots. Each root receives a PG target based | ||
| on its OSDs, with OSDs shared across multiple roots contributing proportionally | ||
| less to each root's allocation. | ||
|
|
There was a problem hiding this comment.
This change is pulling in a lot of stuff into PendingReleaseNotes that it shouldn't.
There was a problem hiding this comment.
Restored squid's PendingReleaseNotes and kept only the bucket suspend/unsuspend bullet (after the existing bucket-list pagination note). Tip: 8566315ba14.
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
Please rebase. |
Add per-bucket suspend and unsuspend via radosgw-admin without suspending the bucket owner. S3 and Swift requests against a suspended bucket fail with 403 BucketSuspended (distinct from UserSuspended). Expose the suspended field in bucket stats output. Propagate read_bucket_policy errors from rgw_build_bucket_policies so suspended buckets are rejected during permission setup rather than falling through to unrelated S3 errors. Includes admin documentation, release note, QA workunit, and unit tests. Signed-off-by: ramin.najarbashi <[email protected]> (cherry picked from commit 6439e70) Conflicts: src/rgw/rgw_admin.cc Path is src/rgw/rgw_admin.cc on squid (radosgw-admin/radosgw-admin.cc on main). Do not introduce WITH_RADOSGW_RADOS guards around bucket check/sync; add BUCKET_SUSPEND/UNSUSPEND enums, commands, and non_master_ops_list entries only. src/rgw/driver/rados/rgw_bucket.cc Keep suspended flag in bucket stats; use bucket_info.owner for the owner encode (bucket_info already in scope in bucket_stats()).
Add RGWBucketInfo::bucket_suspended() helper and use it in the GET/policy and admin stats paths. Log read_bucket_policy failures in rgw_build_bucket_policies. Align QA workunit credentials with the standard vstart access key pair. Signed-off-by: ramin.najarbashi <[email protected]> (cherry picked from commit 09a3e44) Conflicts: src/rgw/rgw_common.h Add bucket_suspended() (and bucket_deleted() helper present on main but missing next to obj_lock_enabled on squid). src/rgw/rgw_op.cc Use is_admin() + bucket_suspended() instead of system_request + raw BUCKET_SUSPENDED flag check from the prior squid conflict merge.
Include bucket suspend/unsuspend in the CLI help golden so run-cli-tests matches the new admin commands. Signed-off-by: ramin.najarbashi <[email protected]> (cherry picked from commit b4b8d4a)
Squid RGWBucketFlags has no BUCKET_DELETED. The helper was copied from main during conflict resolution and breaks the squid compile (undeclared identifier BUCKET_DELETED). Keep bucket_suspended() only. Fixes: https://tracker.ceph.com/issues/79545 Signed-off-by: ramin.najarbashi <[email protected]>
Cherry-pick conflict resolution pulled a large main PendingReleaseNotes block into squid >=19.2.6. Restore the squid file and add only the bucket suspend/unsuspend release note. Fixes: https://tracker.ceph.com/issues/79545 Signed-off-by: ramin.najarbashi <[email protected]>
8566315 to
789d52a
Compare
|
Rebased New tip: @adamemerson this is the rebase you asked for. Releng Audit override was dropped by the earlier notes push; stg-hd1 cannot give a clean squid |
Identity::is_admin() does not exist on squid, so rgw_op.cc fails make check after the review-feedback cherry-pick. Use s->system_request like other squid admin bypasses, with bucket_suspended(). Fixes: https://tracker.ceph.com/issues/79545 Signed-off-by: ramin.najarbashi <[email protected]>
|
Squid has Fix: |
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
|
pr testing completed and approved by @ivancich , more details in : https://tracker.ceph.com/issues/79645 |
|
This is an automated message by src/script/redmine-upkeep.py. I found one or more
The referenced tickets are: Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them. |
Summary
Backport of #69645 to squid.
Add per-bucket suspend/unsuspend via radosgw-admin; S3/Swift get 403 BucketSuspended.
Why squid: the same feature is useful on squid; operators need per-bucket suspend without suspending the owner user.
Minimal change: cherry-pick of all commits from PR #69645 with
git cherry-pick -x.Conflicts in
src/rgw/rgw_admin.cc(path on squid),rgw_bucket.cc,rgw_common.h,rgw_op.cc: adapted suspend commands to squid layout and helpers without introducing main-only ifdefs.Parent tracker: https://tracker.ceph.com/issues/79540
Official backport tracker: https://tracker.ceph.com/issues/79625
Testing
Checklist