From: Sage Weil Date: Wed, 26 May 2021 12:07:21 +0000 (-0500) Subject: ceph-volume: replace __ with _ in device_id X-Git-Tag: v17.1.0~1754^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=42d23c9fea4646aea7294b8444acb5047c1eef75;p=ceph.git ceph-volume: replace __ with _ in device_id This matches behavior with common/blkdev from 5ee787944b0d00ce3bb6766f5b176e971eff91f9 Signed-off-by: Sage Weil --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index 1e4249e43982..3dcb434184d1 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -257,7 +257,9 @@ class Device(object): # retrieve device_id on FreeBSD. Still figuring out if/how the # python ioctl implementation does that on FreeBSD dev_id = '' - dev_id.replace(' ', '_') + dev_id = dev_id.replace(' ', '_') + while '__' in dev_id: + dev_id = dev_id.replace('__', '_') return dev_id def _set_lvm_membership(self):