diff --git a/hooks/misc_utils.py b/hooks/misc_utils.py index 2b2e39c..43b8e4d 100644 --- a/hooks/misc_utils.py +++ b/hooks/misc_utils.py @@ -56,7 +56,8 @@ def ensure_block_device(block_device): if not is_block_device(bdev): log('Failed to locate valid block device at %s' % bdev, level=ERROR) - raise + # ignore missing block devices + return return bdev diff --git a/hooks/swift_storage_utils.py b/hooks/swift_storage_utils.py index 21afd50..af1fb89 100644 --- a/hooks/swift_storage_utils.py +++ b/hooks/swift_storage_utils.py @@ -164,7 +164,11 @@ def determine_block_devices(): else: bdevs = block_device.split(' ') - return [ensure_block_device(bd) for bd in bdevs] + # attempt to ensure block devices, but filter out missing devs + _none = ['None', 'none', None] + valid_bdevs = [x for x in map(ensure_block_device, bdevs) if x not in _none] + log('Valid ensured block devices: %s' % valid_bdevs) + return valid_bdevs def mkfs_xfs(bdev):