1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-09 01:18:39 +03:00
lvm2/daemons/lvmdbusd
Tony Asleson f70d97b916 lvmdbusd: Defer dbus object removal
When we are walking the new lvm state comparing it to the old state we can
run into an issue where we remove a VG that is no longer present from the
object manager, but is still needed by LVs that are left to be processed.
When we try to process existing LVs to see if their state needs to be
updated, or if they need to be removed, we need to be able to reference the
VG that was associated with it.  However, if it's been removed from the
object manager we fail to find it which results in:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/lvmdbusd/utils.py", line 666, in _run
  self.rc = self.f(*self.args)
File "/usr/lib/python3.6/site-packages/lvmdbusd/fetch.py", line 36, in _main_thread_load
  cache_refresh=False)[1]
File "/usr/lib/python3.6/site-packages/lvmdbusd/lv.py", line 146, in load_lvs
  lv_name, object_path, refresh, emit_signal, cache_refresh)
File "/usr/lib/python3.6/site-packages/lvmdbusd/loader.py", line 68, in common
  num_changes += dbus_object.refresh(object_state=o)
File "/usr/lib/python3.6/site-packages/lvmdbusd/automatedproperties.py", line 160, in refresh
  search = self.lvm_id
File "/usr/lib/python3.6/site-packages/lvmdbusd/lv.py", line 483, in lvm_id
  return self.state.lvm_id
File "/usr/lib/python3.6/site-packages/lvmdbusd/lv.py", line 173, in lvm_id
  return "%s/%s" % (self.vg_name_lookup(), self.Name)
File "/usr/lib/python3.6/site-packages/lvmdbusd/lv.py", line 169, in vg_name_lookup
  return cfg.om.get_object_by_path(self.Vg).Name

Instead of removing objects from the object manager immediately, we will
keep them in a list and remove them once we have processed all of the state.

Ref:
https://bugzilla.redhat.com/show_bug.cgi?id=1968752
2021-06-16 12:19:02 -05:00
..
__init__.py lbmdbusd: Support in-tree testing. 2016-02-18 13:26:08 +00:00
.gitignore lvmdbusd: All tools use detected python3 2017-12-12 13:17:07 +01:00
automatedproperties.py lvmdbusd: Don't setup search key unless needed 2021-06-16 12:19:02 -05:00
background.py lvmdbusd: Give threads names 2017-09-27 07:45:00 -05:00
cfg.py lvmdbusd: VDO Pool LV representation 2019-10-30 10:38:40 -05:00
cmdhandler.py lvmdbusd: Add support for LVM writecache 2020-08-06 13:54:34 -05:00
fetch.py lvmdbusd: Defer dbus object removal 2021-06-16 12:19:02 -05:00
job.py lvmdbusd: Main thread exception logging 2017-09-27 07:45:00 -05:00
loader.py lvmdbusd: Defer dbus object removal 2021-06-16 12:19:02 -05:00
lv.py lvmdbusd: Add support for LVM writecache 2020-08-06 13:54:34 -05:00
lvm_shell_proxy.py.in lvmdbusd: Handle exported VG(s) 2018-12-20 10:27:30 -06:00
lvmdb.py.in lvmdbusd: VDO Pool LV representation 2019-10-30 10:38:40 -05:00
lvmdbusd.in lvmdbusd: All tools use detected python3 2017-12-12 13:17:07 +01:00
main.py lvmdbusd: Debug msg. improvements. 2019-10-30 10:38:40 -05:00
Makefile.in makefiles: fix location of basedir 2021-03-08 15:22:27 +01:00
manager.py lvmdbusd: Bump LVM DBus API version 2020-08-06 13:54:45 -05:00
objectmanager.py lvmdbusd: Correct object manager lookups 2019-01-16 16:29:05 -06:00
path.py.in lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
pv.py lvmdbusd: Remove use of tmp variables 2019-10-30 10:38:40 -05:00
request.py lvmdbusd: Main thread exception logging 2017-09-27 07:45:00 -05:00
state.py lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
udevwatch.py lvmdbusd: Limit state refreshes for udev events 2017-03-20 10:08:39 -05:00
utils.py lvmdbusd: VDO Pool LV representation 2019-10-30 10:38:40 -05:00
vg.py lvmdbusd: Add function to convert LV into a VDO pool 2020-01-09 13:07:55 -06:00