CephInitParameters ceph_argparse_early_args
(std::vector<const char*>& args, uint32_t module_type, int flags,
- std::string *conf_file_list)
+ std::string *cluster, std::string *conf_file_list)
{
CephInitParameters iparams(module_type);
std::string val;
else if (ceph_argparse_witharg(args, i, &val, "--conf", "-c", (char*)NULL)) {
*conf_file_list = val;
}
+ else if (ceph_argparse_witharg(args, i, &val, "--cluster", "-C", (char*)NULL)) {
+ *cluster = val;
+ }
else if ((module_type != CEPH_ENTITY_TYPE_CLIENT) &&
(ceph_argparse_witharg(args, i, &val, "-i", (char*)NULL))) {
iparams.name.set_id(val);
std::ostream *oss, ...);
extern CephInitParameters ceph_argparse_early_args
(std::vector<const char*>& args, uint32_t module_type, int flags,
- std::string *conf_file_list);
+ std::string *cluster, std::string *conf_file_list);
extern bool ceph_argparse_withint(std::vector<const char*> &args,
std::vector<const char*>::iterator &i, int *ret,
std::ostream *oss, ...);
// You can only call global_init once.
assert(!g_ceph_context);
std::string conf_file_list;
+ std::string cluster = "ceph";
CephInitParameters iparams = ceph_argparse_early_args(args, module_type, flags,
- &conf_file_list);
+ &cluster, &conf_file_list);
CephContext *cct = common_preinit(iparams, code_env, flags);
+ cct->_conf->cluster = cluster;
global_init_set_globals(cct);
md_config_t *conf = cct->_conf;
-
if (alt_def_args)
conf->parse_argv(*alt_def_args); // alternative default args