]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph_mon: check for existing mon store before opening db 2197/head
authorJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 4 Aug 2014 14:27:50 +0000 (14:27 +0000)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Mon, 18 Aug 2014 16:22:42 +0000 (17:22 +0100)
commit948178aa6d2fd449e3f873b5edac0d552bacff9c
tree93b19dd79a1abb22c637e28bd8e3f01735469ff8
parent055be68cf8e1b84287ab3631a02e89a9f3ae6cca
ceph_mon: check for existing mon store before opening db

This will make sure that the monitor data directory is populated before
proceeding to opening it up.  We have to do this in order to work around
leveldb, which will create 'store.db' (even though it won't populate it)
upon opening the database.  Unwillingly, running the monitor without
first issuing a mkfs would have us ending up with a 'store.db' in the
monitor's data directory, and later on we would get errors from the
monitor not finding magic values within the store -- which given mkfs
hadn't been run isn't surprising.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/ceph_mon.cc