From: Guillaume Abrioux Date: Tue, 8 Aug 2023 15:04:17 +0000 (+0000) Subject: cephadm: add new config option X-Git-Tag: v18.2.1~314^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa526b031d431cc1dd13cd314e6aa893d1bcab49;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 e493d6e63323..5abfc240f64c 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -167,6 +167,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', @@ -543,6 +550,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 22b60f34c356..43cdfcad2b5e 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -379,11 +379,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: