Skip to content

Fix outdated information in node shutdown docs #19562

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 3 commits into from
May 6, 2025

Conversation

rafiss
Copy link
Contributor

@rafiss rafiss commented Apr 25, 2025

In 2024, we made the decision to go back to setting the server.shutdown.connections.timeout value back to 0 (default) for Advanced clusters. This docs page was never updated to reflect that.

See here for the record of this meeting:
https://cockroachlabs.atlassian.net/wiki/spaces/MC/pages/3674636289/Re-Decision+connection+timeout+setting+rollout+for+CockroachDB+Cloud+clusters

In 2024, we made the decision to go back to setting the
server.shutdown.connections.timeout value back to 0 (default) for
Advanced clusters. This docs page was never updated to reflect that.

See here for the record of this meeting:
https://cockroachlabs.atlassian.net/wiki/spaces/MC/pages/3674636289/Re-Decision+connection+timeout+setting+rollout+for+CockroachDB+Cloud+clusters
@rafiss rafiss requested a review from DuskEagle April 25, 2025 16:10
Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit a031730
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/681a74daa8b945000853ff61

Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit a031730
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/681a74dac8245600089d8d79

Copy link

netlify bot commented Apr 25, 2025

Netlify Preview

Built without sensitive environment variables

Name Link
🔨 Latest commit a031730
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/681a74da8a1b9f00081c6dbb
😎 Deploy Preview https://deploy-preview-19562--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@DuskEagle DuskEagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafiss rafiss requested review from rmloveland and taroface April 30, 2025 16:57
@rafiss
Copy link
Contributor Author

rafiss commented Apr 30, 2025

@taroface or @rmloveland this has been reviewed for technical accuracy. Could one of you help review it for grammar, clarity, style, etc?


Client applications or application servers that connect to CockroachDB {{ site.data.products.advanced }} clusters should use connection pools that have a maximum lifetime that is shorter than the [`server.shutdown.connections.timeout`](#server-shutdown-connections-timeout) setting.
Client applications or application servers that connect to CockroachDB {{ site.data.products.advanced }} clusters may adjust the the [`server.shutdown.connections.timeout`](#server-shutdown-connections-timeout) setting and should make sure the connection pool maximum lifetime is shorter than that value, as per the guidance in the rest of this page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guidance seems counterintuitive to me, because the previous bullet says that the grace period isn't configurable on Advanced. Isn't that what server.shutdown.connections.timeout sets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"grace period" in this sentence is referring to the termination grace period in k8s: https://www.cockroachlabs.com/docs/stable/node-shutdown#termination-grace-period-on-kubernetes

the previous bullet says that the grace period isn't configurable on Advanced. Isn't that what server.shutdown.connections.timeout sets?

Before my edit, the sentence said "CockroachDB Advanced clusters have a server.shutdown.connections.timeout of 1800 seconds (30 minutes) and a termination grace period that is slightly longer." Although the "30 minutes" was incorrect, that older sentence hopefully makes it clear that these are two separate things.

I'm open to feedback on how to make sure this is still clear after my edit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that the connection timeout and the grace period are separate things, but I just realized the source of my confusion: your new edit says a termination grace period that is slightly longer than 30 minutes, and this grace period is not configurable.. Should this actually be 30 seconds?

Also, can we state that the server.shutdown.connections.timeout default is 0 seconds, just to clarify that it is separate from the grace period? I'm happy to suggest edits but wanted to make sure I understood first.

Copy link
Contributor Author

@rafiss rafiss May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your new edit says "a termination grace period that is slightly longer than 30 minutes, and this grace period is not configurable." Should this actually be 30 seconds?

No, it is slightly longer than 30 minutes (just as it said before my edit). Could you say more about where 30 seconds came from? (If it's from the previous section, then let's clarify things there.)

Also, can we state that the server.shutdown.connections.timeout default is 0 seconds, just to clarify that it is separate from the grace period?

Sure, this makes sense. How's this:

Most of the guidance in this page is most relevant to manual deployments, although decommissioning and draining work the same way behind the scenes in a CockroachDB {{ site.data.products.advanced }} cluster. CockroachDB {{ site.data.products.advanced }} clusters are deployed with the server.shutdown.connections.timeout setting at its default value of 0, and have a termination grace period that is slightly longer than 30 minutes. This grace period is not configurable.

Client applications or application servers that connect to CockroachDB {{ site.data.products.advanced }} clusters may adjust the the server.shutdown.connections.timeout setting. The connection pool maximum lifetime should be shorter than server.shutdown.connections.timeout, and the sum of all the shutdown-related timeouts should not exceed the termination grace period, as per the guidance in the rest of this page.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The K8s section you linked me to says If undefined, Kubernetes sets terminationGracePeriodSeconds to 30 seconds. so I assumed that was also the case on Advanced. But I guess we have that set to 30 minutes?

I made suggestions to both bullets; LMK how they look and I can incorporate into the PR.

@rmloveland
Copy link
Contributor

ack on the review request, it looks like Ryan beat me to it and he's way more familiar with the shutdown docs as well so i'll defer to his comments!


Client applications or application servers that connect to CockroachDB {{ site.data.products.advanced }} clusters should use connection pools that have a maximum lifetime that is shorter than the [`server.shutdown.connections.timeout`](#server-shutdown-connections-timeout) setting.
Client applications or application servers that connect to CockroachDB {{ site.data.products.advanced }} clusters may adjust the the [`server.shutdown.connections.timeout`](#server-shutdown-connections-timeout) setting and should make sure the connection pool maximum lifetime is shorter than that value, as per the guidance in the rest of this page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The K8s section you linked me to says If undefined, Kubernetes sets terminationGracePeriodSeconds to 30 seconds. so I assumed that was also the case on Advanced. But I guess we have that set to 30 minutes?

I made suggestions to both bullets; LMK how they look and I can incorporate into the PR.

@rafiss
Copy link
Contributor Author

rafiss commented May 6, 2025

LMK how they look and I can incorporate into the PR.

@taroface the changes look good now. Is there something special I should do to incorporate them into the PR?

@taroface taroface force-pushed the fix-shutdown-docs branch from ec6640b to a8a7d7b Compare May 6, 2025 20:44
@taroface
Copy link
Contributor

taroface commented May 6, 2025

LMK how they look and I can incorporate into the PR.

@taroface the changes look good now. Is there something special I should do to incorporate them into the PR?

Thanks for the reminder. I went ahead and made the changes to all versions. Will enable auto-merge on this!

@taroface taroface enabled auto-merge (squash) May 6, 2025 20:45
@taroface taroface merged commit 93476e3 into cockroachdb:main May 6, 2025
6 checks passed
@rafiss rafiss deleted the fix-shutdown-docs branch May 6, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants