From: Rongqi Sun Date: Fri, 24 Mar 2023 09:29:35 +0000 (+0800) Subject: cephadm: add default conf and fix objectstore case. X-Git-Tag: v19.0.0~1274^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=171b1d47f20768ae83b324dfabc7bda7b73eacd1;p=ceph.git cephadm: add default conf and fix objectstore case. Signed-off-by: Rongqi Sun --- diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 7342ee20bd7..fb2d400b3a0 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -1241,6 +1241,8 @@ class CephadmServe: if index != 0: final_conf = final_conf[:index] + objectstore_str + final_conf[index:] daemon_spec.final_config['config'] = final_conf + else: + daemon_spec.extra_args.extend(['--objectstore', 'bluestore']) if reconfig: daemon_spec.extra_args.append('--reconfig') diff --git a/src/pybind/mgr/cephadm/tests/test_cephadm.py b/src/pybind/mgr/cephadm/tests/test_cephadm.py index 7675c120ec7..bcaaecd6fa6 100644 --- a/src/pybind/mgr/cephadm/tests/test_cephadm.py +++ b/src/pybind/mgr/cephadm/tests/test_cephadm.py @@ -120,7 +120,7 @@ def with_osd_daemon(cephadm_module: CephadmOrchestrator, _run_cephadm, host: str ['--', 'lvm', 'list', '--format', 'json'], no_fsid=False, error_ok=False, image='', log_output=True), mock.call(host, f'osd.{osd_id}', 'deploy', ['--name', f'osd.{osd_id}', '--meta-json', mock.ANY, - '--config-json', '-', '--osd-fsid', 'uuid'], + '--config-json', '-', '--osd-fsid', 'uuid', '--objectstore', 'bluestore'], stdin=mock.ANY, image=''), mock.call(host, 'osd', 'ceph-volume', ['--', 'raw', 'list', '--format', 'json'], no_fsid=False, error_ok=False, image='', log_output=True),