From: Kefu Chai Date: Sat, 16 Mar 2019 02:47:20 +0000 (+0800) Subject: crimson/common: add ConfigProxy::parse_argv() X-Git-Tag: v15.0.0~188^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ac310c39e808084cacbccf71e5c4e7937e682ca;p=ceph.git crimson/common: add ConfigProxy::parse_argv() it's only used by crimson-osd for parsing ceph options. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/common/config_proxy.h b/src/crimson/common/config_proxy.h index 46690009cb64..0e6dae72991a 100644 --- a/src/crimson/common/config_proxy.h +++ b/src/crimson/common/config_proxy.h @@ -147,6 +147,20 @@ public: }); } + seastar::future<> parse_argv(std::vector& argv) { + // we could pass whatever is unparsed to seastar, but seastar::app_template + // is used for driving the seastar application, and + // ceph::common::ConfigProxy is not available until seastar engine is up + // and running, so we have to feed the command line args to app_template + // first, then pass them to ConfigProxy. + return do_change([&argv, this](ConfigValues& values) { + get_config().parse_argv(values, + obs_mgr, + argv, + CONF_CMDLINE); + }); + } + seastar::future<> parse_config_files(const std::string& conf_files) { return do_change([this, conf_files](ConfigValues& values) { const char* conf_file_paths =