mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
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 <sage@redhat.com>
This commit is contained in:
parent
c26c80fd10
commit
42a6b0efe1
@ -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
|
||||
------
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user