]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson, cls: fix the inability to print logs from plugins.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 4 Mar 2022 11:03:05 +0000 (11:03 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 8 Mar 2022 01:31:10 +0000 (01:31 +0000)
commitf62329f9a400ea97f9f2fd0f8b94e63d0fdd7628
tree7f35dbe5839e280a2d777c92e07273c20ab58364
parent922211851ebd3d093501a4ce2fc9f3178c58054d
crimson, cls: fix the inability to print logs from plugins.

`cls_log()` of the interface between an OSD and a plugin
(a Ceph Class) is implemented on top of the `dout` macros
and shared between crimson and the classical OSD.

Unfortunately, when a plugin is hosted inside crimson,
this causes the inability to send to any in-plugin generated
message to the `seastar::logger` for the `objclass` subsystem.

This patch differtiates the implementation of `cls_log()`,
and thus allow the `seastar::logger`-based implementation
of `dout` to be used.

After the fix:

```
DEBUG 2022-03-07 14:12:14,124 [shard 0] osd - handling op call on object 1:424638ea:::image1:head
DEBUG 2022-03-07 14:12:14,124 [shard 0] osd - calling method rbd.create, num_read=0, num_write=0
DEBUG 2022-03-07 14:12:14,125 [shard 0] objclass - <cls> ../src/cls/rbd/cls_rbd.cc:787: create object_prefix=image1 size=0 order=22 features=0
DEBUG 2022-03-07 14:12:14,125 [shard 0] osd - handling op omap-get-vals-by-keys on object 1:424638ea:::image1:head
DEBUG 2022-03-07 14:12:14,125 [shard 0] osd - omap_get_vals_by_keys: object does not exist: 1:424638ea:::image1:head
```

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/objclass.cc
src/objclass/class_api.cc
src/osd/objclass.cc