1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/daemons/lvmdbusd
Tony Asleson 063265eacd lvmdbusd: Allow PV device names to be '[unknown]'
When a PV device is missing lvm will return '[unknown]' for the device
path.  The object manager keeps a hash table lookup for uuid and for PV's
device name.  When we had multiple PVs with the same device path we
we only had 1 key in the table for the lvm id (device path).  This caused
a problem when the PV device transitioned from '[unknown]' to known as any
subsequent transitions would cause an exception:

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/lvmdbusd/request.py", line 66, in run_cmd
    result = self.method(*self.arguments)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/manager.py", line 205, in _pv_scan
    cfg.load()
  File "/usr/lib/python3.5/site-packages/lvmdbusd/fetch.py", line 24, in load
    cache_refresh=False)[1]
  File "/usr/lib/python3.5/site-packages/lvmdbusd/pv.py", line 48, in load_pvs
    emit_signal, cache_refresh)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/loader.py", line 80, in common
    cfg.om.remove_object(cfg.om.get_object_by_path(k), True)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/objectmanager.py", line 153, in remove_object
    self._lookup_remove(path)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/objectmanager.py", line 97, in _lookup_remove
    del self._id_to_object_path[lvm_id]
KeyError: '[unknown]'

when trying to delete a key that wasn't present.  In this case we don't add a
lookup key for the device path and the PV can only be located by UUID.

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1379357
2016-09-27 13:28:54 -05:00
..
__init__.py lbmdbusd: Support in-tree testing. 2016-02-18 13:26:08 +00:00
automatedproperties.py lvmdbusd: Correct imports 2016-09-19 15:32:47 -05:00
background.py lvmdbusd: WS/pep8 corrections 2016-08-29 15:28:06 -05:00
cfg.py lvmdbusd: Correct imports 2016-08-29 15:26:56 -05:00
cmdhandler.py lvmdbusd: Prefix tag string with '@' 2016-08-29 18:00:21 -05:00
fetch.py lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
job.py lvmdbusd: Assign percentage on set 2016-09-19 15:32:47 -05:00
loader.py lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
lv.py lvmdbusd: Fix dbus object with only properties and no method 2016-09-19 15:32:47 -05:00
lvm_shell_proxy.py lvmdbusd: WS/pep8 corrections 2016-08-29 15:28:06 -05:00
lvmdb.py lvmdbusd: Correct imports 2016-08-29 15:26:56 -05:00
lvmdbusd lvmdbusd: Correct imports 2016-08-29 15:26:56 -05:00
main.py lvmdbusd: Correct imports 2016-09-19 15:32:47 -05:00
Makefile.in make: add generated parts of lvmdbusd to DISTCLEAN_TARGETS for make distclean 2016-06-02 11:58:54 +02:00
manager.py lvmdbusd: WS/pep8 corrections 2016-08-29 15:28:06 -05:00
objectmanager.py lvmdbusd: Allow PV device names to be '[unknown]' 2016-09-27 13:28:54 -05:00
path.py.in lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
pv.py lvmdbusd: Correct return type for empty PeSegments 2016-08-29 15:26:56 -05:00
refresh.py lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
request.py lvmdbusd: Set value to non none on error 2016-09-19 15:31:04 -05:00
state.py lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
udevwatch.py lvmdbusd: Use udev until ExternalEvent occurs 2016-08-29 15:26:55 -05:00
utils.py lvmdbusd: Correct imports 2016-09-19 15:32:47 -05:00
vg.py lvmdbusd: Vg.LvCreate* methods, correct return type 2016-09-19 15:31:04 -05:00