f->dump_string("device", "/dev/" + dev);
}
f->close_section();
+ } else if (admin_command == "send_beacon") {
+ if (is_active()) {
+ send_beacon(ceph::coarse_mono_clock::now());
+ }
} else {
ceph_abort_msg("broken asok registration");
}
r = admin_socket->register_command("list_devices", "list_devices",
asok_hook,
"list OSD devices.");
+ r = admin_socket->register_command("send_beacon", "send_beacon",
+ asok_hook,
+ "send OSD beacon to mon immediately");
test_ops_hook = new TestOpsSocketHook(&(this->service), this->store);
// Note: pools are CephString instead of CephPoolname because
COMMAND("cache status",
"Get OSD caches statistics",
"osd", "r")
+COMMAND("send_beacon",
+ "Send OSD beacon to mon immediately",
+ "osd", "r")
};
void OSD::do_command(
store->dump_cache_stats(ds);
}
}
-
- else {
+ else if (prefix == "send_beacon") {
+ if (is_active()) {
+ send_beacon(ceph::coarse_mono_clock::now());
+ }
+ } else {
ss << "unrecognized command '" << prefix << "'";
r = -EINVAL;
}