Skip to content

Commit

Permalink
mon: improve error message when get pool option
Browse files Browse the repository at this point in the history
Signed-off-by: Chang Liu <liuchang0812@gmail.com>
(cherry picked from commit b4ba96f)
  • Loading branch information
liuchang0812 authored and Prashant D committed Mar 14, 2018
1 parent dfe054a commit 19d7d14
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mon/OSDMonitor.cc
Expand Up @@ -4724,6 +4724,13 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
goto reply;
}

if (pool_opts_t::is_opt_name(var) &&
!p->opts.is_set(pool_opts_t::get_opt_desc(var).key)) {
ss << "option '" << var << "' is not set on pool '" << poolstr << "'";
r = -ENOENT;
goto reply;
}

selected_choices.insert(selected);
}

Expand Down

0 comments on commit 19d7d14

Please sign in to comment.