summaryrefslogtreecommitdiff
path: root/daemons/lvmdbusd
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/lvmdbusd')
-rw-r--r--daemons/lvmdbusd/main.py3
-rw-r--r--daemons/lvmdbusd/manager.py6
-rw-r--r--daemons/lvmdbusd/udevwatch.py20
3 files changed, 15 insertions, 14 deletions
diff --git a/daemons/lvmdbusd/main.py b/daemons/lvmdbusd/main.py
index 662d7569f..e869bcec3 100644
--- a/daemons/lvmdbusd/main.py
+++ b/daemons/lvmdbusd/main.py
@@ -125,7 +125,8 @@ def process_args():
# Add udev watching
if args.use_udev:
# Make sure this msg ends up in the journal, so we know
- log_msg('Utilizing udev to trigger updates')
+ log_msg('The --udev option is no longer supported,'
+ 'the daemon always uses a combination of dbus notify from lvm tools and udev')
return args
diff --git a/daemons/lvmdbusd/manager.py b/daemons/lvmdbusd/manager.py
index 9c41f0fc3..c6fb11d76 100644
--- a/daemons/lvmdbusd/manager.py
+++ b/daemons/lvmdbusd/manager.py
@@ -203,12 +203,6 @@ class Manager(AutomatedProperties):
in_signature='s', out_signature='i')
def ExternalEvent(self, command):
utils.log_debug("ExternalEvent %s" % command)
- # If a user didn't explicitly specify udev, we will turn it off now.
- if not cfg.args.use_udev:
- if udevwatch.remove():
- utils.log_msg("ExternalEvent received, disabling "
- "udev monitoring")
- # We are dependent on external events now to stay current!
r = RequestEntry(
-1, Manager._external_event, (command,), None, None, False)
cfg.worker_q.put(r)
diff --git a/daemons/lvmdbusd/udevwatch.py b/daemons/lvmdbusd/udevwatch.py
index f9b3e4ad1..237ff17e8 100644
--- a/daemons/lvmdbusd/udevwatch.py
+++ b/daemons/lvmdbusd/udevwatch.py
@@ -52,20 +52,26 @@ def filter_event(action, device):
# when appropriate.
refresh = False
+ # Ignore everything but change
+ if action != 'change':
+ return
+
if 'ID_FS_TYPE' in device:
fs_type_new = device['ID_FS_TYPE']
-
if 'LVM' in fs_type_new:
- refresh = True
+ # Let's skip udev events for LVM devices as we should be handling them
+ # with the dbus notifications.
+ pass
elif fs_type_new == '':
# Check to see if the device was one we knew about
if 'DEVNAME' in device:
- found = cfg.om.get_object_by_lvm_id(device['DEVNAME'])
- if found:
+ if cfg.om.get_object_by_lvm_id(device['DEVNAME']):
refresh = True
-
- if 'DM_LV_NAME' in device:
- refresh = True
+ else:
+ # This handles the wipefs -a path
+ if not refresh and 'DEVNAME' in device:
+ if cfg.om.get_object_by_lvm_id(device['DEVNAME']):
+ refresh = True
if refresh:
udev_add()