From: Guillaume Abrioux Date: Tue, 8 Aug 2023 15:04:17 +0000 (+0000) Subject: cephadm: add new config option X-Git-Tag: v17.2.7~138^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1cf68800dc35a3679f15f8519a268ff4cced274f;p=ceph.git cephadm: add new config option This adds a new config option 'inventory_list_all' so one can make the command `ceph orch device ls` report lvm devices too as they are valid devices that can be used to be prepared as OSDs. Signed-off-by: Guillaume Abrioux (cherry picked from commit e98ec820cf3acd1711d09e63ec5df8787a369cef) --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index d35466c11dc2b..3fdbb64f9c316 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -156,6 +156,13 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, default=False, desc='Use libstoragemgmt during device scans', ), + Option( + 'inventory_list_all', + type='bool', + default=False, + desc='Whether ceph-volume inventory should report ' + 'more devices (mostly mappers (LVs / mpaths), partitions...)', + ), Option( 'daemon_cache_timeout', type='secs', @@ -487,6 +494,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, self.apply_spec_fails: List[Tuple[str, str]] = [] self.max_osd_draining_count = 10 self.device_enhanced_scan = False + self.inventory_list_all = False self.cgroups_split = True self.log_refresh_metadata = False self.default_cephadm_command_timeout = 0 diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index b29fb5e4586f8..c4de9cf39a80c 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -334,11 +334,14 @@ class CephadmServe: def _refresh_host_devices(self, host: str) -> Optional[str]: with_lsm = self.mgr.device_enhanced_scan + list_all = self.mgr.inventory_list_all inventory_args = ['--', 'inventory', '--format=json-pretty', '--filter-for-batch'] if with_lsm: inventory_args.insert(-1, "--with-lsm") + if list_all: + inventory_args.insert(-1, "--list-all") try: try: