aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRyan Hallisey <rhallise@redhat.com>2015-03-11 09:35:00 -0400
committerRyan Hallisey <rhallise@redhat.com>2015-03-18 10:33:42 -0400
commit4075c851edc3339adee8ef02bcc291e21b8a738c (patch)
tree0c5e56fd03bfc014a1f2dbf5f4ad8b511eca57b6 /docs
parent53d7e3b6fa12169463688410202e4f47e358fc06 (diff)
downloadkolla-4075c851edc3339adee8ef02bcc291e21b8a738c.tar.gz
kolla-4075c851edc3339adee8ef02bcc291e21b8a738c.zip
The wait_for function needs to be added into all the images
This affects both fedora and the centos base images. Wait_for will be intregrated into kolla-common. Co-authored by: Charles Crouch <charcrou@cisco.com> Change-Id: Ide2304b787d4c3bf6fb3949f09e2cf1f450c2173
Diffstat (limited to 'docs')
-rw-r--r--docs/wait-for.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/wait-for.md b/docs/wait-for.md
new file mode 100644
index 000000000..3317c315f
--- /dev/null
+++ b/docs/wait-for.md
@@ -0,0 +1,18 @@
+# Wait-for function
+
+The usage of the wait_for function looks like the following
+ $ SCRIPT_NAME LOOPS_NUMBER SLEEP_TIME ARGS
+
+The ARGS are read and concatenated together into a single command
+and the command is executed in a loop until it succeeds or reaches
+the max number of attempts (LOOPS_NUMBER).
+
+An optional FAIL_MATCH_OUTPUT variable may also be set to control
+if the loop exits early if the commands stdout/stderr matches the
+supplied regex string.
+Examples:
+ $ wait_for 30 10 ping -c 1 192.0.2.2
+ $ wait_for 10 1 ls file_we_are_waiting_for
+ $ wait_for 10 3 date \| grep 8
+ $ FAIL_MATCH_OUTPUT=CREATE_FAILED wait_for 30 10 heat stack-show undercloud
+ $ SUCCESSFUL_MATCH_OUTPUT=CREATE_COMPLETE wait_for 30 10 heat stack-show undercloud