Skip to contentSkip to conversation

master - lvmdbusd: Call add_no_notify for *move commands

PATCH Tony Asleson 1 participant 1 message Mar 20, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7eeb093fdd314063eff7f14b8b6338523e0dd840
Commit:        7eeb093fdd314063eff7f14b8b6338523e0dd840
Parent:        2dc71fc291b3ac861298b4dd7b25963dd9325a4d
Author:        Tony Asleson <[email protected]>
AuthorDate:    Wed Mar 15 10:58:41 2017 -0500
Committer:     Tony Asleson <[email protected]>
CommitterDate: Mon Mar 20 10:08:38 2017 -0500

lvmdbusd: Call add_no_notify for *move commands

Missed this in change when "add_no_notify" was added. This was causing extra external events to process when we did moves.

---
 daemons/lvmdbusd/background.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
daemons/lvmdbusd/background.py +6 -1
index 19a2e6c..e870c05 100644
@@ -11,7 +11,8 @@ import subprocess
 from . import cfg
 from .cmdhandler import options_to_cli_args
 import dbus
-from .utils import pv_range_append, pv_dest_ranges, log_error, log_debug
+from .utils import pv_range_append, pv_dest_ranges, log_error, log_debug,\
+	add_no_notify
 import os
 import threading
 
@@ -42,6 +43,10 @@ def _move_merge(interface_name, command, job_state):
 	# the command always as we will be getting periodic output from them on
 	# the status of the long running operation.
 	command.insert(0, cfg.LVM_CMD)
+
+	# Instruct lvm to not register an event with us
+	command = add_no_notify(command)
+
 	process = subprocess.Popen(command, stdout=subprocess.PIPE,
 								env=os.environ,
 								stderr=subprocess.PIPE, close_fds=True)