From: Kefu Chai Date: Fri, 7 Aug 2020 08:28:30 +0000 (+0800) Subject: crimson/osd: use "ceph" for default cluster_name X-Git-Tag: wip-pdonnell-testing-20200918.022351~405^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=27036004302c29735f40e029242fd14b7d1c8338;p=ceph-ci.git crimson/osd: use "ceph" for default cluster_name for couple reasons: * to avoid the pain to guess / update the cluster name when loading conf file. in the past, we use "ceph" as a fallback for the cluster name, which is in turn used as a meta name when expanding setting values containing "$cluster". so to ensure those settings continue working, we have to at least set cluster_name a safe value, and "ceph" is what we've been using. * in http://lists.ceph.com/pipermail/ceph-users-ceph.com/2017-June/018519.html, we decided to drop the cluster_name support in deploy tools, and to keep this feature in code. so in the long run, we can assume new clusters will be all named "ceph". * it's difficult to properly implement the feature to use "ceph", if no --conf option is specified, as, in Ceph, even the path pointing to conf file is allowed to contain "$cluster". so, to get it right, we need to update cluster name stored in options before reading the option files, this forces us to populate the setting twice when reading the settings from a conf file. or we could specialize the process, but i don't think it worthy of the efforts. so i think we can just use "ceph" for the cluster name in crimson. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index 9c31b9942e1..d2b352723f5 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -133,7 +133,7 @@ int main(int argc, char* argv[]) usage(argv[0]); return EXIT_SUCCESS; } - std::string cluster_name; + std::string cluster_name{"ceph"}; std::string conf_file_list; // ceph_argparse_early_args() could _exit(), while local_conf() won't ready // until it's started. so do the boilerplate-settings parsing here.