From: Radoslaw Zarzynski Date: Tue, 12 Oct 2021 11:25:20 +0000 (+0000) Subject: crimson: respect the CEPH_ARGS environment variable. X-Git-Tag: v17.1.0~707^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7b75040d257f599d760d830c0431e55615654026;p=ceph-ci.git crimson: respect the CEPH_ARGS environment variable. 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 --- diff --git a/src/crimson/common/config_proxy.h b/src/crimson/common/config_proxy.h index e56a6825f41..e27db9b5bed 100644 --- a/src/crimson/common/config_proxy.h +++ b/src/crimson/common/config_proxy.h @@ -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; diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index 596dea0b1f4..18b7d520b88 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -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) {