From a7a0acf754bc019402f59b67aa77acb01e78823b Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Fri, 26 Aug 2022 14:46:13 -0700 Subject: [PATCH] final content tweaks for CTS 0.7 docs --- website/content/docs/nia/usage/errors-ref.mdx | 55 ++++++++++++------- website/content/docs/nia/usage/run-ha.mdx | 5 +- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/website/content/docs/nia/usage/errors-ref.mdx b/website/content/docs/nia/usage/errors-ref.mdx index 2dc82d7925..9c7cd8bf89 100644 --- a/website/content/docs/nia/usage/errors-ref.mdx +++ b/website/content/docs/nia/usage/errors-ref.mdx @@ -21,12 +21,7 @@ The resolution is to add the missing local module on the incompatible CTS instan ## Example API and CLI error messages -In the following example response error: - -- CTS can determine the leader. -- `high_availability.instance.address` is configured for the leader. -- The CTS instance you sent the request to is not the leader. - +**Error**: ```json { @@ -36,17 +31,25 @@ In the following example response error: } ``` -The resolution is to redirect the request to the leader instance, for example: +**Conditions**: + +- CTS can determine the leader. +- `high_availability.instance.address` is configured for the leader. +- The CTS instance you sent the request to is not the leader. + + + +**Resolution**: + +Redirect the request to the leader instance, for example: ```shell-session $ curl --request GET cts-01.example.com:8558/v1/tasks ``` --- -In the following example response error: -* CTS can determine the leader. -* The CTS instance you sent the request to is not the leader. -* `high_availability.instance.address` is not configured. + +**Error**: ```json { @@ -55,15 +58,20 @@ In the following example response error: } } ``` -The resolution is to identify the leader instance address and redirect the request to the leader. We recommend deploying a cluster that has three instances. You can query each instance until the leader responds. + +**Conditions**: + +* CTS can determine the leader. +* The CTS instance you sent the request to is not the leader. +* `high_availability.instance.address` is not configured. + +**Resolution**: + +Identify the leader instance address and redirect the request to the leader. We recommend deploying a cluster that has three instances. You can query each instance until the leader responds. --- -In the following example response error: - -* The CTS instance you sent the request to is not the leader. -* The CTS is unable to determine the leader. -* Note that these conditions are rare. +**Error**: ```json { @@ -72,9 +80,18 @@ In the following example response error: } } ``` -The resolution is to identify and send the request to the leader CTS instance. You can identify the leader by either making a call to the [`status` API endpoint](/docs/nia/api/status) or by checking the logs for the following entry: + +**Conditions**: + +* The CTS instance you sent the request to is not the leader. +* The CTS is unable to determine the leader. +* Note that these conditions are rare. + + +**Resolution**: + +Identify and send the request to the leader CTS instance. You can identify the leader by either making a call to the [`status` API endpoint](/docs/nia/api/status) or by checking the logs for the following entry: ```shell-session [INFO] ha: acquired leadership lock: id= ``` - diff --git a/website/content/docs/nia/usage/run-ha.mdx b/website/content/docs/nia/usage/run-ha.mdx index 52c2c77268..23ba1d414f 100644 --- a/website/content/docs/nia/usage/run-ha.mdx +++ b/website/content/docs/nia/usage/run-ha.mdx @@ -41,7 +41,8 @@ Note that driver behavior is consistent whether or not CTS is running in high av ## Requirements -* Verify that you have met the [basic requirements](/docs/nia/usage/requirements) for running CTS. +Verify that you have met the [basic requirements](/docs/nia/usage/requirements) for running CTS. + * CTS Enterprise 0.7 or later * Terraform CLI 0.13 or later * All instances in a cluster must be in the same datacenter. @@ -97,6 +98,8 @@ We recommend deploying a cluster that includes three CTS instances. This is so t $ curl localhost:/status/tasks ``` +Repeat the procedure to start the remaining instances for your cluster. + ## Modify an instance configuration You can implement a rolling update to update a non-task configuration for a CTS instance, such as the Consul connection settings. If you need to update a task in the instance configuration, refer to [Modify tasks](#modify-tasks).