From: Radoslaw Zarzynski Date: Tue, 5 Jul 2022 12:20:23 +0000 (+0000) Subject: crimson/osd: fix ignoring --no-mon-config X-Git-Tag: v18.0.0~564^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=38cb07c756efbdeab6eb7e66507ac6eebd64715f;p=ceph.git crimson/osd: fix ignoring --no-mon-config Before we were treating the `--no-mon-config` as one of the `seastar_n_early_args`. However, this was wrong as it truly belongs to `config_proxy_args` as: ```cpp int md_config_t::parse_argv(ConfigValues& values, const ConfigTracker& tracker, std::vector& args, int level) { // ... else if (ceph_argparse_flag(args, i, "--no-mon-config", (char*)NULL)) { values.no_mon_config = true; } // ... } ``` The net result of this ignoring `--no-mon-config` which was the reason behind many dead jobs at Sepia. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index 7a36176c735f7..98d3a2e9f2d10 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -202,7 +202,6 @@ int main(int argc, const char* argv[]) ("mkfs", "create a [new] data directory") ("debug", "enable debug output on all loggers") ("trace", "enable trace output on all loggers") - ("no-mon-config", "do not retrieve configuration from monitors on boot") ("prometheus_port", bpo::value()->default_value(0), "Prometheus port. Set to zero to disable") ("prometheus_address", bpo::value()->default_value("0.0.0.0"), @@ -313,10 +312,10 @@ int main(int argc, const char* argv[]) if (config.count("mkkey")) { make_keyring().get(); } - if (config.count("no-mon-config") == 0) { - fetch_config().get(); - } else { + if (local_conf()->no_mon_config) { logger().info("bypassing the config fetch due to --no-mon-config"); + } else { + fetch_config().get(); } if (config.count("mkfs")) { auto osd_uuid = local_conf().get_val("osd_uuid");