-
Notifications
You must be signed in to change notification settings - Fork 350
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
Unix socket: add switch to disable adding the instance name to path #2302
Comments
Hi, you are going to want to use the From the docs: When necessary, you may specify the full path to a Unix socket. Set the
|
Thanks, I was not aware of this option! |
@eldad It is mentioned in the Lines 160 to 169 in c683042
|
Hidden in plain sight 😄 My bad, I didn't even notice the whole text before the command line switches. Thanks again! |
Feature Description
When creating a unix socket (
-u
), the name of the instance is concatenated to the path given by-u
. This can cause an issue even if-u
is very short: when using a long instance name, creating a UNIX socket can fail due to the length restriction.(See also #970)
This can be avoided if
cloud-sql-proxy
would allow the user to disable adding the instance name as an extra directory, which is done here:cloud-sql-proxy/internal/proxy/proxy.go
Line 892 in c683042
I was able to workaround my local issues by building a custom version with
address = dir
at that line.It would be great if there would be a switch to control this.
If this is acceptable to you, I'll be happy to contribute a PR to implement this.
Sample code
No response
Alternatives Considered
No response
Additional Details
Related issue: #970
With this simple change I can work with very long instance names:
https://github.com/eldad/cloud-sql-proxy/commit/950bb2a8e0502bd73dc0963fb1c6ed9e9eb78281
(obviously this behavior would need to be feature-flag controlled)
The text was updated successfully, but these errors were encountered: