]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: respect the CEPH_ARGS environment variable. 43501/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 12 Oct 2021 11:25:20 +0000 (11:25 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 12 Oct 2021 13:47:38 +0000 (13:47 +0000)
Rook uses `CEPH_ARGS` to convey the `mon_host` configurable. Lack of
support for it was the root cause of inability to reach out to monitors.

See: https://gist.github.com/rzarzynski/95746aa73a48e811749a3b0aaeb31680#gistcomment-3924233.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/common/config_proxy.h
src/crimson/osd/main.cc

index e56a6825f41c33945056845891cbfe3fe534b5c8..e27db9b5bedf3d868de720f39efc579b7416fbe2 100644 (file)
@@ -179,6 +179,14 @@ public:
     });
   }
 
+  seastar::future<> parse_env() {
+    return do_change([this](ConfigValues& values) {
+      get_config().parse_env(CEPH_ENTITY_TYPE_OSD,
+                            values,
+                            obs_mgr);
+    });
+  }
+
   seastar::future<> parse_config_files(const std::string& conf_files);
 
   using ShardedConfig = seastar::sharded<ConfigProxy>;
index 596dea0b1f4e4df63bed614456e952e3332be4d1..18b7d520b889239079d26335ca1a554f6a06ebcb 100644 (file)
@@ -262,6 +262,7 @@ int main(int argc, char* argv[])
             sharded_perf_coll().stop().get();
           });
           local_conf().parse_config_files(conf_file_list).get();
+          local_conf().parse_env().get();
           local_conf().parse_argv(ceph_args).get();
           if (const auto ret = pidfile_write(local_conf()->pid_file);
               ret == -EACCES || ret == -EAGAIN) {