]> sourceware.org Git - lvm2.git/commitdiff
lvmdbusd: Make sure to set cfg.got_external_event
authorTony Asleson <tasleson@redhat.com>
Wed, 17 Aug 2022 17:08:16 +0000 (12:08 -0500)
committerTony Asleson <tasleson@redhat.com>
Fri, 16 Sep 2022 15:49:37 +0000 (10:49 -0500)
We were incorrectly only setting this if --udev wasn't present on the
command line.  In all cases when we see a manager.ExternalEvent we want
to set this.

daemons/lvmdbusd/manager.py

index e6b0718c4b48d8294c3335fcf0aaeee41df7b57c..45e7bb0b882aa0a82b5a16c26cfb077ebb2ee3c9 100644 (file)
@@ -194,6 +194,7 @@ class Manager(AutomatedProperties):
        def _external_event(command):
                utils.log_debug("Processing _external_event= %s" % command,
                                                        'bg_black', 'fg_orange')
+               cfg.got_external_event = True
                cfg.load()
 
        @dbus.service.method(
@@ -204,11 +205,9 @@ class Manager(AutomatedProperties):
                # 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_debug("ExternalEvent received, disabling "
+                               utils.log_msg("ExternalEvent received, disabling "
                                                                "udev monitoring")
                                # We are dependent on external events now to stay current!
-                               cfg.got_external_event = True
-
                r = RequestEntry(
                        -1, Manager._external_event, (command,), None, None, False)
                cfg.worker_q.put(r)
This page took 0.038568 seconds and 5 git commands to generate.