summaryrefslogtreecommitdiffstats
path: root/src/mon/KVMonitor.cc
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2023-08-01 20:51:21 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2023-08-02 20:18:23 +0200
commitad295e90a6b5dc55e66e71a356bff2730a379a08 (patch)
tree5907ee6ec77605563d840137f7620f8c008dba05 /src/mon/KVMonitor.cc
parentMerge PR #48732 into main (diff)
downloadceph-ad295e90a6b5dc55e66e71a356bff2730a379a08.tar.xz
ceph-ad295e90a6b5dc55e66e71a356bff2730a379a08.zip
osd/OSDMonitor: check svc is writeable before changing pending
Fixes: https://tracker.ceph.com/issues/59813 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to 'src/mon/KVMonitor.cc')
-rw-r--r--src/mon/KVMonitor.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mon/KVMonitor.cc b/src/mon/KVMonitor.cc
index 37a81a8048d..0e9511c7c96 100644
--- a/src/mon/KVMonitor.cc
+++ b/src/mon/KVMonitor.cc
@@ -368,6 +368,8 @@ int KVMonitor::validate_osd_destroy(
void KVMonitor::do_osd_destroy(int32_t id, uuid_d& uuid)
{
+ ceph_assert(is_writeable());
+
string dmcrypt_prefix = _get_dmcrypt_prefix(uuid, "");
string daemon_prefix =
"daemon-private/osd." + stringify(id) + "/";
@@ -416,6 +418,7 @@ void KVMonitor::do_osd_new(
const string& dmcrypt_key)
{
ceph_assert(paxos.is_plugged());
+ ceph_assert(is_writeable());
string dmcrypt_key_prefix = _get_dmcrypt_prefix(uuid, "luks");
bufferlist dmcrypt_key_value;