]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson: pass entity_name and cluster to ctor of ConfigProxy
authorKefu Chai <kchai@redhat.com>
Wed, 28 Nov 2018 12:55:44 +0000 (20:55 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 17 Jan 2019 12:23:12 +0000 (20:23 +0800)
commit6621f799972ffed31d1c0e1199ef88d7c38273e7
tree14703b6bbab0281cbb841c10dc77a08fa5f2d9fa
parent61d41cf099d9385e321124c70ab36a3c5463f1fa
crimson: pass entity_name and cluster to ctor of ConfigProxy

as we always need to set entity_name and cluster before start using
ConfigProxy, and we do not read these settings from config file,
this makes these two setting special. so it'd be simpler to just
pass them as parameters of constructor.

and more importantly, we need to parse the command line arguments
using ceph_argparse_early_args() first, as it will consume the parsed
arguments, and leave the unparsed ones in the input parameter of `args`,
and then, we can pass the unparsed args to app.run().

it's not a perfect solution. as there are some options that both parsers
are interested, for instance, `-c` -- ceph take it as the conf file's
path, while seastar takes it as the number of cores to use. but let's
feed ceph's parser first. unless it's fine to drop the backward
compatibility of command line syntax of ceph-osd.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/common/config_proxy.cc
src/crimson/common/config_proxy.h
src/test/crimson/test_config.cc
src/test/crimson/test_monc.cc