Specify a keyring for use with ``--mkfs``.
+.. option:: --no-config-file
+
+ Signal that we don't want to rely on a *ceph.conf*, either user provided
+ or the default, to run the daemon. This will entail providing all
+ necessary options to the daemon as arguments.
Availability
============
else if (ceph_argparse_witharg(args, i, &val, "--conf", "-c", (char*)NULL)) {
*conf_file_list = val;
}
+ else if (ceph_argparse_flag(args, i, "--no-config-file", (char*)NULL)) {
+ iparams.no_config_file = true;
+ }
else if (ceph_argparse_witharg(args, i, &val, "--cluster", (char*)NULL)) {
*cluster = val;
}
uint32_t module_type;
EntityName name;
+ bool no_config_file = false;
};
/////////////////////// Functions ///////////////////////
conf.set_val_default("log_flush_on_exit", "false");
}
+ conf.set_val("no_config_file", iparams.no_config_file ? "true" : "false");
+
return cct;
}
#endif // #ifndef WITH_SEASTAR
.set_flag(Option::FLAG_STARTUP)
.set_default("ceph/daemon-base:latest-master-devel"),
+ Option("no_config_file", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .set_flag(Option::FLAG_NO_MON_UPDATE)
+ .set_flag(Option::FLAG_STARTUP)
+ .add_service("common")
+ .add_tag("config")
+ .set_description("signal that we don't require a config file to be present")
+ .set_long_description("When specified, we won't be looking for a "
+ "configuration file, and will instead expect that "
+ "whatever options or values are required for us to "
+ "work will be passed as arguments."),
+
// lockdep
Option("lockdep", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_description("enable lockdep lock dependency analyzer")
}
}
+ if (conf.get_val<bool>("no_config_file")) {
+ flags |= CINIT_FLAG_NO_DEFAULT_CONFIG_FILE;
+ }
+
int ret = conf.parse_config_files(c_str_or_null(conf_file_list),
&cerr, flags);
if (ret == -EDOM) {
<< conf_file_list << std::endl;
_exit(1);
} else {
- cerr << "did not load config file, using default settings." << std::endl;
+ cerr << "did not load config file, using default settings."
+ << std::endl;
}
}
}