New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mon: support for building without leveldb + mon mkfs bug fix #11800
Conversation
@@ -241,10 +236,14 @@ option(WITH_KVS "Key value store is here" ON) | |||
option(WITH_RBD "Remote block storage is here" ON) | |||
|
|||
option(WITH_LEVELDB "LevelDB is here" ON) | |||
if(${WITH_LEVELDB}) | |||
if(WITH_LEVELDB) | |||
if(LEVELDB_PREFIX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bassamtabbara could you indent the block in if(WITH_LEVELDB)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure.
@@ -140,7 +140,8 @@ int check_mon_data_empty() | |||
errno = 0; | |||
while ((de = ::readdir(dir))) { | |||
if (string(".") != de->d_name && | |||
string("..") != de->d_name) { | |||
string("..") != de->d_name && | |||
string("kv_backend") != de->d_name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bassamtabbara could you explain a little bit on what is the use case for this change? "kv_backend" is created when the monitor db is created, so its existence implies that the monitor db is already created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kv_backend is not being created correctly monitor db is created and looking and the PendingReleaseNotes I'm not sure if thats the intention.
With the described semantics I was unable to find a way to create monitor with rocksdb.
ceph-mon.mkfs calls store.create_and_open (here https://github.com/ceph/ceph/blob/master/src/ceph_mon.cc#L409) and that expects the kv_backend file to already exist (see https://github.com/ceph/ceph/blob/master/src/mon/MonitorDBStore.h#L642). If I create the kv_backend file then check_mon_data_emtpy (here https://github.com/ceph/ceph/blob/master/src/ceph_mon.cc#L129) fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense!
d677b05
to
f89484f
Compare
@tchaikov fixed the formatting issues and rebased. I verified this by removing |
f89484f
to
dcaf378
Compare
lgtm. |
dcaf378
to
3ef4c99
Compare
now that monitors support rocksdb, fix the build system to enable compiling without leveldb. kv_backend would need to be set correctly if you were to to use rocksdb for the monitors. Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
check_mon_data_empty required a completely empty dir. this made it impossible to mkfs a mondir that uses rocksdb given the requirement that kv_backend file exist in the mon datadir. Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
3ef4c99
to
7e8bf01
Compare
ceph#11800 uninternionally updated the civetweb submodule. Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
WITH_LEVELDB=OFF is now fully supported and we will not link leveldb anywhere.
Also fixed an issue that prevented mon mkfs from creating a rocksdb store.