else if (ceph_argparse_witharg(args, i, &val, "--conf", "-c", (char*)NULL)) {
*conf_file_list = val;
}
- else if (ceph_argparse_flag(args, i, "--no-mon-config", (char*)NULL)) {
- iparams.no_mon_config = true;
- }
else if (ceph_argparse_witharg(args, i, &val, "--cluster", (char*)NULL)) {
*cluster = val;
}
uint32_t module_type;
EntityName name;
-
- bool no_mon_config = false;
};
/////////////////////// Functions ///////////////////////
else if (ceph_argparse_witharg(args, i, &val, "--show_config_value", (char*)NULL)) {
do_show_config_value = val;
}
+ else if (ceph_argparse_flag(args, i, "--no-mon-config", (char*)NULL)) {
+ no_mon_config = true;
+ }
else if (ceph_argparse_flag(args, i, "--foreground", "-f", (char*)NULL)) {
set_val_or_die("daemonize", "false");
}
/// cluster name
string cluster;
+ bool no_mon_config = false;
+
// This macro block defines C members of the md_config_t struct
// corresponding to the definitions in legacy_config_opts.h.
// These C members are consumed by code that was written before
CephInitParameters iparams = ceph_argparse_early_args(
args, module_type,
&cluster, &conf_file_list);
- if (flags & (CINIT_FLAG_NO_DEFAULT_CONFIG_FILE|
- CINIT_FLAG_NO_MON_CONFIG)) {
- iparams.no_mon_config = true;
- }
CephContext *cct = common_preinit(iparams, code_env, flags);
cct->_conf->cluster = cluster;
global_init_set_globals(cct);
md_config_t *conf = cct->_conf;
+ if (flags & (CINIT_FLAG_NO_DEFAULT_CONFIG_FILE|
+ CINIT_FLAG_NO_MON_CONFIG)) {
+ conf->no_mon_config = true;
+ }
+
// alternate defaults
if (defaults) {
for (auto& i : *defaults) {
// command line (as passed by caller)
conf->parse_argv(args);
- if (!iparams.no_mon_config) {
+ if (!conf->no_mon_config) {
MonClient mc_bootstrap(g_ceph_context);
if (mc_bootstrap.get_monmap_and_config() < 0) {
derr << "failed to fetch mon config (--no-mon-config to skip)" << dendl;