From: Guillaume Abrioux Date: Tue, 8 Aug 2023 15:04:17 +0000 (+0000) Subject: cephadm: add new config option X-Git-Tag: v19.0.0~564^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e98ec820cf3acd1711d09e63ec5df8787a369cef;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 --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 6d95ff476604..3b7c8ff7c0d3 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', @@ -542,6 +549,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 f6a5425f2a14..d9e641aaca27 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -378,11 +378,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: