rbd-ggate: honor rbd_default_pool config setting

Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
This commit is contained in:
Mykola Golub 2017-12-25 09:11:24 +00:00
parent 2113ebe02d
commit 412a3c4cb6

View File

@ -47,7 +47,7 @@ static void usage() {
generic_server_usage();
}
static std::string devpath, poolname("rbd"), imgname, snapname;
static std::string devpath, poolname, imgname, snapname;
static bool readonly = false;
static bool exclusive = false;
@ -106,6 +106,10 @@ static int do_map(int argc, const char *argv[])
common_init_finish(g_ceph_context);
global_init_chdir(g_ceph_context);
if (poolname.empty()) {
poolname = g_ceph_context->_conf->get_val<std::string>("rbd_default_pool");
}
std::string devname = (devpath.compare(0, 5, "/dev/") == 0) ?
devpath.substr(5) : devpath;
std::unique_ptr<rbd::ggate::Watcher> watcher;