Skip to content

Commit

Permalink
osd: add 'rotate-stored-key' asok command
Browse files Browse the repository at this point in the history
This writes the key to the osd_key in the block device label.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas authored and rzarzynski committed Sep 12, 2022
1 parent 34ba1a5 commit 0bf78de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2794,6 +2794,8 @@ will start to track new ops received afterwards.";
store->generate_db_histogram(f);
} else if (prefix == "flush_store_cache") {
store->flush_cache(&ss);
} else if (prefix == "rotate-stored-key") {
store->write_meta("osd_key", inbl.to_str());
} else if (prefix == "dump_pgstate_history") {
f->open_object_section("pgstate_history");
f->open_array_section("pgs");
Expand Down Expand Up @@ -3987,6 +3989,10 @@ void OSD::final_init()
asok_hook,
"Flush bluestore internal cache");
ceph_assert(r == 0);
r = admin_socket->register_command("rotate-stored-key",
asok_hook,
"Update the stored osd_key");
ceph_assert(r == 0);
r = admin_socket->register_command("dump_pgstate_history",
asok_hook,
"show recent state history");
Expand Down

0 comments on commit 0bf78de

Please sign in to comment.