From: Guillaume Abrioux Date: Tue, 4 Feb 2020 21:02:26 +0000 (+0100) Subject: ceph-volume: fix has_bluestore_label() function X-Git-Tag: v14.2.8~36^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a095f5800bb076cb9363afcb5bfb72182ffe42de;p=ceph.git ceph-volume: fix has_bluestore_label() function When using vg/lv, this function throws an error like following: ``` stderr: unable to read label for test_group/data-lv2: (2) No such file or directory stderr: 2020-02-04T21:03:32.153+0000 7fe091af4200 -1 bluestore(test_group/data-lv2) _read_bdev_label failed to open test_group/data-lv2: (2) No such file or directory ``` using `self.abspath` fixes this error. Fixes: https://tracker.ceph.com/issues/43970 Signed-off-by: Guillaume Abrioux (cherry picked from commit 148069a20fef79ef8fe510f06879a0de02987eac) --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index 3974526c49ce..0bbfcf4e8e90 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -321,7 +321,7 @@ class Device(object): def has_bluestore_label(self): out, err, ret = process.call([ 'ceph-bluestore-tool', 'show-label', - '--dev', self.path]) + '--dev', self.abspath]) if ret: return False return True