Skip to content

Commit ca9f7a0

Browse files
committed
c-foreach-restart: keep retrying port for 1 minute on restart
1 parent c84b98b commit ca9f7a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cassandra/tools/instances.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ def restart(self):
6161
logging.info("CQL (%s:%s) is UP", self.rpc_address, self.native_transport_port)
6262
listening = True
6363
break
64-
sleep(2)
64+
elif i < 9:
65+
logging.warn("CQL (%s:%s) not listening (will retry)...")
66+
sleep(6)
6567
if not listening:
6668
logging.error("CQL (%s:%s) DOWN", self.rpc_address, self.native_transport_port)
6769
raise Exception("{} restart FAILED".format(self.service_name))

0 commit comments

Comments
 (0)