]> sourceware.org Git - lvm2.git/commit
lvmdbusd: Correct get_object_path_by_uuid_lvm_id
authorTony Asleson <tasleson@redhat.com>
Tue, 20 Sep 2022 16:40:15 +0000 (11:40 -0500)
committerTony Asleson <tasleson@redhat.com>
Tue, 20 Sep 2022 21:36:53 +0000 (16:36 -0500)
commitd88998f5163f84aa7305edfeb9ec51dc5b0c6733
tree150dbe0aa86cccff8048954601fb537c7b23eaa6
parenta0fc61177e1fc39a312c623c4fa3639f8b96f7b2
lvmdbusd: Correct get_object_path_by_uuid_lvm_id

When checking to see if the PV is missing we incorrectly checked that the
path_create was equal to PV creation.  However, there are cases where we
are doing a lookup where the path_create == None.  In this case, we would
fail to set lvm_id == None which caused a problem as we had more than 1
PV that was missing.  When this occurred, the second lookup matched the
first missing PV that was added to the object manager.  This resulted in
the following:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/lvmdbusd/utils.py", line 667, in _run
    self.rc = self.f(*self.args)
  File "/usr/lib/python3.9/site-packages/lvmdbusd/fetch.py", line 25, in _main_thread_load
    (changes, remove) = load_pvs(
  File "/usr/lib/python3.9/site-packages/lvmdbusd/pv.py", line 46, in load_pvs
    return common(
  File "/usr/lib/python3.9/site-packages/lvmdbusd/loader.py", line 55, in common
    del existing_paths[dbus_object.dbus_object_path()]

Because we expect to find the object in existing_paths if we found it in
the lookup.

resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2085078
daemons/lvmdbusd/lvmdb.py.in
daemons/lvmdbusd/objectmanager.py
This page took 0.028658 seconds and 5 git commands to generate.