-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(core): rename unix sockets to shorter names to avoid exceeding socket name limit #13557
Conversation
765e918
to
1d56fdb
Compare
…cket name limit Unix domain sockets have a hard length limit of around 108 characters. When Kong is configured in a deeply nested directory structure, this can cause Kong to fail to start. Reducing the file name length will help alleviate this issue. Fix: KAG-5136
1d56fdb
to
5ab75a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a doc fix, otherwise lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC this is a fix for an unreleased feature, right? A changelog entry is not needed in such cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no? It is still a possible problem even before the unreleased fix. The new feature just makes it more likely to happen, since the path to the sockets has become longer by adding the subdirectory /sockets/
@@ -83,7 +83,7 @@ stream { | |||
|
|||
> if cluster_ssl_tunnel then | |||
server { | |||
listen unix:${{SOCKET_PATH}}/cluster_proxy_ssl_terminator.sock; | |||
listen unix:${{SOCKET_PATH}}/${{CLUSTER_PROXY_SSL_TERMINATOR_SOCK}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that these are no longer hard-coded strings ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 well done
This will need backporting everywhere that #13409 is slated for backport (just 3.8 in OSS but many more versions in EE). If you can take care of 3.8 I will take care of all of the pre-3.8 versions myself.
Successfully created backport PR for |
Successfully created cherry-pick PR for |
…cket name limit (#10114) * fix(core): rename unix sockets to shorter names to avoid exceeding socket name limit (#13557) (cherry picked from commit 2dc36f2) * Renamed kong_debug socket to shorter name * update changelog, add kong_debug socket to ee_constants, update test * use pairs instead of ipairs --------- Co-authored-by: Brent Yarger <brent.yarger@konghq.com>
Summary
Unix domain sockets have a hard length limit of around 108 characters. When Kong is configured in a deeply nested directory structure, this can cause Kong to fail to start. Reducing the file name length will help alleviate this issue.
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix: KAG-5136