]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 months agoosd/scrub: check all(*) conditions in restrictions_on_scrubbing() 63104/head
Ronen Friedman [Fri, 2 May 2025 08:03:15 +0000 (03:03 -0500)]
osd/scrub: check all(*) conditions in restrictions_on_scrubbing()

Modified OsdScrub::restrictions_on_scrubbing() to check all(*)
conditions, instead of stopping at the first one that is true.
The "new" (since Tentacle) scrub-type-to-conditions mapping is no
longer a simple one (is not "monotonic" in the sense of restrictions
always being removed as the scrub type is more important),
and the caller may want to know them all.

(*) The somewhat costly check for the random backoff is still only
    performed if the OSD is not already running too many scrubs.

Fixes: https://tracker.ceph.com/issues/71169
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 5a3a4f73476580b44442a30c8404a62b5055c96d)

3 months agoMerge pull request #63043 from cbodley/wip-71115-tentacle
Casey Bodley [Thu, 1 May 2025 19:57:36 +0000 (15:57 -0400)]
Merge pull request #63043 from cbodley/wip-71115-tentacle

tentacle: rgw/sts: correcting authentication in case s3 ops are directed to a primary from secondary after assumerole.

Reviewed-by: Seena Fallah <seenafallah@gmail.com>
3 months agoMerge pull request #63075 from cbodley/wip-71151-tentacle
Casey Bodley [Thu, 1 May 2025 19:55:03 +0000 (15:55 -0400)]
Merge pull request #63075 from cbodley/wip-71151-tentacle

tentacle: rgw/lc: stop using merge_and_store_attrs in remove_bucket_config

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
3 months agoMerge pull request #63051 from pritha-srivastava/wip-71108-tentacle
Casey Bodley [Thu, 1 May 2025 19:54:37 +0000 (15:54 -0400)]
Merge pull request #63051 from pritha-srivastava/wip-71108-tentacle

tentacle: rgw/sts: Implementation of validating JWT using modulus and exponent

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 months agorgw/lc: stop using merge_and_store_attrs in remove_bucket_config 63075/head
Casey Bodley [Fri, 25 Apr 2025 17:38:50 +0000 (13:38 -0400)]
rgw/lc: stop using merge_and_store_attrs in remove_bucket_config

merge_and_store_attrs() is no longer able to remove xattrs. change the
sal::Bucket's attrs manually and call put_info() to write them back

Fixes: https://tracker.ceph.com/issues/71083
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit f3cc52124c650d32be2adf3cf540167142423c42)

3 months agoMerge pull request #63070 from sseshasa/wip-71143-tentacle
Anthony D'Atri [Wed, 30 Apr 2025 13:28:26 +0000 (09:28 -0400)]
Merge pull request #63070 from sseshasa/wip-71143-tentacle

tentacle: doc/rados: Update mClock doc on steps to override OSD IOPS capacity config

3 months agodoc/rados: Update mClock doc on steps to override OSD IOPS capacity config 63070/head
Sridhar Seshasayee [Tue, 15 Apr 2025 13:01:50 +0000 (18:31 +0530)]
doc/rados: Update mClock doc on steps to override OSD IOPS capacity config

Describe the steps involved to
 - Specify a global value for osd_mclock_max_capacity_iops_{ssd,hdd}, and
 - Override existing individually scoped values for OSDs determined during
   start-up for osd_mclock_max_capacity_iops_{ssd,hdd}.

The above is to help with the following:
 - Steps to override existing setting with a global value.
 - reduce the number of entries in the mon store and instead use a single
   global specification for all OSDs in the cluster in case the underlying
   hardware is the same for all OSDs.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
Fixes: https://tracker.ceph.com/issues/70774
(cherry picked from commit 899da82ae2e857f2a769c08d6623e6da7678d16b)

3 months agoMerge pull request #63013 from guits/wip-71109-tentacle
Guillaume Abrioux [Wed, 30 Apr 2025 07:23:15 +0000 (09:23 +0200)]
Merge pull request #63013 from guits/wip-71109-tentacle

tentacle: ceph-volume: Fix splitting with too many parts

3 months agorgw/sts: Use client_id for assumerolewithwebidentityresponse 63051/head
Pritha Srivastava [Mon, 17 Feb 2025 08:11:15 +0000 (13:41 +0530)]
rgw/sts: Use client_id for assumerolewithwebidentityresponse
if aud is not present in JWT.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit b5bbeb7ea3a65bfed368f834cc6c11fa23ee24e1)

3 months agorgw/sts: adding validation of jwks_uri cert according
Pritha Srivastava [Thu, 13 Feb 2025 11:18:43 +0000 (16:48 +0530)]
rgw/sts: adding validation of jwks_uri cert according
to https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc_verify-thumbprint.html
for n&e which can be later used for all key types
(x5c, n&e).

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit d970f62e3e264644ea474ad4ee513caac977268f)

3 months agorgw/sts: fix to pick jwk which is of type
Pritha Srivastava [Wed, 12 Feb 2025 08:06:20 +0000 (13:36 +0530)]
rgw/sts: fix to pick jwk which is of type
'sig' for signature validation of the token.

Fixes: https://tracker.ceph.com/issues/54562
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 4c08b48a655f549c0375b2ce728737647ec5cb31)

3 months agorgw/sts: adding code for JWT signature validation
Pritha Srivastava [Thu, 26 Dec 2024 08:56:30 +0000 (14:26 +0530)]
rgw/sts: adding code for JWT signature validation
using modulus and exponent for RSA group of algorithms.

A couple of issues and a fix have been suggested by
Pupu Toivonen (pupu.toivonen@csc.fi) in signature calculation
using modulus and exponent.

Fixes: https://tracker.ceph.com/issues/51018
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit b368cab8064925674c008c0e8c39d17fbf964ac6)

3 months agoMerge pull request #63036 from afreen23/wip-71123-tentacle
afreen23 [Tue, 29 Apr 2025 23:56:38 +0000 (05:26 +0530)]
Merge pull request #63036 from afreen23/wip-71123-tentacle

tentacle: mgr/dashboard: Update translations

Reviewed-by: Nizamudeen A <nia@redhat.com>
3 months agoMerge pull request #63037 from ronen-fr/wip-rf-63010-tentacle
Ronen Friedman [Tue, 29 Apr 2025 16:33:44 +0000 (19:33 +0300)]
Merge pull request #63037 from ronen-fr/wip-rf-63010-tentacle

tentacle: qa/standalone/scrub: fix expected outputs in repair tests

Reviewed-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agorgw: utilize is_impersonating for forwarded sts requests 63043/head
Seena Fallah [Mon, 28 Apr 2025 17:44:10 +0000 (19:44 +0200)]
rgw: utilize is_impersonating for forwarded sts requests

With the introduction of is_impersonating in SysReqApplier,
RoleApplier can now use the same mechanism to mark when a request
has been forwarded by a system user on behalf of another role (e.g.,
through STS) to mark it as a system request (s->system_request).

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 995dc6284ea32fb2c87fb8e1cf2001b0fe9f5f45)

3 months agorgw: dont rate limit forwarded requests
Seena Fallah [Wed, 23 Apr 2025 22:22:23 +0000 (00:22 +0200)]
rgw: dont rate limit forwarded requests

rely on s->system_request to skip rate limiting on forwarded requests
as well as normal system user requests.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 004ccc7a987c98b7eb87d698b8091ae95665fe7c)

3 months agorgw: use is_admin() for permission checks
Seena Fallah [Wed, 23 Apr 2025 22:22:08 +0000 (00:22 +0200)]
rgw: use is_admin() for permission checks

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit cc033cb16ff2971d215a92fab3038b185251cc22)

3 months agorgw: override perms for admin on data sync
Seena Fallah [Fri, 18 Apr 2025 14:42:24 +0000 (16:42 +0200)]
rgw: override perms for admin on data sync

If pipe is in user mode and the user is admin, don't check for perms
and let it go.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 97b4b608fba21bf2bac69ebcffca114484049680)

3 months agorgw: change is_admin_of() to is_admin()
Seena Fallah [Thu, 17 Apr 2025 22:09:12 +0000 (00:09 +0200)]
rgw: change is_admin_of() to is_admin()

As admin propery of a user is something global and nothing related
to any other owner, we don't need any comparision.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 1a253ea065a5de9636b769b41cc46a4fbc18c3f8)

3 months agorgw: make rgw_sync_pipe_params::user optional
Seena Fallah [Tue, 1 Apr 2025 15:28:10 +0000 (17:28 +0200)]
rgw: make rgw_sync_pipe_params::user optional

In rgw_sync_pipe_params, the mode can be either system or user.
When in system mode, no user is involved, but the current
implementation holds an empty rgw_user, which can cause confusion
in pipe_rules::find_basic_info_without_tags().

With this change, rgw_user is now optional, ensuring that when no
user is involved, it is explicitly nullopt rather than an empty object.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit c8aca216f7d186e4e8391a284d14948afd414957)

3 months agoqa/rgw: add perm check test for copy obj between zonegroups
Seena Fallah [Fri, 28 Mar 2025 23:00:02 +0000 (00:00 +0100)]
qa/rgw: add perm check test for copy obj between zonegroups

Make sure perms are evaluated properly for the source object.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 9523e15fb74e09718f5cc9c0bddf2492fc8d8128)

3 months agodoc: add release note for new policy actions on replication
Seena Fallah [Mon, 24 Feb 2025 15:47:50 +0000 (16:47 +0100)]
doc: add release note for new policy actions on replication

Fixes: https://tracker.ceph.com/issues/70093
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 8c15d4674f567c7b35d5aac0a9ac4e62306f7b13)

3 months agorgw: remote copy obj pass rgwx-perm-check-uid for perm evaluation
Seena Fallah [Fri, 28 Mar 2025 20:55:20 +0000 (21:55 +0100)]
rgw: remote copy obj pass rgwx-perm-check-uid for perm evaluation

When copying object from remote source (bucket from another zonegroup)
the perms of the source is not evaluated resulting in reading from
unauthorized buckets.
passing `rgwx-perm-check-uid` will let the source zone evaluates the
perm and close this bug.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3c83520d3338e85e2219e34e77d1149033533a71)

3 months agorgw: RGWRadosPutObj evals source bucket perm for backward compatibility
Seena Fallah [Fri, 28 Mar 2025 20:52:47 +0000 (21:52 +0100)]
rgw: RGWRadosPutObj evals source bucket perm for backward compatibility

As of a3f40b4 we no longer evaluate perms locally for source bucket,
this could cause broken permission evaluation dusring upgrade as one
zone is not respecting the perm evaluation based on the `rgwx-perm-check-uid`
arg.

This can be dropped in T+2 release.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 926ed16c27c0625427ae04d7298a5e47c1aba22b)

3 months agorgw: make verify_bucket_permission functions const
Seena Fallah [Thu, 24 Apr 2025 19:02:08 +0000 (21:02 +0200)]
rgw: make verify_bucket_permission functions const

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit b0200c627b1c8cd8ac236119bd6db7b18abc89dc)

3 months agorgw: give hint via header for perm evaluation in GetObj
Seena Fallah [Fri, 28 Mar 2025 20:48:34 +0000 (21:48 +0100)]
rgw: give hint via header for perm evaluation in GetObj

Return `Rgwx-Perm-Checked` header as a hint for the destination zone
to know whether the perms where considered or not.
This is just a backward compatibility for upgrade and can be dropped
in T+2 release.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 84a8d1ba0ed4a9a1abc80c1b839f95aaeef5f27b)

3 months agorgw: rest client callback when all headers are passed
Seena Fallah [Fri, 28 Mar 2025 20:36:38 +0000 (21:36 +0100)]
rgw: rest client callback when all headers are passed

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 0a93e74a0476e80c51ce5ec23b2a5ca1b28a3996)

3 months agorgw: pass rgwx-perm-check-uid for multisite fetch object
Seena Fallah [Wed, 5 Mar 2025 19:52:48 +0000 (20:52 +0100)]
rgw: pass rgwx-perm-check-uid for multisite fetch object

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 86aa6d36e24b78604fd15ac52452ab2cfcc539a9)

3 months agorgw: GetObject(Version) not allowed to replicate sse-kms objects
Seena Fallah [Fri, 28 Feb 2025 16:07:32 +0000 (17:07 +0100)]
rgw: GetObject(Version) not allowed to replicate sse-kms objects

To replicate objects encrypted via sse-kms objects,
s3:GetObjectVersionForReplication is required.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3024b70ad56a7733527be7bae53d0a19a368c45c)

3 months agorgw: take account GetObject(Version)Tagging when replicating
Seena Fallah [Thu, 27 Feb 2025 10:53:44 +0000 (11:53 +0100)]
rgw: take account GetObject(Version)Tagging when replicating

In case the uid has no permission to read tagging, the tags should
not be replicated.
Ref. https://docs.aws.amazon.com/AmazonS3/latest/userguide/setting-repl-config-perm-overview.html

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit ae8d7a97714faabe90d1e1660aacabe27e080e42)

3 months agoqa/rgw: add test for source object perm check in multisite
Seena Fallah [Mon, 24 Feb 2025 22:56:13 +0000 (23:56 +0100)]
qa/rgw: add test for source object perm check in multisite

Check whether the policies are honored on source object in source
zone when replicating.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit e4f44851b3c0b46528dea6104cf32d6898c711d4)

3 months agorgw: replication require lock perm if enabled
Seena Fallah [Fri, 28 Feb 2025 15:51:07 +0000 (16:51 +0100)]
rgw: replication require lock perm if enabled

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 4fde9dddb8c2732ecf95fa1d508ee7c91fc53e74)

3 months agorgw: check source object replication by replication actions
Seena Fallah [Mon, 24 Feb 2025 22:41:13 +0000 (23:41 +0100)]
rgw: check source object replication by replication actions

Check for permissions of `s3:GetObjectVersionForReplication` in
addition to `s3:GetObject` and `s3:GetObjectVersion` when fetching
the object for multisite.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 89d92dee29a15c5d1be71859be9a2b485236ef4b)

3 months agorgw: export action_bit_string through header file
Seena Fallah [Sat, 1 Mar 2025 00:22:07 +0000 (01:22 +0100)]
rgw: export action_bit_string through header file

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit f2ba4db7b2e57ac0a7166a11251c662c88701805)

3 months agorgw: only allow system override if identity is not impersonating
Seena Fallah [Mon, 24 Feb 2025 22:33:45 +0000 (23:33 +0100)]
rgw: only allow system override if identity is not impersonating

Since multisite now delegates permission checks for source objects
to the source zone (a3f40b4), we need to avoid allowing system-level
overrides when the request is impersonating another identity.

SysReqApplier should only grant override permission if the request
is truly system-authenticated and not acting on behalf of another
user or role (i.e., no rgwx-perm-check-uid or rgwx-perm-check-role
in the request).

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 2a0cb65076fa63439a5d4b7c8876fb551d7ab8ec)

3 months agorgw: SysReqApplier overrides is_admin_of based on impersonation
Seena Fallah [Thu, 17 Apr 2025 12:55:00 +0000 (14:55 +0200)]
rgw: SysReqApplier overrides is_admin_of based on impersonation

SysReqApplier now returns true for is_admin_of() when the requester
was a system user and was not impersonating any user/role using
rgwx-perm-check-uid or rgwx-perm-check-role.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 0e650ea276669c2c6bb236f27db07910754cc220)

3 months agoqa/rgw: add test for new replication actions
Seena Fallah [Fri, 21 Feb 2025 00:34:27 +0000 (01:34 +0100)]
qa/rgw: add test for new replication actions

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3f2514f7cf2941350539da86756435808db212f9)

3 months agorgw: support s3ReplicateTags perm on destination bucket for replication
Seena Fallah [Thu, 20 Feb 2025 23:57:25 +0000 (00:57 +0100)]
rgw: support s3ReplicateTags perm on destination bucket for replication

Check for tag replication permission on destination bucket, so if
there was an explicit deny, donot include tags in the replicated
object.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3fb1671520d62ce707ebc15e8f7874540b7e2aaa)

3 months agorgw: check for s3ReplicateObject perm on destination bucket for replication
Seena Fallah [Thu, 20 Feb 2025 23:56:28 +0000 (00:56 +0100)]
rgw: check for s3ReplicateObject perm on destination bucket for replication

Instead of s3:PutObject rely on s3:s3ReplicateObject permission to
check whether the user can replicate to the destination bucket.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 97ee3287fb3b062eda0d07f07a219eafb04a5a6a)

3 months agorgw: verify perm on delete replication
Seena Fallah [Thu, 20 Feb 2025 21:15:31 +0000 (22:15 +0100)]
rgw: verify perm on delete replication

Check for s3:ReplicateDelete for replicating object deletes and
delete markers when pipe is set to user mode.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit d7fe7915b452c5639b415d6457e272fe0d235ef5)

3 months agorgw: move RGWUserPermHandler to header
Seena Fallah [Sat, 22 Feb 2025 23:50:16 +0000 (00:50 +0100)]
rgw: move RGWUserPermHandler to header

So it can be used by others.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 857f7bd8e6be11d1d3453e0dc32dae0e3945f8f5)

3 months agorgw: weaning off RGWUserPermHandler from RGWDataSyncEnv
Seena Fallah [Thu, 20 Feb 2025 20:38:50 +0000 (21:38 +0100)]
rgw: weaning off RGWUserPermHandler from RGWDataSyncEnv

So it can be called by RGWAsyncRadosRequest classes not holding
sync_env.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 77c9304102e8650ba1d3265ef63bfa2d0a6756d1)

3 months agorgw: send bucket sync structs to bucket_sync.h
Seena Fallah [Sat, 22 Feb 2025 23:47:55 +0000 (00:47 +0100)]
rgw: send bucket sync structs to bucket_sync.h

So it can be imported by headers like rgw_cr_rados.h that already
has dependency to rgw_data_sync.h.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit e7422956988394d334043123bc87460055a9db13)

3 months agorgw: drop unused params passed to RGWStatRemoteObjCR by RGWObjFetchCR
Seena Fallah [Wed, 19 Feb 2025 22:51:11 +0000 (23:51 +0100)]
rgw: drop unused params passed to RGWStatRemoteObjCR by RGWObjFetchCR

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit bb337be08467d649f17712558c5414bd64cb3d09)

3 months agorgw/qa: added test case to assume a role after role creation
Pritha Srivastava [Mon, 1 Apr 2024 15:57:06 +0000 (21:27 +0530)]
rgw/qa: added test case to assume a role after role creation
syncs, and then creating a bucket on both primary and secondary.
The test name is test_assume_role_after_sync.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 855db87f4addec8576708d56b6f6d6554caf8b37)

3 months agorgw/sts: by-passing authentication using temp creds
Pritha Srivastava [Thu, 28 Mar 2024 11:16:20 +0000 (16:46 +0530)]
rgw/sts: by-passing authentication using temp creds
in case the request is forwarded from secondary in
a multi-site setup. authenticating with the system
user creds of which are used to sign the request.
Permissions are still derived from the role.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 63bc73802ddb0ef74d66d468293e489e4d5fa58f)

3 months agoqa/standalone/scrub: fix expected output in snaps repair tests 63037/head
Ronen Friedman [Tue, 29 Apr 2025 03:35:13 +0000 (22:35 -0500)]
qa/standalone/scrub: fix expected output in snaps repair tests

Specifically - TEST_corrupt_snapset_scrub_rep in osd-scrub-repair.sh.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 4816832555d9f3034d2cd4c399e74c262d098e22)

3 months agoqa/standalone/scrub: fix expected output in replicated repair tests
Ronen Friedman [Mon, 28 Apr 2025 16:34:47 +0000 (11:34 -0500)]
qa/standalone/scrub: fix expected output in replicated repair tests

Specifically - TEST_corrupt_scrub_replicated in osd-scrub-repair.sh.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 139967011d98d0cc75584750e19192573c8421a3)

3 months agoqa/standalone/scrub: fix expected output in EC repair tests
Ronen Friedman [Mon, 28 Apr 2025 13:14:54 +0000 (08:14 -0500)]
qa/standalone/scrub: fix expected output in EC repair tests

Specifically - TEST_corrupt_scrub_erasure_* in osd-scrub-repair.sh.
This is required following recent changes to the EC code.

Fixes: https://tracker.ceph.com/issues/70851
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 3aceb1fd44876877a6ddca7cd14eb3c2f8ed8790)

3 months agomgr/dashboard: Update translations 63036/head
Afreen Misbah [Fri, 25 Apr 2025 16:29:23 +0000 (21:59 +0530)]
mgr/dashboard: Update translations

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

Signed-off-by: Afreen Misbah <afreen@ibm.com>
(cherry picked from commit c8c6bee3cf4d28e80eb05b7ce65a304e0fe62018)

3 months agoceph-volume: Fix splitting with too many parts 63013/head
Janne Heß [Mon, 28 Apr 2025 09:04:25 +0000 (11:04 +0200)]
ceph-volume: Fix splitting with too many parts

The data can be anything and also contain a `=`, causing the line to
fail with `Too many values to unpack`. In my case, it failed with
`ID_FS_LABEL=pvc_name=rook-ceph-lvm-data-44f2gc`.

Regression was introduced here: https://github.com/ceph/ceph/pull/60006

Fixes: https://tracker.ceph.com/issues/71101
Signed-off-by: Janne Heß <janne@hess.ooo>
(cherry picked from commit 315fb96243549afba316c60a8d74c24c9417c18e)

3 months agoMerge pull request #62998 from ronen-fr/wip-rf-62996-tentacle
Ronen Friedman [Mon, 28 Apr 2025 16:09:17 +0000 (19:09 +0300)]
Merge pull request #62998 from ronen-fr/wip-rf-62996-tentacle

tentacle: osd/scrub: always round up reported scrub duration

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
3 months agoosd/scrub: always round up reported scrub duration 62998/head
Ronen Friedman [Sat, 26 Apr 2025 08:21:29 +0000 (03:21 -0500)]
osd/scrub: always round up reported scrub duration

as expected by some tests, and clearer for the user.

Fixes: https://tracker.ceph.com/issues/68833
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit b7fca3676eec20371e0735650a91add065f8faa0)

3 months agoMerge PR #62901 into main
Patrick Donnelly [Fri, 25 Apr 2025 19:02:03 +0000 (15:02 -0400)]
Merge PR #62901 into main

* refs/pull/62901/head:
qa/workunits/fs/misc: remove data pool cleanup

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
3 months agoMerge PR #62833 into main
Patrick Donnelly [Fri, 25 Apr 2025 19:00:39 +0000 (15:00 -0400)]
Merge PR #62833 into main

* refs/pull/62833/head:
qa: test charmap changes with dir and snaps
mds: check for snapshots on parent snaprealms
mds: use strict_strtobool for parsing bools
common: take string_view for strict_tobool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
3 months agoMerge pull request #62966 from bluikko/doc-toc-sectionlevels-radosgw
Anthony D'Atri [Fri, 25 Apr 2025 16:20:51 +0000 (12:20 -0400)]
Merge pull request #62966 from bluikko/doc-toc-sectionlevels-radosgw

doc/radosgw: Fix section header levels in multisite-sync-policy.rst

3 months agoMerge pull request #62023 from Kushal-deb/user-friendly_error_handling_for_invalid_os...
Adam King [Fri, 25 Apr 2025 15:11:31 +0000 (11:11 -0400)]
Merge pull request #62023 from Kushal-deb/user-friendly_error_handling_for_invalid_osd_device_paths

cephadm: Provide user friendly error message if osd device path is invalid

Reviewed-by: Adam King <adking@redhat.com>
3 months agoMerge pull request #62895 from cyx1231st/wip-seastore-omap-link-init
Yingxin Cheng [Fri, 25 Apr 2025 14:41:02 +0000 (22:41 +0800)]
Merge pull request #62895 from cyx1231st/wip-seastore-omap-link-init

crimson/os/seastore/omap_manager: simplify maybe_init from tolerating duplicated calls

Reviewed-by: Xuehan Xu <xuxuehan@qianxin.com>
3 months agoMerge pull request #62938 from cyx1231st/wip-seastore-cleanup-paddr-types
Yingxin Cheng [Fri, 25 Apr 2025 12:55:31 +0000 (20:55 +0800)]
Merge pull request #62938 from cyx1231st/wip-seastore-cleanup-paddr-types

crimson/os/seastore: improve checks to the paddr types

Reviewed-by: Xuehan Xu <xuxuehan@qianxin.com>
Reviewed-by: Myoungwon Oh <myoungwon.oh@samsung.com>
3 months agoMerge pull request #62838 from cyx1231st/wip-seastore-simplify-cache-access-metrics
Yingxin Cheng [Fri, 25 Apr 2025 12:53:55 +0000 (20:53 +0800)]
Merge pull request #62838 from cyx1231st/wip-seastore-simplify-cache-access-metrics

crimson/os/seastore: simplify cache access metrics

Reviewed-by: Xuehan Xu <xuxuehan@qianxin.com>
3 months agoMerge pull request #56336 from pritha-srivastava/wip-rgw-d4n-next
Matt Benjamin [Fri, 25 Apr 2025 11:53:30 +0000 (07:53 -0400)]
Merge pull request #56336 from pritha-srivastava/wip-rgw-d4n-next

Wip rgw d4n next

3 months agoMerge pull request #56975 from aclamk/wip-aclamk-bs-compression-recompression
Adam Kupczyk [Fri, 25 Apr 2025 10:18:34 +0000 (12:18 +0200)]
Merge pull request #56975 from aclamk/wip-aclamk-bs-compression-recompression

os/bluestore: Recompression, part 4. Scanner, Estimator and core recompression.

3 months agodoc/radosgw: Fix section header levels in multisite-sync-policy.rst 62966/head
Ville Ojamo [Fri, 25 Apr 2025 07:16:52 +0000 (14:16 +0700)]
doc/radosgw: Fix section header levels in multisite-sync-policy.rst

The section header levels are reversed so the hierarchy in the TOC is
incorrect. Switch around the section header levels to make the TOC
hierarchy correct, for example individual examples are children of the
"Examples" section.

Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
3 months agoMerge pull request #59673 from shraddhaag/availability-score-feature
Shraddha Agrawal [Fri, 25 Apr 2025 05:56:15 +0000 (11:26 +0530)]
Merge pull request #59673 from shraddhaag/availability-score-feature

monitor: add availability score feature

3 months agoMerge pull request #62937 from gbregman/main
Gil Bregman [Fri, 25 Apr 2025 05:34:07 +0000 (08:34 +0300)]
Merge pull request #62937 from gbregman/main

mgr/cephadm/nvmeof: Allow setting NVMEoF gateway huge pages count in the spec file

3 months agoMerge PR #62658 into main
Patrick Donnelly [Fri, 25 Apr 2025 02:41:14 +0000 (22:41 -0400)]
Merge PR #62658 into main

* refs/pull/62658/head:
libcephfs_proxy: Remove arithmetic on `void*`

Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@gmail.com>
3 months agocrimson/os/seastore/cache: init root as dirty 62938/head
Yingxin Cheng [Wed, 23 Apr 2025 14:05:35 +0000 (22:05 +0800)]
crimson/os/seastore/cache: init root as dirty

To simplify checks that root won't appear in lru.

Also, make sure root has a root paddr.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agocrimson/os/seastore: introduce strict paddr type checks in cache and transaction
Yingxin Cheng [Wed, 23 Apr 2025 09:30:24 +0000 (17:30 +0800)]
crimson/os/seastore: introduce strict paddr type checks in cache and transaction

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agocrimson/os/seastore/seastore_types: tolerate fake paddrs as absolute addresses
Yingxin Cheng [Wed, 23 Apr 2025 09:27:04 +0000 (17:27 +0800)]
crimson/os/seastore/seastore_types: tolerate fake paddrs as absolute addresses

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agocrimson/os/seastore: fake paddr is only possible with UT, wrap with UNIT_TESTS_BUILT
Yingxin Cheng [Wed, 23 Apr 2025 09:02:54 +0000 (17:02 +0800)]
crimson/os/seastore: fake paddr is only possible with UT, wrap with UNIT_TESTS_BUILT

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agocrimson/os/seastore/seastore_types: prefer paddr_t::is_absolute_*()
Yingxin Cheng [Wed, 23 Apr 2025 06:59:25 +0000 (14:59 +0800)]
crimson/os/seastore/seastore_types: prefer paddr_t::is_absolute_*()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agocrimson/os/seastore: more accurate checks to the paddr types
Yingxin Cheng [Wed, 23 Apr 2025 06:38:43 +0000 (14:38 +0800)]
crimson/os/seastore: more accurate checks to the paddr types

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agomgr/cephadm/nvmeof: Allow setting NVMEoF gateway huge pages count in the spec file 62937/head
Gil Bregman [Wed, 23 Apr 2025 20:55:24 +0000 (23:55 +0300)]
mgr/cephadm/nvmeof: Allow setting NVMEoF gateway huge pages count in the spec file
Fixes https://tracker.ceph.com/issues/71043

Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
3 months agoMerge pull request #62561 from rkachach/fix_issue_70359_v2
Adam King [Thu, 24 Apr 2025 18:40:28 +0000 (14:40 -0400)]
Merge pull request #62561 from rkachach/fix_issue_70359_v2

mgr/cephadm: harmonize mgmt-gateway and oauth2-proxy spec fields

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
3 months agoMerge pull request #62302 from thegreenbear/cephadm-sd-custom-containers
Adam King [Thu, 24 Apr 2025 18:34:21 +0000 (14:34 -0400)]
Merge pull request #62302 from thegreenbear/cephadm-sd-custom-containers

mgr/cephadm: enhanced service to allow discovery of custom containers

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Redouane Kachach <rkachach@redhat.com>
3 months agoMerge pull request #62936 from cbodley/wip-doc-rgw-getobjattrs
Casey Bodley [Thu, 24 Apr 2025 15:35:48 +0000 (11:35 -0400)]
Merge pull request #62936 from cbodley/wip-doc-rgw-getobjattrs

doc/rgw: release note for GetObjectAttributes

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 months agoMerge pull request #62845 from rhcs-dashboard/fix-path
Pedro Gonzalez Gomez [Thu, 24 Apr 2025 15:26:18 +0000 (17:26 +0200)]
Merge pull request #62845 from rhcs-dashboard/fix-path

mgr/dashboard: fix smb edit resources

Reviewed-by: Afreen Misbah <afreen@ibm.com>
3 months agoMerge pull request #62715 from cbodley/wip-qa-rgw-no-gc
Casey Bodley [Thu, 24 Apr 2025 14:59:33 +0000 (10:59 -0400)]
Merge pull request #62715 from cbodley/wip-qa-rgw-no-gc

qa/rgw: run verify tests with garbage collection disabled

Reviewed-by: Jane Zhu <jzhu116@bloomberg.net>
3 months agoMerge pull request #62921 from idryomov/wip-71026
Ilya Dryomov [Thu, 24 Apr 2025 14:36:46 +0000 (16:36 +0200)]
Merge pull request #62921 from idryomov/wip-71026

librbd: disallow "rbd trash mv" if image is in a group

Reviewed-by: Ramana Raja <rraja@redhat.com>
3 months agoqa/standalone/misc/availability.sh: add tests 59673/head
Shraddha Agrawal [Mon, 6 Jan 2025 07:12:11 +0000 (07:12 +0000)]
qa/standalone/misc/availability.sh: add tests

This commit adds a standalone test for verifying if
the availability score of a pool comes down when there
are unfound objects present.

Fixes: https://tracker.ceph.com/issues/67777
Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
3 months agosrc/mon/PGMap.cc: check unfound obejcts in `get_unavailable_pg_in_pool_map`
Shraddha Agrawal [Mon, 7 Oct 2024 06:16:34 +0000 (11:46 +0530)]
src/mon/PGMap.cc: check unfound obejcts in `get_unavailable_pg_in_pool_map`

If a pool has any PG with unfound objects, we should consider
it unavailable for the availability score. If a PG has unfound
objects, it will be recorded in PGMap.

In `get_unavailable_pg_in_map`, if a PG has unfound obejcts,
we add it to `pool_pg_unavailable_map`.

Fixes: https://tracker.ceph.com/issues/67777
Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
3 months agosrc/osd/PeeringState.cc: update last_unstale properly
Kamoltat [Tue, 21 Nov 2023 18:55:29 +0000 (18:55 +0000)]
src/osd/PeeringState.cc: update last_unstale properly

Problem:

When we update the `pg_stat` we don't
check whether the pg state is in `stale`.
Therefore, the attribute `last_unstale`
will always get updated even if the pg
state actually contains `stale`.

Solution:

Place a condition to only update
the attribute `last_unstale` when
we the pg truly doesn't have `stale`
in its state.

Fixes: https://tracker.ceph.com/issues/67777
Signed-off-by: Kamoltat <ksirivad@redhat.com>
3 months agosrc/mgr/OSDMonitor.cc Add command `ceph osd pool availability-status`
Kamoltat [Tue, 10 Oct 2023 15:15:35 +0000 (15:15 +0000)]
src/mgr/OSDMonitor.cc Add command `ceph osd pool availability-status`

```
ceph osd pool availability-status
```
outputs:

`POOL`
`UPTIME`
`DOWNTIME`
`NUMFAILURES`
`MTBF`
`MTTR`
`SCORE`
`AVAILABLE`

Fixes: https://tracker.ceph.com/issues/67777
Signed-off-by: Kamoltat <ksirivad@redhat.com>
3 months agosrc/mon/PGMap.cc: init pool_availability
Kamoltat [Thu, 26 Oct 2023 19:08:37 +0000 (19:08 +0000)]
src/mon/PGMap.cc: init pool_availability

Added PoolAvailability Struct

Modified PGMap.cc to include a k,v map:
`pool_availability`.

The key being the `poolid` and value
is `PoolAvailability`

Init the function:
`PGMap::get_unavailable_pg_in_pool_map()`
to identify and aggregate all the PGs we
mark as `unavailable` as well as the pool
that associates with the unavailable PG.

Also, included `pool_availability`
to `PGMapDigest::dump()`.

Fixes: https://tracker.ceph.com/issues/67777
Signed-off-by: Kamoltat <ksirivad@redhat.com>
3 months agoMerge pull request #62941 from MaxKellermann/mds_Locker__abort
Max Kellermann [Thu, 24 Apr 2025 09:12:12 +0000 (11:12 +0200)]
Merge pull request #62941 from MaxKellermann/mds_Locker__abort

mds/Locker: use ceph_abort_msg() instead of ceph_assert()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
3 months agoqa/suites/rados/bluestore: Add standalone tests for write_v2 56975/head
Adam Kupczyk [Tue, 22 Apr 2025 11:23:35 +0000 (11:23 +0000)]
qa/suites/rados/bluestore: Add standalone tests for write_v2

Standalone tests for ceph_test_objectstore require separate instances
for testing write_v2=true.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agoos/bluestore: Add "bluestore compression stats"
Adam Kupczyk [Thu, 13 Jun 2024 17:34:57 +0000 (17:34 +0000)]
os/bluestore: Add "bluestore compression stats"

Add new admin socket command to inspect Estimator stats per collection.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agoos/bluestore: Add admin socket commands to inspect onode metadata
Adam Kupczyk [Mon, 10 Jun 2024 16:03:24 +0000 (16:03 +0000)]
os/bluestore: Add admin socket commands to inspect onode metadata

Add admin socket commands:
1) bluestore collections
Lists collections.
2) bluestore list <coll> [start object] [max count]
Lists collection coll starting from object (optional). Default 100 entries. 0 = unlimited.
3) bluestore onode metadata <object>
Prints onode metadata as seen by BlueStore.

It might happen (usually in tests) that 2 BlueStore instances are created at the same time.
Since admin commands are unique, it fails to register.
Use first register to detect whether we can register at all.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agotest/objectstore/store_test: Adapt tests to write_v2
Adam Kupczyk [Wed, 29 May 2024 06:34:23 +0000 (06:34 +0000)]
test/objectstore/store_test: Adapt tests to write_v2

Tests that use original write path specific knowledge are failing now.
Falling back to write_v1 in these tests.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agoos/bluestore: Add do_write_v2_compressed()
Adam Kupczyk [Tue, 8 Apr 2025 08:36:21 +0000 (08:36 +0000)]
os/bluestore: Add do_write_v2_compressed()

Modify do_write_v2() to branch into do_write_v2_compressed().
Segmented and regular cases are recognized and handled properly.
New do_write_v2_compressed() oversees compression / recompression.

Make one Estimator per Collection.
It makes possible for estimator to learn in collection specific compressibility.
In write_v2_compressed use compressor already selected in choose_write_options.
Make Collection create Estimator on first use.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agoos/bluestore/compression: Main part of recompression feature
Adam Kupczyk [Tue, 8 Apr 2025 11:03:22 +0000 (11:03 +0000)]
os/bluestore/compression: Main part of recompression feature

Add feature of recompression scanner that looks around write region to see how much
would be gained, if we read some more around and wrote more.
Added Compression.h / Compression.cc.
Added debug_bluestore_compression dout.
Created Scanner class.
Provides write_lookaround() for scanning loaded extents.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agoos/bluestore/compression: Estimator class
Adam Kupczyk [Wed, 9 Apr 2025 16:03:52 +0000 (16:03 +0000)]
os/bluestore/compression: Estimator class

Add CMake rules to compile.
Add bluestore_compression dout subsys.

Created Estimator class.
It is used by Scanner to decide if specific extent is to be recompressed.
Prepare for future machine learning / adaptive algorithm for estimation.

So far logic of Estimator is relatively simple.
It learns expected recompression values and uses them in next iterations to predict.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
3 months agoMerge pull request #59248 from kamoltat/wip-ksirivad-improve-netsplit-warning
Radoslaw Zarzynski [Thu, 24 Apr 2025 06:17:51 +0000 (08:17 +0200)]
Merge pull request #59248 from kamoltat/wip-ksirivad-improve-netsplit-warning

HealthMonitor: Add topology-aware netsplit detection and warning

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
3 months agomds/Locker: use ceph_abort_msg() instead of ceph_assert() 62941/head
Max Kellermann [Thu, 24 Apr 2025 05:17:48 +0000 (07:17 +0200)]
mds/Locker: use ceph_abort_msg() instead of ceph_assert()

This ceph_assert() always fails, but depending on the configuration
value `ceph_assert_supresssions`, execution may continue, but the
`dir` variable is left uninitialized.  This leads to a compiler
warning:

 /home/jenkins-build/build/workspace/ceph-api/src/mds/Locker.cc:451:22: error: variable 'dir' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]

clang then suggests to nullptr-initialize the variable:

 /home/jenkins-build/build/workspace/ceph-api/src/mds/Locker.cc:447:11: note: initialize the variable 'dir' to silence this warning
   447 |         CDir *dir;
       |                  ^
       |                   = nullptr

This, however, is a very bad idea because all this does is suppress
the warning; it still crashes the process.

Since there's no recovery from this problem, let's switch to
ceph_abort_msg() which is [[noreturn]] and the compiler can deduce
that `dir` is always initialized when it's used.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
3 months agoMerge pull request #62693 from ronen-fr/wip-rf-iocnt
Ronen Friedman [Thu, 24 Apr 2025 05:17:33 +0000 (08:17 +0300)]
Merge pull request #62693 from ronen-fr/wip-rf-iocnt

osd/scrub: performance counters for I/O performed by the scrubber

Reviewed-by: Alex Ainscow <aainscow@uk.ibm.com>
Reviewed-by: Bill Scales <bill_scales@uk.ibm.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 months agocrimson/os/seastore/seastore_types: introduce and use paddr_t::is_absolute_segmented...
Yingxin Cheng [Wed, 23 Apr 2025 06:37:43 +0000 (14:37 +0800)]
crimson/os/seastore/seastore_types: introduce and use paddr_t::is_absolute_segmented/random_block()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agocrimson/os/seastore/lba_mapping: fix LBAMapping::is_zero_reserved()
Yingxin Cheng [Wed, 23 Apr 2025 06:22:58 +0000 (14:22 +0800)]
crimson/os/seastore/lba_mapping: fix LBAMapping::is_zero_reserved()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agocrimson/os/seastore/seastore_types: adjust paddr_t::is_real_location()
Yingxin Cheng [Wed, 23 Apr 2025 06:21:30 +0000 (14:21 +0800)]
crimson/os/seastore/seastore_types: adjust paddr_t::is_real_location()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 months agoMerge pull request #62898 from nbalacha/wip-nbalacha-70963
Ilya Dryomov [Wed, 23 Apr 2025 22:28:52 +0000 (00:28 +0200)]
Merge pull request #62898 from nbalacha/wip-nbalacha-70963

rbd: display mirror state creating

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
3 months agoMerge pull request #60899 from clwluvw/curl-einval
Casey Bodley [Wed, 23 Apr 2025 22:28:16 +0000 (18:28 -0400)]
Merge pull request #60899 from clwluvw/curl-einval

rgw: handle EINVAL translation in forward_request

Reviewed-by: Casey Bodley <cbodley@redhat.com>