crushtool: Add call to global_init() to avoid dout segfault
PATCH 1/1 crushtool: Add call to global_init() to avoid dout segfault
--- src/crushtool.cc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
src/crushtool.cc +4 -0
@@ -845,6 +845,10 @@ int main(int argc, const char **argv) map<int, int> device_weight; DEFINE_CONF_VARS(usage); + global_init(args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, + CINIT_FLAG_NO_DEFAULT_CONFIG_FILE); + common_init_finish(g_ceph_context); + FOR_EACH_ARG(args) { if (CEPH_ARGPARSE_EQ("clobber", '\0')) { clobber = true;
Signature · 1 line
1.7.1
Hey Colin,
I applied this to stable, but now crushtool is trying to read ceph.conf, despite CINIT_FLAG_NO_DEFAULT_CONFIG_FILE... I fixed it up in wip-default-conf, can you take a look?
thanks!
sage
Quoted 31 lines · Jim Schutt
Signed-off-by Jim Schutt <[email protected]>--- src/crushtool.cc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)src/crushtool.cc +4
-0@@ -845,6 +845,10 @@ int main(int argc, const char **argv) map<int, int> device_weight; DEFINE_CONF_VARS(usage); + global_init(args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, + CINIT_FLAG_NO_DEFAULT_CONFIG_FILE); + common_init_finish(g_ceph_context); + FOR_EACH_ARG(args) { if (CEPH_ARGPARSE_EQ("clobber", '\0')) { clobber = true;Signature · 7 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Just to follow up on this thread, this was resolved by 56abfd89615c77287f091679e6be59045f05081a.
And thanks for the patch, Jim.
cheers,
Colin
Quoted 37 lines · Sage Weil
Hey Colin,
I applied this to stable, but now crushtool is trying to read ceph.conf, despite
CINIT_FLAG_NO_DEFAULT_CONFIG_FILE... I fixed it up in wip-default-conf, can you take a look?thanks!
sageQuoted 25 lines · Jim Schutt
Signed-off-by Jim Schutt <[email protected]>---
src/crushtool.cc | 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)src/crushtool.cc +4
-1@@ -845,6 +845,10 @@ int main(int argc, const char **argv) map<int, int> device_weight; DEFINE_CONF_VARS(usage); + global_init(args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, + CINIT_FLAG_NO_DEFAULT_CONFIG_FILE); + common_init_finish(g_ceph_context); + FOR_EACH_ARG(args) { if (CEPH_ARGPARSE_EQ("clobber", '\0')) { clobber = true; --1.7.1
Quoted 7 lines
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html