]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
tools/ceph_conf: s/global_pre_init/global_init/
authorKefu Chai <kchai@redhat.com>
Tue, 16 Jul 2019 03:34:23 +0000 (11:34 +0800)
committerBrad Hubbard <bhubbard@redhat.com>
Mon, 14 Dec 2020 02:07:04 +0000 (12:07 +1000)
commit339ef6a306802b0f712464beeaae57329140d15f
treea7c56f6140b7202efd1660afb7f4e60876bf7c63
parent7148b7c3ae254fbc7796ae63d86ea681c68e0d88
tools/ceph_conf: s/global_pre_init/global_init/

we switched over from `global_init()` to `global_pre_init()` in
fc1a424e837bee139726eec333c9efd65e2abb6a to address
http://tracker.ceph.com/issues/7849 .

but this change prevents us from moving the
`mc_bootstrap.get_monmap_and_config()` call from `global_pre_init()` to
`global_init()`, as the call utilizes the transport layer. see
https://tracker.ceph.com/issues/39238.

so it'd better to avoid accessing a previously opened fd after
credentials change.

in this change,

* a default "log_to_file"="false" setting is passed to
  `global_init()` to disable the logging subsystem from creating a log
  file.
* use a lambda for initializing `cct`, so no need to have a copy of the
  original args
* remove `apply_changes()` and `complain_about_parse_error()` calls,
  as they are already taken care of by `global_init()`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 031ddc34b1d0a74765de22280e4e3cdb37765405)

 Conflicts:
src/tools/ceph_conf.cc: Trivial function name change
src/tools/ceph_conf.cc