1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmdbusd: Remove exclusionary language

This commit is contained in:
Tony Asleson 2022-08-09 17:55:27 -05:00
parent c13efb2ffc
commit 6b9cc7432e
8 changed files with 16 additions and 16 deletions

View File

@ -68,7 +68,7 @@ def _move_merge(interface_name, command, job_state):
# the status of the long running operation. # the status of the long running operation.
meta = LvmExecutionMeta(time.time(), 0, command) meta = LvmExecutionMeta(time.time(), 0, command)
cfg.blackbox.add(meta) cfg.flightrecorder.add(meta)
ec, stdout, stderr = call_lvm(command, line_cb=_move_callback, ec, stdout, stderr = call_lvm(command, line_cb=_move_callback,
cb_data=job_state) cb_data=job_state)

View File

@ -92,7 +92,7 @@ vdo_support = False
db = None db = None
# lvm flight recorder # lvm flight recorder
blackbox = None flightrecorder = None
# RequestEntry ctor # RequestEntry ctor
create_request_entry = None create_request_entry = None

View File

@ -90,7 +90,7 @@ class LvmFlightRecorder(object):
log_error("LVM dbus flight recorder END") log_error("LVM dbus flight recorder END")
cfg.blackbox = LvmFlightRecorder() cfg.flightrecorder = LvmFlightRecorder()
def _debug_c(cmd, exit_code, out): def _debug_c(cmd, exit_code, out):
@ -217,9 +217,9 @@ def time_wrapper(command, debug=False):
with cmd_lock: with cmd_lock:
start = time.time() start = time.time()
meta = LvmExecutionMeta(start, 0, command) meta = LvmExecutionMeta(start, 0, command)
# Add the partial metadata to black box, so if the command hangs # Add the partial metadata to flight recorder, so if the command hangs
# we will see what it was in the block box dump. # we will see what it was.
cfg.blackbox.add(meta) cfg.flightrecorder.add(meta)
results = _t_call(command, debug) results = _t_call(command, debug)
ended = time.time() ended = time.time()
total_time += (ended - start) total_time += (ended - start)

View File

@ -183,7 +183,7 @@ class StateUpdate(object):
except Exception as e: except Exception as e:
st = traceback.format_exc() st = traceback.format_exc()
log_error("update_thread exception: \n%s" % st) log_error("update_thread exception: \n%s" % st)
cfg.blackbox.dump() cfg.flightrecorder.dump()
exception_count += 1 exception_count += 1
if exception_count >= 5: if exception_count >= 5:
for i in queued_requests: for i in queued_requests:

View File

@ -55,7 +55,7 @@ def process_request():
utils.log_error("process_request exception: \n%s" % st) utils.log_error("process_request exception: \n%s" % st)
def check_bb_size(value): def check_fr_size(value):
v = int(value) v = int(value)
if v < 0: if v < 0:
raise argparse.ArgumentTypeError( raise argparse.ArgumentTypeError(
@ -103,11 +103,11 @@ def process_args():
default=False, default=False,
dest='use_lvm_shell') dest='use_lvm_shell')
parser.add_argument( parser.add_argument(
"--blackboxsize", "--frsize",
help="Size of the black box flight recorder, 0 to disable", help="Size of the flight recorder (num. entries), 0 to disable (signal 12 to dump)",
default=10, default=10,
type=check_bb_size, type=check_fr_size,
dest='bb_size') dest='fr_size')
args = parser.parse_args() args = parser.parse_args()
@ -142,7 +142,7 @@ def main():
# We create a flight recorder in cmdhandler too, but we replace it here # We create a flight recorder in cmdhandler too, but we replace it here
# as the user may be specifying a different size. The default one in # as the user may be specifying a different size. The default one in
# cmdhandler is for when we are running other code with a different main. # cmdhandler is for when we are running other code with a different main.
cfg.blackbox = LvmFlightRecorder(cfg.args.bb_size) cfg.flightrecorder = LvmFlightRecorder(cfg.args.fr_size)
log_debug("Using lvm binary: %s" % cfg.LVM_CMD) log_debug("Using lvm binary: %s" % cfg.LVM_CMD)

View File

@ -137,7 +137,7 @@ class Manager(AutomatedProperties):
""" """
Dump the flight recorder to syslog Dump the flight recorder to syslog
""" """
cfg.blackbox.dump() cfg.flightrecorder.dump()
@staticmethod @staticmethod
def _lookup_by_lvm_id(key): def _lookup_by_lvm_id(key):

View File

@ -76,7 +76,7 @@ class RequestEntry(object):
# have gotten a job by the time we hit an error # have gotten a job by the time we hit an error
# Lets get the stacktrace and set that to the error message # Lets get the stacktrace and set that to the error message
st = traceback.format_exc() st = traceback.format_exc()
cfg.blackbox.dump() cfg.flightrecorder.dump()
log_error("Exception returned to client: \n%s" % st) log_error("Exception returned to client: \n%s" % st)
self.register_error(-1, str(e), e) self.register_error(-1, str(e), e)

View File

@ -351,7 +351,7 @@ def handler(signum):
dump_threads_stackframe() dump_threads_stackframe()
# signal 12 # signal 12
elif signum == signal.SIGUSR2: elif signum == signal.SIGUSR2:
cfg.blackbox.dump() cfg.flightrecorder.dump()
else: else:
cfg.run.value = 0 cfg.run.value = 0
log_debug('Exiting daemon with signal %d' % signum) log_debug('Exiting daemon with signal %d' % signum)