aboutsummaryrefslogtreecommitdiffstats
path: root/community/ceph/32-fix_ceph_thread_timeout.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/ceph/32-fix_ceph_thread_timeout.patch')
-rw-r--r--community/ceph/32-fix_ceph_thread_timeout.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/community/ceph/32-fix_ceph_thread_timeout.patch b/community/ceph/32-fix_ceph_thread_timeout.patch
deleted file mode 100644
index 6740332644..0000000000
--- a/community/ceph/32-fix_ceph_thread_timeout.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- a/src/pybind/ceph_argparse.py
-+++ b/src/pybind/ceph_argparse.py
-@@ -564,11 +564,11 @@
- raise ArgumentFormat("{0} not a hex integer".format(val))
- try:
- int(val)
-- except:
-+ except ValueError:
- raise ArgumentFormat('can\'t convert {0} to integer'.format(val))
- try:
- int(bits)
-- except:
-+ except ValueError:
- raise ArgumentFormat('can\'t convert {0} to integer'.format(bits))
- self.val = s
-
-@@ -1077,15 +1077,12 @@
- # Have an arg; validate it
- try:
- validate_one(myarg, desc)
-- valid = True
- except ArgumentError as e:
-- valid = False
--
- # argument mismatch
- if not desc.req:
- # if not required, just push back; it might match
- # the next arg
-- save_exception = [ myarg, e ]
-+ save_exception = [myarg, e]
- myargs.insert(0, myarg)
- break
- else:
-@@ -1171,9 +1168,9 @@
- # (relies on a cmdsig being key,val where val is a list of len 1)
-
- def grade(cmd):
-- # prefer optional arguments over required ones
-- sigs = cmd['sig']
-- return sum(map(lambda sig: sig.req, sigs))
-+ # prefer optional arguments over required ones
-+ sigs = cmd['sig']
-+ return sum(map(lambda sig: sig.req, sigs))
-
- bestcmds_sorted = sorted(bestcmds, key=grade)
- if verbose:
-@@ -1227,7 +1224,6 @@
- return valid_dict
-
-
--
- def find_cmd_target(childargs):
- """
- Using a minimal validation, figure out whether the command
-@@ -1312,14 +1308,15 @@
-
-
- def run_in_thread(func, *args, **kwargs):
-- interrupt = False
- timeout = kwargs.pop('timeout', 0)
- if timeout == 0 or timeout == None:
- # python threading module will just get blocked if timeout is `None`,
- # otherwise it will keep polling until timeout or thread stops.
-- # wait for INT32_MAX, as python 3.6.8 use int32_t to present the
-- # timeout in integer when converting it to nanoseconds
-- timeout = (1 << (32 - 1)) - 1
-+ # timeout in integer when converting it to nanoseconds, but since
-+ # python3 uses `int64_t` for the deadline before timeout expires,
-+ # we have to use a safe value which does not overflow after being
-+ # added to current time in microseconds.
-+ timeout = 24 * 60 * 60
- t = RadosThread(func, *args, **kwargs)
-
- # allow the main thread to exit (presumably, avoid a join() on this