Commit dcf4f32b authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed thread timeout in python threading

parent 2daf456c
...@@ -37,6 +37,7 @@ all: ceph-config ...@@ -37,6 +37,7 @@ all: ceph-config
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-no_git.patch patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-no_git.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_librbd_duplicate.patch patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_librbd_duplicate.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_ErasureCodeShec.patch patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_ErasureCodeShec.patch
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-fix_ceph_thread_timeout.patch
if [ `uname -m` = 'armv7l' ] ; then \ if [ `uname -m` = 'armv7l' ] ; then \
patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-arm32_fix.patch ; \ patch -Np1 -d ceph-15.2.4 < ceph-15.2.4-arm32_fix.patch ; \
fi fi
......
diff -uNr ceph-15.2.4/src/pybind/ceph_argparse.py ceph-15.2.4-fix_ceph_thread_timeout/src/pybind/ceph_argparse.py
--- ceph-15.2.4/src/pybind/ceph_argparse.py 2020-07-01 01:10:51.000000000 +0930
+++ ceph-15.2.4-fix_ceph_thread_timeout/src/pybind/ceph_argparse.py 2020-11-18 18:57:39.711443174 +1030
@@ -1317,9 +1317,8 @@
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
+ # wait for 5 seconds, as python 3.6.8 use float to present the timeout
+ timeout = 5.0
t = RadosThread(func, *args, **kwargs)
# allow the main thread to exit (presumably, avoid a join() on this
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment