}
else if (ret == -EINVAL) {
if (!(flags & CINIT_FLAG_NO_DEFAULT_CONFIG_FILE)) {
- dout_emergency("global_init: unable to open config file.\n");
- _exit(1);
+ if (conf_file_list.length()) {
+ dout_emergency("global_init: unable to open config file.\n");
+ _exit(1);
+ } else {
+ derr <<"did not load config file, using default settings." << dendl;
+ }
}
}
else if (ret) {
g_lockdep = cct->_conf->lockdep;
// Now we're ready to complain about config file parse errors
- complain_about_parse_errors(cct, &parse_errors);
+ if (conf_file_list.length()) {
+ complain_about_parse_errors(cct, &parse_errors);
+ }
// signal stuff
int siglist[] = { SIGPIPE, 0 };
# we can use CEPH_CONF to override the normal configuration file location.
$ env CEPH_CONF=from-env ceph-conf -s foo bar
- global_init: unable to open config file. (re)
+ .* \-1 did not load config file, using default settings. (re)
[1]
# command-line arguments should override environment