]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
2 years agomgr/prometheus: fix pool_objects_repaired and daemon_health_metrics format 51672/head
banuchka [Sat, 15 Apr 2023 20:56:05 +0000 (21:56 +0100)]
mgr/prometheus: fix pool_objects_repaired and daemon_health_metrics format

mgr/prometheus: fix pool_objects_repaired and daemon_health_metrics format

- fix "error reading metrics for http://****:***/metrics: reading text format failed: text format parsing error in line 2010: second HELP line for metric name "ceph_pool_objects_repaired" error

- rename label name "poolid" to "pool_id" like all other metrics
- change type for the "daemon_health_metrics" to gauge

Fixes: https://tracker.ceph.com/issues/59505
Signed-off-by: banuchka <tyrchenok@gmail.com>
(cherry picked from commit 95d5303e11d6cba5ec4e71716af8931bcc2b9767)

2 years agoMerge pull request #51645 from Matan-B/wip-51448-reef
Matan [Mon, 22 May 2023 15:36:06 +0000 (17:36 +0200)]
Merge pull request #51645 from Matan-B/wip-51448-reef

reef: crimson/osd/scheduler/mclock_scheduler: Fix OSD unable to start

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51643 from Matan-B/wip-50411-reef
Matan [Mon, 22 May 2023 15:35:21 +0000 (17:35 +0200)]
Merge pull request #51643 from Matan-B/wip-50411-reef

reef: crimson/osd: start operations asynchrously

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51642 from Matan-B/wip-51333-reef
Matan [Mon, 22 May 2023 15:34:23 +0000 (17:34 +0200)]
Merge pull request #51642 from Matan-B/wip-51333-reef

reef: crimson/osd/objclass: Fix compilation warning

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51640 from Matan-B/wip-50227-reef
Matan [Mon, 22 May 2023 15:33:08 +0000 (17:33 +0200)]
Merge pull request #51640 from Matan-B/wip-50227-reef

reef: crimson/osd/heartbeat: share osdmap to peers when necessary

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51639 from Matan-B/wip-51202-reef
Matan [Mon, 22 May 2023 15:31:38 +0000 (17:31 +0200)]
Merge pull request #51639 from Matan-B/wip-51202-reef

reef: crimson/osd/pg: make clone object's version consistent with pglog

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51638 from Matan-B/wip-51180-reef
Matan [Mon, 22 May 2023 15:30:39 +0000 (17:30 +0200)]
Merge pull request #51638 from Matan-B/wip-51180-reef

reef: crimson/osd/snaptrim_event: get SnapSetContext from head obc

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51637 from Matan-B/wip-50530-reef
Matan [Mon, 22 May 2023 15:29:23 +0000 (17:29 +0200)]
Merge pull request #51637 from Matan-B/wip-50530-reef

reef: crimson/osd: Handle rollback to head obejct

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51634 from Matan-B/wip-50840-reef
Matan [Mon, 22 May 2023 15:25:34 +0000 (17:25 +0200)]
Merge pull request #51634 from Matan-B/wip-50840-reef

reef: crimson/os/seastore: avoid segment nonce collision

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51633 from Matan-B/wip-50839-reef
Matan [Mon, 22 May 2023 15:24:56 +0000 (17:24 +0200)]
Merge pull request #51633 from Matan-B/wip-50839-reef

reef: crimson/os/seastore: ensure transaction commit order

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51632 from Matan-B/wip-50653-reef
Matan [Mon, 22 May 2023 15:23:53 +0000 (17:23 +0200)]
Merge pull request #51632 from Matan-B/wip-50653-reef

reef: crimson/os/seastore/cache: consider EXIST_CLEAN extents as pending ones

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51631 from Matan-B/wip-50555-reef
Matan [Mon, 22 May 2023 15:18:22 +0000 (17:18 +0200)]
Merge pull request #51631 from Matan-B/wip-50555-reef

reef: crimson/os/seastore: implement get_stat() for RBM

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51630 from Matan-B/wip-50492-reef
Matan [Mon, 22 May 2023 15:17:19 +0000 (17:17 +0200)]
Merge pull request #51630 from Matan-B/wip-50492-reef

reef: crimson/common/log: Fix debug logging macros

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51627 from Matan-B/wip-50602-reef
Matan [Mon, 22 May 2023 15:15:37 +0000 (17:15 +0200)]
Merge pull request #51627 from Matan-B/wip-50602-reef

reef: crimson/os/seastore: don't set INVALID extents to CLEAN when reading extents

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51626 from Matan-B/wip-50556-reef
Matan [Mon, 22 May 2023 15:14:04 +0000 (17:14 +0200)]
Merge pull request #51626 from Matan-B/wip-50556-reef

reef: crimson: fix build error

Reviewed-by: Samuel Just <sjust@redhat.com>
2 years agoMerge pull request #51624 from Matan-B/wip-49116-reef
Matan [Mon, 22 May 2023 15:11:02 +0000 (17:11 +0200)]
Merge pull request #51624 from Matan-B/wip-49116-reef

reef: crimson/osd: Support balance reads

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2 years agoMerge pull request #51652 from zdover23/wip-doc-2023-05-22-backport-51319-to-reef
Anthony D'Atri [Mon, 22 May 2023 08:55:31 +0000 (04:55 -0400)]
Merge pull request #51652 from zdover23/wip-doc-2023-05-22-backport-51319-to-reef

reef: doc: deprecate the cache tiering

2 years agodoc: deprecate the cache tiering 51652/head
Radosław Zarzyński [Tue, 2 May 2023 15:52:23 +0000 (17:52 +0200)]
doc: deprecate the cache tiering

This topic has been discussed many times; recently at the Dev
Summit of Cephalocon 2023.

This commit is the minial version of the work, contained entirely
within the `doc`. However, likely it will be expanded as there
were ideas like e.g. adding cache tiering back experimental feature
list (Sam) to warn users when deploying a new cluster.

Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
(cherry picked from commit 535b8db33ea03fbab7ef0c4df5251658f956b0c5)

2 years agocrimson/osd/scheduler/mclock_scheduler: Fix OSD unable to start 51645/head
Matan Breizman [Thu, 11 May 2023 14:18:46 +0000 (14:18 +0000)]
crimson/osd/scheduler/mclock_scheduler: Fix OSD unable to start

https://github.com/ceph/ceph/pull/49975 Introduced changes to
mclock conf value types which caused the osd to stall while booting.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 5cb12bb4af1f1c9cd3051429d8f6c0c01535ab04)

2 years agocrimson/osd/snaptrim_event: preserve interrupt condition when creating 51643/head
Xuehan Xu [Fri, 5 May 2023 05:22:11 +0000 (05:22 +0000)]
crimson/osd/snaptrim_event: preserve interrupt condition when creating
subops

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit 58f527893e0a5c051c91d6df0c8d3217c1811875)

2 years agocrimson/osd: start operations asynchrously
Xuehan Xu [Wed, 8 Mar 2023 05:52:00 +0000 (05:52 +0000)]
crimson/osd: start operations asynchrously

Fixes: https://tracker.ceph.com/issues/58928
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit a1963937e421bfdaf2e9735dc2faf750c9a9e08e)

2 years agocrimson/osd/objclass: Compilation warning 51642/head
Matan Breizman [Wed, 3 May 2023 09:39:14 +0000 (09:39 +0000)]
crimson/osd/objclass: Compilation warning

```
In copy constructor ‘ceph::buffer::v15_2_0::list::list(const ceph::buffer::v15_2_0::list&)’,
    inlined from ‘OSDOp::OSDOp(const OSDOp&)’ at ../src/osd/osd_types.h:4081:8,
    inlined from ‘int cls_cxx_snap_revert(cls_method_context_t, snapid_t)’ at ../src/crimson/osd/objclass.cc:279:37:
../src/include/buffer.h:945:20: warning: ‘op.OSDOp::indata.ceph::buffer::v15_2_0::list::_len’ is used uninitialized [-Wuninitialized]
  945 |         _len(other._len),
      |              ~~~~~~^~~~
../src/crimson/osd/objclass.cc: In function ‘int cls_cxx_snap_revert(cls_method_context_t, snapid_t)’:
../src/crimson/osd/objclass.cc:279:9: note: ‘op’ declared here
  279 |   OSDOp op{op = CEPH_OSD_OP_ROLLBACK};
      |
```

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 99a8d19b05c175777ec7877eb58bb87270602ba5)

2 years agocrimson/osd/heartbeat: add latest epoch sent concept 51640/head
Matan Breizman [Wed, 29 Mar 2023 16:42:09 +0000 (16:42 +0000)]
crimson/osd/heartbeat: add latest epoch sent concept

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 12af68c24d2ea0cfd540f4da0a4f765b8212396d)

2 years agocrimson/osd/shard_services: Add logs to load_map_bls
Matan Breizman [Wed, 29 Mar 2023 09:21:12 +0000 (09:21 +0000)]
crimson/osd/shard_services: Add logs to load_map_bls

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 7550d423b1baf2a7bd701b0391a192dc30e9482f)

2 years agocrimson/osd/heartbeat: add a rename todo
Matan Breizman [Thu, 27 Apr 2023 16:07:01 +0000 (16:07 +0000)]
crimson/osd/heartbeat: add a rename todo

In continuation to: bfbbc311f1f

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 0075349661a838abc04f110630bc4f370116c391)

2 years agocrimson/osd/heartbeat: Rename Peer's created at epoch
Matan Breizman [Wed, 29 Mar 2023 09:19:29 +0000 (09:19 +0000)]
crimson/osd/heartbeat: Rename Peer's created at epoch

As these getter and setter represent the epoch at which the peer was added

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit bfbbc311f1fc029ef5df3415cada325fbfed4bde)

2 years agocrimson/osd/heartbeat: share osdmap to peers when necessary
Xuehan Xu [Thu, 23 Feb 2023 06:50:56 +0000 (06:50 +0000)]
crimson/osd/heartbeat: share osdmap to peers when necessary

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 670bbaa4d858de3dd50d857370f76bbd1a13c702)

2 years agocrimson/osd/pg: make clone object's version consistent with pglog 51639/head
Xuehan Xu [Tue, 25 Apr 2023 06:21:07 +0000 (06:21 +0000)]
crimson/osd/pg: make clone object's version consistent with pglog

Right now, the head object's version is 1 less than clone object's
version in the pg log; while it's exactly the other way around when
it comes to the versions recorded in the object info of head/clone
objects

Fixes: https://tracker.ceph.com/issues/59536
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit 1fd6324bb8baaee4d413f188c78b821f84e5d4ff)

2 years agocrimson/osd/snaptrim_event: avoid leaking txn ops for updating head obcs 51638/head
Xuehan Xu [Thu, 27 Apr 2023 03:32:04 +0000 (03:32 +0000)]
crimson/osd/snaptrim_event: avoid leaking txn ops for updating head obcs
when removing clones

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit 08625c27f9e158ffb46d0d5d008f500ee9677b42)

2 years agocrimson/osd/snaptrim_event: encode head oi with no oid
Xuehan Xu [Thu, 27 Apr 2023 03:31:20 +0000 (03:31 +0000)]
crimson/osd/snaptrim_event: encode head oi with no oid

This is required by PGBackend::load_metadata

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit ba8732d2a942b4faede4bd3d88764f1da0aa5ad8)

2 years agocrimson/osd/snaptrim_event: don't clear head obc's snaps
Xuehan Xu [Thu, 27 Apr 2023 03:29:58 +0000 (03:29 +0000)]
crimson/osd/snaptrim_event: don't clear head obc's snaps

There may be valid snaps for a head object, although some snap is
being removed

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit f5194e60a25d89f0b0673a96629ea7db42487ac0)

2 years agocrimson/osd: get SnapSetContext from head obc
Xuehan Xu [Sun, 23 Apr 2023 03:59:17 +0000 (03:59 +0000)]
crimson/osd: get SnapSetContext from head obc

clone obc doesn't have snapset context

Fixes: https://tracker.ceph.com/issues/59511
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit a41588532a0339bd647daaf52a6207b67c4459b5)

2 years agotest/librados/snapshots_cxx: Add WriteRollback test 51637/head
Matan Breizman [Tue, 21 Mar 2023 10:50:58 +0000 (10:50 +0000)]
test/librados/snapshots_cxx: Add WriteRollback test

This test is an example for https://tracker.ceph.com/issues/59114

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit b4f453d3a2d8bbdd3b48c7101ef91303c8b2b00b)

2 years agocrimson/osd/pg_backend: Add a note about unhandled rollback case
Matan Breizman [Sun, 19 Mar 2023 11:26:41 +0000 (11:26 +0000)]
crimson/osd/pg_backend: Add a note about unhandled rollback case

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit f616fafbd6e8beeb1cb0852407014227b3c34421)

2 years agotest/librados/snapshots: Add FutureSnapRollback test
Matan Breizman [Wed, 15 Mar 2023 11:11:47 +0000 (11:11 +0000)]
test/librados/snapshots: Add FutureSnapRollback test

Add a test we rollback to a future snap id. Meaning, no mutation is
followed after taking the third snapshot.
The read op is expected to be applied to the head object.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 047c1832c41afc3ce17c724375a6817fa1672b67)

2 years agocrimson/osd/pg_backend: Rename clone_obc to resolved_obc
Matan Breizman [Wed, 15 Mar 2023 11:19:10 +0000 (11:19 +0000)]
crimson/osd/pg_backend: Rename clone_obc to resolved_obc

The resolved_obc being used is not necessarily a clone object.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit a9100256d03dc94805ebf41c1e7e67eb70f8a47e)

2 years agocrimson/osd/pg_backend:: rollback to support resolved head
Matan Breizman [Wed, 15 Mar 2023 10:00:29 +0000 (10:00 +0000)]
crimson/osd/pg_backend:: rollback to support resolved head

Consider the following `resolve_oid()` case:
```
    // Because oid.snap > ss.seq, we are trying to read from a snapshot
    // taken after the most recent write to this object. Read from head.
```
In this case, a no-op is expected as the head object can read from.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 18f3a67cb53c473fd74a92ab7d5211dff63b88fa)

2 years agocrimson/osd/pg_backend: PGBackend::rollback take RWWRITE lock
Matan Breizman [Tue, 14 Mar 2023 13:33:40 +0000 (13:33 +0000)]
crimson/osd/pg_backend: PGBackend::rollback take RWWRITE lock

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 1e1c4318e7fb4cd3d7f585b3431236904ccaea31)

2 years agocrimson/os/seastore: check the type of segment head and segment tail during mount 51634/head
Zhang Song [Tue, 4 Apr 2023 01:34:06 +0000 (09:34 +0800)]
crimson/os/seastore: check the type of segment head and segment tail during mount

Signed-off-by: Zhang Song <zhangsong325@gmail.com>
(cherry picked from commit b890de1c2fe489e05804a2724ad3493c0114732e)

2 years agocrimson/os/seastore: avoid segment nonce collision
Zhang Song [Mon, 3 Apr 2023 11:29:27 +0000 (19:29 +0800)]
crimson/os/seastore: avoid segment nonce collision

Signed-off-by: Zhang Song <zhangsong325@gmail.com>
(cherry picked from commit 367577efa7440d6d7414b9772a3b130109852535)

2 years agocrimson/os/seastore: ensure transaction commit order 51633/head
Zhang Song [Mon, 3 Apr 2023 11:15:21 +0000 (19:15 +0800)]
crimson/os/seastore: ensure transaction commit order

The previous implementation acquired the throttler first,
which could result in an unordered wakeup sequence.

Signed-off-by: Zhang Song <zhangsong325@gmail.com>
(cherry picked from commit 0740e21e3248d227301d099d6778e94baf62a9e8)

2 years agocrimson/os/seastore/cache: use CachedExtent::is_mutable() where appropriate 51632/head
Yingxin Cheng [Mon, 27 Mar 2023 09:38:17 +0000 (17:38 +0800)]
crimson/os/seastore/cache: use CachedExtent::is_mutable() where appropriate

CachedExtent::is_mutable() should only be used to check whether need to
call duplicate_for_write(extent).

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit 865285a53cf3a4a2880c2b7b6a35b5b20a55553d)

2 years agocrimson/os/seastore/cache: consider EXIST_CLEAN extents as pending ones
Xuehan Xu [Fri, 24 Mar 2023 10:43:57 +0000 (18:43 +0800)]
crimson/os/seastore/cache: consider EXIST_CLEAN extents as pending ones

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit f34faf363e69053d18d50263ee02ca5948b6462c)

2 years agocrimson/os/seastore/rbm: implement get_stat() 51631/head
myoungwon oh [Thu, 16 Mar 2023 06:35:59 +0000 (15:35 +0900)]
crimson/os/seastore/rbm: implement get_stat()

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
(cherry picked from commit 3c21cff441739a93d9936ed0d7b4fdc4a32ca51c)

2 years agocrimson/common/log: Fix debug logging macros 51630/head
Matan Breizman [Sun, 12 Mar 2023 19:52:28 +0000 (19:52 +0000)]
crimson/common/log: Fix debug logging macros

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 5b33995073d70921a1412c07d710f4bdc6e1b0fe)

2 years agocrimson/os/seastore: don't set INVALID extents to CLEAN when reading 51627/head
Xuehan Xu [Tue, 21 Mar 2023 05:52:43 +0000 (05:52 +0000)]
crimson/os/seastore: don't set INVALID extents to CLEAN when reading
extents

CLEAN_PENDING extents may be invalidated before read completes:

1. transaction A retired an laddr, which lead to a RetirePlaceHolder in
   Cache
2. transaction B try to read that extent, and replace A's
   RetirePlaceHolder with it;
3. transaction A commits and invalidate that extent;
4. transaction B complete reading that extent;

In this case, we shouldn't set the extent's state to CLEAN

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit 729dabd8ff20a747e02c15113e005a6d61acc8d7)

2 years agocrimson: fix build error 51626/head
Aravind Ramesh [Thu, 16 Mar 2023 07:02:39 +0000 (12:32 +0530)]
crimson: fix build error

With -DWITH_SEASTAR=ON, build is failing.

src/crimson/osd/osd_operations/snaptrim_event.cc:174:29: error: ‘sleep’ is not a member of ‘seastar’

Signed-off-by: Aravind Ramesh <Aravind.Ramesh@wdc.com>
(cherry picked from commit 917cba60ca40b187ac5da915956e8523c5e161d0)

2 years agocrimson/osd/object_context_loader: Hide private methods 51624/head
Matan Breizman [Sun, 5 Mar 2023 10:22:10 +0000 (10:22 +0000)]
crimson/osd/object_context_loader: Hide private methods

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit b1632dbf17d0118b6a6c7aff1da15c62cbec6637)

2 years agocrimson/osd: Introduce with_head_and_clone_obc()
Matan Breizman [Sun, 5 Mar 2023 09:31:03 +0000 (09:31 +0000)]
crimson/osd: Introduce with_head_and_clone_obc()

In continuation to 7ca2690be956a36f61c7729946b94ccd970dd9c7:
Now that the head ref is no longer a member of obc, we need a new
substitute way to get the head when needed.

When loading a clone object, the head object is loaded
first (See with_clone_obc). Therefore we can make use of this design
to move the loaded head forward to the relevant func (See with_head_and_clone_obc).
Usually, we wouldn't need to make use of both the head and the clone obc in the
same function. However, SnapTrimObjSubEvent::remove_or_update is an abnormal usage.

Note: We want to avoid holding any unneeded references to obcs
to allow the obc_registery to evict no longer valid obc.
Therefore, with_obc() which references only a single obc is the
preferred entry point for loading obcs.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 3ea1d8e09d43a742d52931bbc508f80cdd8ceaa0)

2 years agocrimson/osd/object_context_loader: with_clone_obc to move head
Matan Breizman [Sun, 19 Feb 2023 10:50:04 +0000 (10:50 +0000)]
crimson/osd/object_context_loader: with_clone_obc to move head

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 4bf99c69f2506babc566395ea1f090c30bd70d30)

2 years agocrimson/osd/object_conetxt*: Rename get_ro_ss to get_head_ss
Matan Breizman [Sun, 19 Feb 2023 13:12:15 +0000 (13:12 +0000)]
crimson/osd/object_conetxt*: Rename get_ro_ss to get_head_ss

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit efcf292905135419f9f6f929f9bd3194e3661e61)

2 years agocrimson/osd: Remove head memeber from ObjectContext
Matan Breizman [Sun, 19 Feb 2023 10:49:47 +0000 (10:49 +0000)]
crimson/osd: Remove head memeber from ObjectContext

Before this patch, ObjectContext had a head member which was used
to get the head obc of a clone object.
This member caused the head object to being referenced while
attempting to 'clear_replica_obc' (Since we only evict un-referenced
obc from the obc_registery).
This mechanism, of obtaining the head, is no longer needed since
'with_clone_obc' loads the head object context first (using
oid.get_head).

In this commit, head is removed from ObjectContext class and users
are removed as well.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit e702dc39606bfcc3899307453a6b54af11b8b803)

2 years agocrimson/osd/pg: Add can_discard_op case
Matan Breizman [Sun, 19 Feb 2023 11:35:03 +0000 (11:35 +0000)]
crimson/osd/pg: Add can_discard_op case

discard op in the case where same_primary_since is later than
the MOSDOp's map epoch

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit c6ab21791545598473bd044ce602eea2bba892d3)

2 years agocrimson/osd/pg: Implement context_registry_on_change()
Matan Breizman [Tue, 7 Feb 2023 19:48:42 +0000 (19:48 +0000)]
crimson/osd/pg: Implement context_registry_on_change()

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit f468c673253e3fdd30677e424674f58a8affd963)

2 years agocommon/instrusive_lru: Implement for_each
Matan Breizman [Tue, 7 Feb 2023 19:47:55 +0000 (19:47 +0000)]
common/instrusive_lru: Implement for_each

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 9f8e2329882a2d5101489b7c2445285a43d4ed13)

2 years agoqa/*/crimson: Seperate Crimson's rbd api testing
Matan Breizman [Sun, 5 Feb 2023 14:53:11 +0000 (14:53 +0000)]
qa/*/crimson: Seperate Crimson's rbd api testing

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit b73d8fd860b13f970292e7e78a19df76c9dc15fb)

2 years agocrimson/osd/osd_operations: Add RepRequest::with_pg() to the pipeline
Matan Breizman [Sun, 5 Feb 2023 12:01:41 +0000 (12:01 +0000)]
crimson/osd/osd_operations: Add RepRequest::with_pg() to the pipeline

Wait on a PG to advance to the request's map epoch.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit cc53ae651249a24ab3e6844823bec6fe65fd7cd3)

2 years agocrimson/osd/pg: add replica_clear_repop_obc() and log_operation()
Matan Breizman [Wed, 7 Dec 2022 13:19:26 +0000 (13:19 +0000)]
crimson/osd/pg: add replica_clear_repop_obc() and log_operation()

Clear invalid obc from cache.

Fixes: https://tracker.ceph.com/issues/58089
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 91cbe881397dbf548559a94582b244f0d4ebf8cb)

2 years agocommon/intrusive_lru: Add clear_range()
Matan Breizman [Wed, 7 Dec 2022 13:17:23 +0000 (13:17 +0000)]
common/intrusive_lru: Add clear_range()

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit c4d996e0b733a8a198274949a9d77c1f2fed7fbd)

2 years agoosd/osd_types_fmt: Add fmt::formatter<pg_log_entry_t>
Matan Breizman [Sun, 22 Jan 2023 11:32:01 +0000 (11:32 +0000)]
osd/osd_types_fmt: Add fmt::formatter<pg_log_entry_t>

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit f4300d4aa4390f78fe1fc7b09558cfa765ea9260)

2 years agoqa/suites/crimson-rados/thrash/workloads: Enable small-objects-balanced/localized
Matan Breizman [Tue, 6 Dec 2022 14:23:06 +0000 (14:23 +0000)]
qa/suites/crimson-rados/thrash/workloads: Enable small-objects-balanced/localized

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 5b457365fa9283d2638e454ff481b45288f73a8b)

2 years agocrimson/osd/osd_operation/client_request: do_process() reorder
Matan Breizman [Tue, 29 Nov 2022 11:04:22 +0000 (11:04 +0000)]
crimson/osd/osd_operation/client_request: do_process() reorder

* Move error checking to the beginning of do_process()

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit b1d75849312bea7b91b16336738116928c687528)

2 years agocrimson/osd/osd_operations/client_request: fix is_misdirected()
Matan Breizman [Tue, 29 Nov 2022 11:00:52 +0000 (11:00 +0000)]
crimson/osd/osd_operations/client_request: fix is_misdirected()

In the case of balanced read the op is not misdirected.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit b63ab1f4aefc7a557814769cf2d9bd48ba6a2b8c)

2 years agocrimson/osd/osd_operations/client_request: Add logs around do_process()
Matan Breizman [Tue, 29 Nov 2022 10:59:55 +0000 (10:59 +0000)]
crimson/osd/osd_operations/client_request: Add logs around do_process()

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 2f77bbb79c179597dedae36855f531963aecfa54)

2 years agocrimson/osd/osd_operations/client_request: Skip do_recover_missing() on replica
Matan Breizman [Sun, 11 Dec 2022 13:44:17 +0000 (13:44 +0000)]
crimson/osd/osd_operations/client_request: Skip do_recover_missing() on replica

* assert internal_client_request is on primary since
  do_recover_missing is also called by internal requests.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 7fd0b34521d14423e3bdaf260895cd005dbf918a)

2 years agocrimson/osd/pg: Expand can_discard_op on BALANCE/LOCALIZE reads
Matan Breizman [Tue, 29 Nov 2022 10:51:58 +0000 (10:51 +0000)]
crimson/osd/pg: Expand can_discard_op on BALANCE/LOCALIZE reads

See: 69def1433d49bd8543e26e9f1ebf00dfbc5059bd

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 53e26d16ff386fc384fa1a4b6d631145e587b225)

2 years agoMerge pull request #51619 from zdover23/wip-doc-2023-05-21-backport-51618-to-reef
Anthony D'Atri [Sat, 20 May 2023 22:17:12 +0000 (18:17 -0400)]
Merge pull request #51619 from zdover23/wip-doc-2023-05-21-backport-51618-to-reef

reef: doc: Add missing `ceph` command in documentation section `REPLACING A…

2 years agodoc: Add missing `ceph` command in documentation section `REPLACING AN OSD` 51619/head
Alexander Proschek [Sat, 20 May 2023 21:06:09 +0000 (14:06 -0700)]
doc: Add missing `ceph` command in documentation section `REPLACING AN OSD`

Signed-off-by: Alexander Proschek <alexander.proschek@protonmail.com>
Signed-off-by: Alexander Proschek <alexander.proschek@protonmail.com>
(cherry picked from commit 0557d5e465556adba6d25db62a40ba55a5dd2400)

2 years agoMerge pull request #51231 from rishabh-d-dave/wip-59559-reef
Venky Shankar [Sat, 20 May 2023 09:39:07 +0000 (15:09 +0530)]
Merge pull request #51231 from rishabh-d-dave/wip-59559-reef

reef: qa: check each fs for health

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2 years agoMerge pull request #51595 from zdover23/wip-doc-2023-05-20-backport-51594-to-reef
zdover23 [Fri, 19 May 2023 20:19:40 +0000 (06:19 +1000)]
Merge pull request #51595 from zdover23/wip-doc-2023-05-20-backport-51594-to-reef

reef: doc/rados: edit data-placement.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2 years agoMerge pull request #51328 from trociny/wip-59617-reef
Yuri Weinstein [Fri, 19 May 2023 20:15:42 +0000 (16:15 -0400)]
Merge pull request #51328 from trociny/wip-59617-reef

reef: rgw/rados: check_quota() uses real bucket owner

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2 years agoMerge pull request #51514 from galsalomon66/wip-61156-reef
Casey Bodley [Fri, 19 May 2023 18:13:39 +0000 (14:13 -0400)]
Merge pull request #51514 from galsalomon66/wip-61156-reef

reef: Trino/RGW alignments & adding JSON queries to s3tests

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2 years agodoc/rados: edit data-placement.rst 51595/head
Zac Dover [Fri, 19 May 2023 16:26:45 +0000 (02:26 +1000)]
doc/rados: edit data-placement.rst

Edit doc/rados/data-placement.rst.

Co-authored-by: Cole Mitchell <cole.mitchell@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 32600c27c4dca6b9d5fae9892c0a1660b672781c)

2 years agoMerge pull request #51585 from zdover23/wip-doc-2023-05-19-backport-51580-to-reef
Anthony D'Atri [Fri, 19 May 2023 12:13:15 +0000 (08:13 -0400)]
Merge pull request #51585 from zdover23/wip-doc-2023-05-19-backport-51580-to-reef

reef: doc/radosgw: explain multisite dynamic sharding

2 years agoMerge pull request #51518 from idryomov/wip-rbd-reef-backports-2
Ilya Dryomov [Fri, 19 May 2023 10:34:28 +0000 (12:34 +0200)]
Merge pull request #51518 from idryomov/wip-rbd-reef-backports-2

reef: RBD backports (batch 2)

Reviewed-by: Christopher Hoffman <choffman@redhat.com>
2 years agodoc/radosgw: explain multisite dynamic sharding 51585/head
Zac Dover [Thu, 18 May 2023 21:07:02 +0000 (07:07 +1000)]
doc/radosgw: explain multisite dynamic sharding

Add a note to doc/radosgw/dynamicresharding.rst and a note to
doc/radosgw/multisite.rst that explains that dynamic resharding is not
supported in releases prior to Reef.

This commit is made in response to a request from Mathias Chapelain.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit d4ed4223d914328361528990f89f1ee4acd30e79)

2 years agoMerge pull request #51524 from aaSharma14/wip-61178-reef
Nizamudeen A [Fri, 19 May 2023 06:38:52 +0000 (12:08 +0530)]
Merge pull request #51524 from aaSharma14/wip-61178-reef

reef: mgr/dashboard: fix regression caused by cephPgImabalance alert

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
2 years agoMerge pull request #51576 from zdover23/wip-doc-2023-05-19-backport-51572-to-reef
Anthony D'Atri [Thu, 18 May 2023 22:42:34 +0000 (18:42 -0400)]
Merge pull request #51576 from zdover23/wip-doc-2023-05-19-backport-51572-to-reef

reef: doc/rados: line-edit devices.rst

2 years agodoc/rados: line-edit devices.rst 51576/head
Zac Dover [Thu, 18 May 2023 14:13:41 +0000 (00:13 +1000)]
doc/rados: line-edit devices.rst

Edit doc/rados/operations/devices.rst.

Co-authored-by: Cole Mitchell <cole.mitchell@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 8d589b43d76a4e291c96c3750d068dba18eb9309)

2 years agoMerge pull request #51489 from zdover23/wip-doc-2023-05-16-backport-51485-to-reef
zdover23 [Thu, 18 May 2023 14:50:11 +0000 (00:50 +1000)]
Merge pull request #51489 from zdover23/wip-doc-2023-05-16-backport-51485-to-reef

reef: doc/start/os-recommendations: drop 4.14 kernel and reword guidance

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2 years agoMerge pull request #51483 from cbodley/wip-59609-reef
Yuri Weinstein [Thu, 18 May 2023 14:26:41 +0000 (07:26 -0700)]
Merge pull request #51483 from cbodley/wip-59609-reef

reef: rgw: add crypt attrs for iam policy to PostObj and Init/CompleteMultipart

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2 years agoMerge pull request #51482 from cbodley/wip-59614-reef
Yuri Weinstein [Thu, 18 May 2023 14:26:07 +0000 (07:26 -0700)]
Merge pull request #51482 from cbodley/wip-59614-reef

reef: rgw/s3: dump Message field in Error response even if empty

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2 years agoMerge pull request #51481 from cbodley/wip-59611-reef
Yuri Weinstein [Thu, 18 May 2023 14:25:09 +0000 (07:25 -0700)]
Merge pull request #51481 from cbodley/wip-59611-reef

reef: rgw/sts: AssumeRole no longer writes to user metadata

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2 years agoMerge pull request #51542 from zdover23/wip-doc-2023-05-18-backport-51534-to-reef
Anthony D'Atri [Wed, 17 May 2023 22:43:32 +0000 (18:43 -0400)]
Merge pull request #51542 from zdover23/wip-doc-2023-05-18-backport-51534-to-reef

reef: doc/cephfs: line-edit "Mirroring Module"

2 years agodoc/cephfs: line-edit "Mirroring Module" 51542/head
Zac Dover [Wed, 17 May 2023 12:25:38 +0000 (22:25 +1000)]
doc/cephfs: line-edit "Mirroring Module"

Line-edit the "Mirroring Module" section of
doc/cephfs/cephfs-mirroring.rst. Add prompts and formatting where such
things contribute to the realization of adequate sentences.

This commit is a follow-up to https://github.com/ceph/ceph/pull/51505.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit dd8855d9a934bcdd6a026f1308ba7410b1e143e3)

2 years agoMerge pull request #51042 from kotreshhr/wip-59415-reef
Yuri Weinstein [Wed, 17 May 2023 15:33:39 +0000 (08:33 -0700)]
Merge pull request #51042 from kotreshhr/wip-59415-reef

reef: mgr: Add one finisher thread per module

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2 years agoMerge pull request #51520 from zdover23/wip-doc-2023-05-17-backport-51505-to-reef
Anthony D'Atri [Wed, 17 May 2023 12:56:13 +0000 (08:56 -0400)]
Merge pull request #51520 from zdover23/wip-doc-2023-05-17-backport-51505-to-reef

reef: doc: explain cephfs mirroring `peer_add` step in detail

2 years agolibrbd: cleanup few log lines 51518/head
Prasanna Kumar Kalever [Fri, 28 Apr 2023 08:46:35 +0000 (14:16 +0530)]
librbd: cleanup few log lines

Currently:
2023-04-28T12:20:17.135+0530 7f1a7ccd2640 20 librbd::ExclusiveLock: 0x7f1a4c000b60 block_requestsr=0
[...]
2023-04-28T12:20:17.135+0530 7f1a7ccd2640 20 librbd::ManagedLock: 0x7f1a4c000b78 is_lock_owner: =1
[...]
2023-04-18T21:18:50.695+0530 7f0a1ffff640 20 librbd::ImageWatcher: 0x7f0a10007840 remote async request finished: [4305,140018014309120,1] = -110

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
(cherry picked from commit e558ec553aff87769b13288a0afd80c5e3d0f8d6)

2 years agomgr/dashboard: fix regression caused by cephPgImabalance alert 51524/head
Aashish Sharma [Mon, 8 May 2023 07:19:13 +0000 (12:49 +0530)]
mgr/dashboard: fix regression caused by cephPgImabalance alert

because of an earlier fix delivered, there is a regression caused by it
due to which alerts are not getting displayed in the active alerts tab.
This PR intends to fix this issue.

Fixes: https://tracker.ceph.com/issues/59666
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
(cherry picked from commit d0a1431fb836f1dd227df85f9e75e098edfdeac9)

2 years agodoc: explain cephfs mirroring `peer_add` step in detail 51520/head
Venky Shankar [Tue, 16 May 2023 05:25:34 +0000 (10:55 +0530)]
doc: explain cephfs mirroring `peer_add` step in detail

@zdover23 reached out regarding missing explanation for `peer_add`
step in cephfs mirroring documentation. Add some explanation and
and example to make the step clear.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 6a6e887ff1f7f7d76db7f30f8410783b2f8153b0)

2 years agoMerge pull request #51502 from zdover23/wip-doc-2023-05-16-backport-51492-to-reef
Anthony D'Atri [Wed, 17 May 2023 00:49:40 +0000 (20:49 -0400)]
Merge pull request #51502 from zdover23/wip-doc-2023-05-16-backport-51492-to-reef

reef: doc/start: KRBD feature flag support note

2 years agotest/librbd: add empty cookie and blank address tests
Ilya Dryomov [Mon, 8 May 2023 11:30:18 +0000 (13:30 +0200)]
test/librbd: add empty cookie and blank address tests

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 43f2e4ad08b5a1855313e9aebe79ee235f7e5e16)

2 years agolibrbd/managed_lock/GetLockerRequest: Fix no valid lockers case
Matan Breizman [Mon, 1 May 2023 13:29:29 +0000 (13:29 +0000)]
librbd/managed_lock/GetLockerRequest: Fix no valid lockers case

See:
`m_locker->address = iter->second.addr.get_legacy_str();`

In the case where `iter->second.addr` is an empty address,
m_locker->address string is assigned with "0)/0" and therfore
will never result in an empty string.

Use `is_blank_ip()` before `get_legacy_str()`

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 7482beeea9b1bc8c3cbdac425e7afb8ebdc9f270)

2 years agorbd_support: recover from "double blocklisting"
Ramana Raja [Wed, 10 May 2023 18:37:44 +0000 (14:37 -0400)]
rbd_support: recover from "double blocklisting"

Recover from being blocklisted while recovering from blocklisting.
When the rbd_support  module is being set up to recover from client
blocklisting, the module's new rados client connection can also get
blocklisted. Currently, this will cause the recovery to fail and
the module will remain inoperable. Instead, retry module recovery
when the new client gets blocklisted during the module setup in the
recovery thread.

Fixes: https://tracker.ceph.com/issues/59713
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 4523d9b68ee84f69e8665a728d4037b53cdf3d6f)

2 years agoqa/workunits/rbd: Add tests for rbd_support module recovery
Ramana Raja [Sun, 5 Feb 2023 03:36:16 +0000 (22:36 -0500)]
qa/workunits/rbd: Add tests for rbd_support module recovery

... after the module's RADOS client is blocklisted.

Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit a2f15d4b2f876c79ee1de59fb79851b0eb505951)

2 years agomgr/rbd_support: recover from rados client blocklisting
Ramana Raja [Wed, 15 Feb 2023 15:12:54 +0000 (10:12 -0500)]
mgr/rbd_support: recover from rados client blocklisting

In certain scenarios the OSDs were slow to process RBD requests.
This lead to the rbd_support module's RBD client not being able to
gracefully handover a RBD exclusive lock to another RBD client.
After the condition persisted for some time, the other RBD client
forcefully acquired the lock by blocklisting the rbd_support module's
RBD client, and consequently blocklisted the module's RADOS client. The
rbd_support module stopped working. To recover the module, the entire
mgr service had to be restarted which reloaded other mgr modules.

Instead of recovering the rbd_support module from client blocklisting
by being disruptive to other mgr modules, recover the module
automatically without restarting the mgr serivce. On client getting
blocklisted, shutdown the module's handlers and blocklisted client,
create a new rados client for the module, and start the new handlers.

Fixes: https://tracker.ceph.com/issues/56724
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit cc0468738e5ddb98f7ac10b50e54446197b9c9a0)

2 years agopybind/rados: add ConnectionShutdown exception class
Ramana Raja [Thu, 12 Jan 2023 02:53:16 +0000 (21:53 -0500)]
pybind/rados: add ConnectionShutdown exception class

Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit e452899013323def87a8b9e6edbdae66067a827c)

2 years agomgr/rbd_support: notify the thread waiting on pending snapshot
Ramana Raja [Tue, 17 Jan 2023 03:04:08 +0000 (22:04 -0500)]
mgr/rbd_support: notify the thread waiting on pending snapshot

... requests to be completed.

Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 38a7e3715f0cee225aa49f3331d85ad37e2b7422)

2 years agotest/librbd: use GTEST_SKIP macro to skip tests
Ilya Dryomov [Thu, 27 Apr 2023 13:43:05 +0000 (15:43 +0200)]
test/librbd: use GTEST_SKIP macro to skip tests

The use of SUCCEED macro predates the introduction of GTEST_SKIP macro
to GTest 1.10.  Having skipped tests reported as passed is misleading!

Before:

[ RUN      ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
SKIPPING
[       OK ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms)
...
[ RUN      ] TestMockOperationSnapshotRemoveRequest.RemoveChildError
SKIPPING
[       OK ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (112 ms)
...
[  PASSED  ] 16 tests.

After:

[ RUN      ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:381: Skipped
Skipping due to unmet REQUIRE
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms)
...
[ RUN      ] TestMockOperationSnapshotRemoveRequest.RemoveChildError
../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:727: Skipped
Skipping due to enabled deep-flatten
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (111 ms)
...
[  PASSED  ] 14 tests.
[  SKIPPED ] 2 tests, listed below:
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 472c7b60fd9db5ab33aae250f54db0ae1007b348)

2 years agolibrbd: localize snap_remove op for mirror snapshots
Christopher Hoffman [Wed, 19 Apr 2023 15:26:27 +0000 (15:26 +0000)]
librbd: localize snap_remove op for mirror snapshots

A client may attempt a lock request not quickly enough to
obtain exclusive lock for operations when another competing
client responds quicker. This can happen when a peer site has
different performance characteristics or latency. Instead of
relying on this unpredictable behavior, localize operation to
primary cluster.

Fixes: https://tracker.ceph.com/issues/59393
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
(cherry picked from commit ac552c9b4d65198db8038d397a3060d5a030917d)