At the moment, config parsing errors aren't printed by "global_init",
so the message shown to the user can be a bit cryptic.
This change will ensure that those parsing errors will be printed.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
bool has_parse_error() const {
return !config.parse_error.empty();
}
+ std::string get_parse_error() {
+ return config.parse_error;
+ }
void complain_about_parse_error(CephContext *cct) {
return config.complain_about_parse_error(cct);
}
}
else if (ret) {
cct->_log->flush();
- cerr << "global_init: error reading config file." << std::endl;
+ cerr << "global_init: error reading config file. "
+ << conf.get_parse_error() << std::endl;
_exit(1);
}