From 9620f1c7fa90923c7659108ed29f1a64b9787d20 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Wed, 10 Oct 2018 20:26:01 +0200 Subject: [PATCH] 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) --- src/ceph-volume/ceph_volume/util/device.py | 1 + 1 file changed, 1 insertion(+) 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 -- 2.47.3