From: Paul Cuzner Date: Fri, 22 Oct 2021 02:29:30 +0000 (+1300) Subject: cephadm: exclude zram and cdrom from device list X-Git-Tag: v17.1.0~538^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e7d474e1ae6eb8029a6a7d6c3f6322c4908911e;p=ceph.git cephadm: exclude zram and cdrom from device list When compiling eligible block devices, we need to exclude zram* and cdrom (srX) devices. Fixes: https://tracker.ceph.com/issues/52905 Signed-off-by: Paul Cuzner --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index e068e52498dd..f05e33e3751f 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -6743,6 +6743,7 @@ class HostFacts(): _disk_vendor_workarounds = { '0x1af4': 'Virtio Block Device' } + _excluded_block_devices = ('sr', 'zram', 'dm-') def __init__(self, ctx: CephadmContext): self.ctx: CephadmContext = ctx @@ -6782,7 +6783,7 @@ class HostFacts(): # type: () -> List[str] """Determine the list of block devices by looking at /sys/block""" return [dev for dev in os.listdir('/sys/block') - if not dev.startswith('dm')] + if not dev.startswith(HostFacts._excluded_block_devices)] def _get_devs_by_type(self, rota='0'): # type: (str) -> List[str]