From: Erwan Velu Date: Wed, 10 Oct 2018 18:26:01 +0000 (+0200) Subject: ceph_volume: Checking device validity at init time X-Git-Tag: v13.2.3~90^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F24782%2Fhead;p=ceph.git ceph_volume: Checking device validity at init time When initializing the Device structure, it have to run is_valid() to ensure the data structures (_is_valid & rejected_reasons) to be populated accordingly to the device state. Signed-off-by: Erwan Velu (cherry picked from commit ef0ceef7c717ef615dc214299cb4a6b32c1edbe6) --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index a8b236fd1ee1..96cf2b12a7c1 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -22,6 +22,7 @@ class Device(object): self._valid = False self._rejected_reasons = [] self._parse() + self.is_valid def _parse(self): # start with lvm since it can use an absolute or relative path