summaryrefslogtreecommitdiffstats
path: root/kubernetes/readiness/docker/init/ready.py
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/readiness/docker/init/ready.py')
-rw-r--r--kubernetes/readiness/docker/init/ready.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/kubernetes/readiness/docker/init/ready.py b/kubernetes/readiness/docker/init/ready.py
index 87c09a444c..0e133eab01 100644
--- a/kubernetes/readiness/docker/init/ready.py
+++ b/kubernetes/readiness/docker/init/ready.py
@@ -1,9 +1,10 @@
-#!/usr/bin/python
+#!/usr/bin/env python
import getopt
import logging
import os
import sys
import time
+import random
from kubernetes import client
@@ -154,7 +155,8 @@ def main(argv):
log.warning("timed out waiting for '" + container_name + "' to be ready")
exit(1)
else:
- time.sleep(5)
+ # spread in time potentially parallel execution in multiple containers
+ time.sleep(random.randint(5, 11))
if __name__ == "__main__":
main(sys.argv[1:])