From 42a6b0efe1a3269c8e6c10e89f92bc0f28923af2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 6 Oct 2016 14:02:07 -0400 Subject: [PATCH] mon: assume old mons that didn't specific kv type are leveldb This assumes that if the mon does not explicitly specify the kv type that it is leveldb. No prior version of Ceph has had non-experimental rocksdb, so this is relatively safe. It's also necessary because the default is now 'rocksdb' and we shouldn't assume those old mons are rocksdb. This will break for users to explicitly specified rocksdb for the mon despite it being experimental. Signed-off-by: Sage Weil --- PendingReleaseNotes | 9 +++++++++ src/mon/MonitorDBStore.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index f842558f2670..0bbc2aa25f4b 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -35,6 +35,15 @@ 1 }. +* If your monitors are configured to use the experimental rocksdb + backend, you may need to manually adjust the store before upgraded. + Monitors now explicitly record what keyvalue backend type they use. If + the kv_backend file is missing from the mon_data directory (normally + /var/lib/ceph/mon/$cluster-$name/kv_backend) it is now assumed to be leveldb. + If you had manually configured the mon to use rocksdb, this file should + be created and filled with the string "rocksdb" (newline optional). + + 11.0.0 ------ diff --git a/src/mon/MonitorDBStore.h b/src/mon/MonitorDBStore.h index 0acbfbe36e25..24c56bb9f078 100644 --- a/src/mon/MonitorDBStore.h +++ b/src/mon/MonitorDBStore.h @@ -644,7 +644,8 @@ class MonitorDBStore string kv_type; int r = read_meta("kv_backend", &kv_type); if (r < 0) { - kv_type = g_conf->mon_keyvaluedb; + // assume old monitors that did not mark the type were leveldb. + kv_type = "leveldb"; r = write_meta("kv_backend", kv_type); if (r < 0) return r; -- 2.47.3