From c4eee9f1968bedceacc47c07253aeb2ee4073a3b Mon Sep 17 00:00:00 2001 From: Victor Denisov Date: Mon, 24 Oct 2016 16:50:19 -0700 Subject: [PATCH] rbd: fix parsing of group and image specific pools Signed-off-by: Victor Denisov --- src/tools/rbd/Utils.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/rbd/Utils.cc b/src/tools/rbd/Utils.cc index 16de4666f0e7..4fd0ca79323f 100644 --- a/src/tools/rbd/Utils.cc +++ b/src/tools/rbd/Utils.cc @@ -210,7 +210,7 @@ int get_special_pool_group_names(const po::variables_map &vm, } } - if (group_pool_name->empty()) { + if (group_pool_name->empty() && vm.count(pool_key)) { *group_pool_name = vm[pool_key].as(); } @@ -259,7 +259,7 @@ int get_special_pool_image_names(const po::variables_map &vm, } } - if (image_pool_name->empty()) { + if (image_pool_name->empty() && vm.count(pool_key)) { *image_pool_name = vm[pool_key].as(); } -- 2.47.3