summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemons/lvmdbusd/lvmdb.py.in5
-rw-r--r--daemons/lvmdbusd/objectmanager.py7
2 files changed, 7 insertions, 5 deletions
diff --git a/daemons/lvmdbusd/lvmdb.py.in b/daemons/lvmdbusd/lvmdb.py.in
index 8d0cc59e1..41fedb80f 100644
--- a/daemons/lvmdbusd/lvmdb.py.in
+++ b/daemons/lvmdbusd/lvmdb.py.in
@@ -360,10 +360,13 @@ class DataStore(object):
return rc
def pv_missing(self, pv_uuid):
+ # The uuid might not be a PV, default to false
if pv_uuid in self.pvs:
if self.pvs[pv_uuid]['pv_missing'] == '':
return False
- return True
+ else:
+ return True
+ return False
def fetch_vgs(self, vg_name):
if not vg_name:
diff --git a/daemons/lvmdbusd/objectmanager.py b/daemons/lvmdbusd/objectmanager.py
index b84e16904..f9586ec9a 100644
--- a/daemons/lvmdbusd/objectmanager.py
+++ b/daemons/lvmdbusd/objectmanager.py
@@ -300,10 +300,9 @@ class ObjectManager(AutomatedProperties):
# If a PV is missing its device path is '[unknown]' or some
# other text derivation of unknown. When we find that a PV is
- # missing we will clear out the lvm_id as it's likely not unique
- # and thus not useful and potentially harmful for lookups.
- if path_create == pv_obj_path_generate and \
- cfg.db.pv_missing(uuid):
+ # missing we will clear out the lvm_id as it's not unique
+ # and thus not useful and harmful for lookups.
+ if cfg.db.pv_missing(uuid):
lvm_id = None
# Lets check for the uuid first