]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd: add tell command support
authorKefu Chai <kchai@redhat.com>
Tue, 10 Mar 2020 07:50:38 +0000 (15:50 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 15 Mar 2020 12:56:47 +0000 (20:56 +0800)
commitb6a932ac8525282afad8dc22ebc1589a2a446442
tree9fcadddd0cb231d599c9dd500976940330e589a9
parentcb3bff0541f9291a1a8460bf14c70d9710e37f87
crimson/osd: add tell command support

* change the function signature of `call()` to accept a bufferlist,
  as MCommand is supposed to carry a bufferlist which can be consumed
  by the hook.
* drop the wrapper of `tell()`, instead always use `call()`. simpler
  this way.
* promote `tell_result_t` to top level of `crimson::admin` as it is used
  as part of the interface between hook and `AdminSocket`
* replace `maybe_parsed_t` with `std::variant<parsed_command_t, tell_result_t>`,
  as the latter is able to convey more detailed error information if
  something goes wrong.
* osd now handles `MCommand`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/admin/admin_socket.cc
src/crimson/admin/admin_socket.h
src/crimson/admin/osd_admin.cc
src/crimson/osd/osd.cc
src/crimson/osd/osd.h