Skip to content
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

Recover gracefully from sleep #941

Open
enocom opened this issue Dec 20, 2023 · 1 comment
Open

Recover gracefully from sleep #941

enocom opened this issue Dec 20, 2023 · 1 comment
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@enocom
Copy link
Member

enocom commented Dec 20, 2023

Feature Description

When a Connector is running on a machine that goes to sleep for more than 1 hour, when the machine awakes, it will have an expired certificate. Given how TLS 1.3 works, the Connector will not see a failed handshake and will force users to restart the process to fix the problem.

Instead, we should check if the certificate retrieved from the cache is invalid. If it is, we should block on a force refresh attempt until we get a refresh cert.

See GoogleCloudPlatform/cloud-sql-proxy#1788 and GoogleCloudPlatform/cloud-sql-go-connector#686 for details.

This should be ported to AlloyDB Python as well.

@enocom enocom added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Dec 20, 2023
@jackwotherspoon
Copy link
Collaborator

This is a comment to make sure proper debug logs are added around valid cert check:

  • The result of the invalid certificate check (i.e., is “now” after the expiration)
  • Valid cert = True/False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants