]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: fix mon_keyvaluedb application 15059/head
authorSage Weil <sage@redhat.com>
Fri, 12 May 2017 13:31:56 +0000 (09:31 -0400)
committerSage Weil <sage@redhat.com>
Fri, 12 May 2017 13:31:56 +0000 (09:31 -0400)
commit675f6d9d880cecda3306a5f8ba72777d4affeca7
tree4cb83b196c9511cde02b37b6e3bd31528c635be0
parentbc6e9a304c10ec28f538b89c879f205d02174ead
mon: fix mon_keyvaluedb application

In 42a6b0efe1a3269c8e6c10e89f92bc0f28923af2 I mistakenly thought that
create_or_open was the path taken for normal open (not during mkfs) and
made it assume a missing kv_type meant leveldb.  In reality, this is the
only path where mon_keyvaluedb is ever used (during mkfs), and
create_or_open is only called during mkfs.  The bug I was (probably?)
trying to fix was that regular open() did not write out a kv_type file
(with the assumption of leveldb) if it was missing.  As a result, the
previous fix was forcing all mons to be leveldb.

Fix this by reverting the create_or_open hunk (so that we express
mon_keyvaluedb on mkfs), and fixing the normal open path to write kv_type
if it is missing.  This effectively switches the mon back to rocksdb by
default (and allows teuthology to test both rocksdb and leveldb by setting
the option).

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonitorDBStore.h