]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: use "ceph" for default cluster_name
authorKefu Chai <kchai@redhat.com>
Fri, 7 Aug 2020 08:28:30 +0000 (16:28 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 10 Aug 2020 14:51:17 +0000 (22:51 +0800)
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 <kchai@redhat.com>
src/crimson/osd/main.cc

index 9c31b9942e195dc1ef3677b1a00ec420e095a09e..d2b352723f5c206b0e298fceb0d51780667e4977 100644 (file)
@@ -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.