-
Notifications
You must be signed in to change notification settings - Fork 477
Document patch deferral for CC and CCAPI #20871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1021,3 +1021,102 @@ If the request is successful, the client receives a response with the name of th | |
| ~~~ | ||
|
|
||
| Where `<sql_username>` is the name of the SQL user whose password was changed. | ||
|
|
||
| ## Configure a CockroachDB Advanced cluster's maintenance window | ||
|
|
||
| To configure a [maintenance window]({% link cockroachcloud/advanced-cluster-management.md %}#set-a-maintenance-window) on a CockroachDB {{ site.data.products.advanced }} cluster, send a `PUT` request to the `/v1/clusters/{cluster_id}/maintenance-window` endpoint. | ||
|
|
||
| {{site.data.alerts.callout_success}} | ||
| The service account associated with the secret key must have the Cluster Admin or Cluster Operator [role]({% link cockroachcloud/authorization.md %}#organization-user-roles). | ||
| {{site.data.alerts.end}} | ||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| curl --request PUT \ | ||
| --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/maintenance-window \ | ||
| --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ | ||
| --json '{"offset_duration":"{offset_duration}","window_duration":"{window_duration}"}' | ||
| ~~~ | ||
|
|
||
| Where: | ||
|
|
||
| - `{cluster_id}` is the unique ID of this cluster. | ||
| {{site.data.alerts.callout_info}} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this block needs to be indented to align with the bullet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| The cluster ID used in the Cloud API is different from the routing ID used when [connecting to clusters]({% link cockroachcloud/connect-to-your-cluster.md %}). | ||
| {{site.data.alerts.end}} | ||
| - `{offset_duration}` is the start of the maintenance window, calculated as the amount of time after the start of a week (Monday 00:00 UTC) to begin the window. | ||
| - `{window_duration}` is the length of the maintenance window, which must be greater than 6 hours and less than one week. | ||
|
|
||
| A cluster's existing maintenance window can be viewed with a `GET` request to the `/api/v1/clusters/{cluster_id}/maintenance-window` endpoint: | ||
jhlodin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| curl --request GET \ | ||
| --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/maintenance-window \ | ||
| --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' | ||
| ~~~ | ||
|
|
||
| ~~~ json | ||
| { | ||
| "offset_duration": "172800s", | ||
| "window_duration": "21600s" | ||
| } | ||
| ~~~ | ||
|
|
||
| A cluster's maintenance window can be removed with a `DELETE` request to the `/api/v1/clusters/{cluster_id}/maintenance-window` endpoint: | ||
jhlodin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| curl --request DELETE \ | ||
| --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/maintenance-window \ | ||
| --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' | ||
| ~~~ | ||
|
|
||
| ~~~ json | ||
| { | ||
| "offset_duration": "172800s", | ||
| "window_duration": "21600s" | ||
| } | ||
| ~~~ | ||
|
|
||
| ### Set a patch upgrade deferral policy | ||
|
|
||
| Automatic patch upgrades can be delayed for a period of 30, 60, or 90 days to ensure that development and testing clusters are upgraded before production clusters. This setting applies only to patch versions and not to other kinds of upgrades. | ||
jhlodin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To set a patch upgrade deferral policy, send a `PUT` request to the `/api/v1/clusters/{cluster_id}/version-deferral` endpoint. | ||
|
|
||
| {{site.data.alerts.callout_success}} | ||
| The service account associated with the secret key must have the Cluster Admin or Cluster Operator [role]({% link cockroachcloud/authorization.md %}#organization-user-roles). | ||
| {{site.data.alerts.end}} | ||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| curl --request PUT \ | ||
| --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/version-deferral \ | ||
| --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \ | ||
| --json '{"deferral_policy":"{deferral_policy}"}' | ||
jhlodin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ~~~ | ||
|
|
||
| Where: | ||
|
|
||
| - `{cluster_id}` is the unique ID of this cluster. | ||
| {{site.data.alerts.callout_info}} | ||
jhlodin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| The cluster ID used in the Cloud API is different from the routing ID used when [connecting to clusters]({% link cockroachcloud/connect-to-your-cluster.md %}). | ||
| {{site.data.alerts.end}} | ||
| - `{deferral_policy} is the length of the deferral window, set to `"DEFERRAL_30_DAYS"`, `"DEFERRAL_60_DAYS"`, or `"DEFERRAL_90_DAYS"`. Set to `"NOT_DEFERRED"` to remove the deferral policy and apply automatic patch upgrades immediately. | ||
|
|
||
| To view the existing patch deferral policy and current patch upgrade deferrals, send a `GET` request to the `/api/v1/clusters/{cluster_id}/version-deferral` endpoint. | ||
jhlodin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| curl --request GET \ | ||
| --url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/version-deferral \ | ||
| --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' | ||
| ~~~ | ||
|
|
||
| ~~~ json | ||
| { | ||
| "deferral_policy": "DEFERRAL_60_DAYS", | ||
| "deferred_until": "2025-12-15T00:00:00Z" | ||
| } | ||
| ~~~ | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.