This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-ccm.git
The following commit(s) were added to refs/heads/trunk by this push:
new 0e20102 Make configurable the pid wait timeout in node.py
0e20102 is described below
commit 0e20102c1cad99104969239f1ac375b6fcaa7bbc
Author: Boxuan Li <[email protected]>
AuthorDate: Wed Jun 22 21:41:13 2022 -0400
Make configurable the pid wait timeout in node.py
patch by Boxuan Li; reviewed by Mick
---
ccmlib/node.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ccmlib/node.py b/ccmlib/node.py
index 0bf3734..4c46a38 100644
--- a/ccmlib/node.py
+++ b/ccmlib/node.py
@@ -47,6 +47,7 @@ from six.moves import xrange
logger = logging.getLogger(__name__)
NODE_WAIT_TIMEOUT_IN_SECS = 90
+DEFAULT_UPDATE_PID_TIMEOUT_IN_SECS =
int(os.environ.get('CCM_UPDATE_PID_DEFAULT_TIMEOUT', 30))
class Status():
UNINITIALIZED = "UNINITIALIZED"
@@ -2181,8 +2182,9 @@ class Node(object):
start = time.time()
while not (os.path.isfile(pidfile) and os.stat(pidfile).st_size > 0):
- if (time.time() - start > 30.0):
- common.error("Timed out waiting for pidfile to be filled
(current time is {}, file exists {})".format(datetime.now(),
os.path.isfile(pidfile)))
+ if time.time() - start > DEFAULT_UPDATE_PID_TIMEOUT_IN_SECS:
+ common.error("Timed out waiting for pidfile to be filled
(timeout is {}, current time is {}, file exists {})"
+ .format(DEFAULT_UPDATE_PID_TIMEOUT_IN_SECS,
datetime.now(), os.path.isfile(pidfile)))
break
else:
time.sleep(0.1)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]