From 4e6a980bc659c4e687b5f0eb849c42abc4ed0259 Mon Sep 17 00:00:00 2001 From: Josh Cohen Date: Tue, 7 Apr 2015 11:02:34 -0400 Subject: [PATCH] update documentation for ATTEMPTS change --- docs/application-deployment.md | 2 +- docs/checks-examples.md | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/application-deployment.md b/docs/application-deployment.md index ab8274028..08f934e0f 100644 --- a/docs/application-deployment.md +++ b/docs/application-deployment.md @@ -111,7 +111,7 @@ Dokku will wait `DOKKU_CHECKS_WAIT` seconds (default: `5`) before running the ch Dokku will wait `DOKKU_WAIT_TO_RETIRE` seconds (default: `60`) before stopping the old container such that no existing connections to it are dropped. -Dokku will retry the checks DOKKU_CHECKS_RETRIES times until the checks are successful or DOKKU_CHECKS_RETRIES is exceeded. In the latter case, the deployment is considered failed. This can be overridden in the CHECKS file by setting RETRIES=nn. +Dokku will retry the checks DOKKU_CHECKS_ATTEMPTS times until the checks are successful or DOKKU_CHECKS_ATTEMPTS is exceeded. In the latter case, the deployment is considered failed. This can be overridden in the CHECKS file by setting ATTEMPTS=nn. See [checks-examples.md](checks-examples.md) for examples and output. diff --git a/docs/checks-examples.md b/docs/checks-examples.md index 6881fa644..a77f56e37 100644 --- a/docs/checks-examples.md +++ b/docs/checks-examples.md @@ -22,24 +22,24 @@ You can also specify the protocol to explicitly check HTTPS requests. The default behavior is to wait for 5 seconds before running the first check, and timeout each check to 30 minutes. -By default, checks will be retried 5 times. +By default, checks will be attempted 5 times. (Retried 4 times) -You can change these by setting WAIT, TIMEOUT and RETRIES to different values, for +You can change these by setting WAIT, TIMEOUT and ATTEMPTS to different values, for example: WAIT=30 # Wait 1/2 minute TIMEOUT=60 # Timeout after a minute - RETRIES=10 # retry checks 10 times + ATTEMPTS=10 # attempt checks 10 times # Example: Successful Rails Deployment In this example, a rails applicaiton is successfully deployed to dokku. The initial round of checks fails while the server is starting, but once it starts they succeed and the deployment is successful. -RETRIES is set to 6, but the third attempt succeeds. +ATTEMPTS is set to 6, but the third attempt succeeds. ## CHECKS file ```` WAIT=5 -RETRIES=6 +ATTEMPTS=6 /check.txt simple_check ```` @@ -71,13 +71,13 @@ git push dokku master http://localhost/check.txt => "simple_check" ! curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused - ! Check attempt 1/6 failed. Retrying... + ! Check attempt 1/6 failed. -----> Attempt 2/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/check.txt => "simple_check" ! curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused - ! Check attempt 2/6 failed. Retrying... + ! Check attempt 2/6 failed. -----> Attempt 3/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/check.txt => "simple_check" @@ -104,13 +104,13 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused # Example: Failing Rails Deployment In this example, a Rails application fails to deploy. The reason for the failure is that the postgres database connection fails. The initial checks will fail while we wait for the server to start up, just like in the above example. However, once the server does start accepting connections, we will see an error 500 due to the postgres database connection failure. -Once the retries have been exceeded, the deployment fails and we see the container output, which shows the Postgres connection errors. +Once the attempts have been exceeded, the deployment fails and we see the container output, which shows the Postgres connection errors. ## CHECKS file ```` WAIT=5 -RETRIES=6 +ATTEMPTS=6 / ```` @@ -142,38 +142,38 @@ Running pre-flight checks http://localhost/ => "" ! curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused - ! Check attempt 1/6 failed. Retrying... + ! Check attempt 1/6 failed. -----> Attempt 2/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" ! curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused - ! Check attempt 2/6 failed. Retrying... + ! Check attempt 2/6 failed. -----> Attempt 3/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" ! curl: (22) The requested URL returned error: 500 Internal Server Error - ! Check attempt 3/6 failed. Retrying... + ! Check attempt 3/6 failed. -----> Attempt 4/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" ! curl: (22) The requested URL returned error: 500 Internal Server Error - ! Check attempt 4/6 failed. Retrying... + ! Check attempt 4/6 failed. -----> Attempt 5/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" ! curl: (22) The requested URL returned error: 500 Internal Server Error - ! Check attempt 5/6 failed. Retrying... + ! Check attempt 5/6 failed. -----> Attempt 6/6 Waiting for 5 seconds ... CHECKS expected result: http://localhost/ => "" ! curl: (22) The requested URL returned error: 500 Internal Server Error Could not start due to 1 failed checks. - ! Check attempt 6/6 failed. Retrying... + ! Check attempt 6/6 failed. =====> myapp container output: => Booting Thin => Rails 4.2.0 application starting in production on http://0.0.0.0:5000