-
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): relocate unix sockets to a subdirectory #13409
Conversation
@Tieske per your in-ticket comments:
Can you confirm if this is what you had in mind? |
some background for the casual reader: underlying problem to solve: the unix sockets cause trouble if they are located on a mount. This frequently done using containers during PoC evaluations of Kong and when testing plugins (Pongo does this). Long term solution is moving them out of the prefix, but that is deemed to big a change for minor/patch releases. Moving them into a subdir allows us to apply a workaround by symlinking that subdir to a path outside the prefix, so the same net effect. (you cannot symlink the socket itself). So yes, this is what we need short term, though for PoC's it is still a hassle and a non-optimal experience for potential Kong users. @fffonion please have a look as well, since you authored the workaround in the Pongo branch: Kong/kong-pongo@master...support/3.4 |
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.
I like the rename to "runtime_prefix".
fa9a3ab
to
bd17a48
Compare
d6d5c37
to
badc124
Compare
My only qualm is that the runtime_prefix directory just be named "run" or "var/run" (as how |
Ready for code review, but we'll hold for merge until some internal discussion is finished. |
I would actually suggest we just name it |
I second this opinion. We need this bugfix, but we don't want more knobs, so let's keep it hardcoded.
Strongly agree. Anyone without the background on this bugfix would think it's a suitable directory for anything runtime related. Heck, a few months from now I can see myself doing that. |
@locao this is actually more-or-less my intent :) Many of our struggles with the prefix directory originate from it being used as a catch-all location for different types of data with different lifecycles (configuration, user state, internal state, transient files, etc). This PR aims to be a step towards organizing data by use case and lifecycle. |
badc124
to
35f20bd
Compare
@fffonion @outsinre I've renamed Eventually I expect that we will want to consolidate all types of runtime-scoped files to a new tree so that we can segregate them from the rest of the stateful contents of |
571e67e
to
4465375
Compare
there have been significant changes since this approving review was made
we might also want a backport to 3.4, as that's HSBC has been staying. please confirm in the ticket. |
@fffonion glad you asked. Backporting to 3.4 is the plan, but I noticed all the other |
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13409-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13409-to-master-to-upstream
git checkout -b cherry-pick-13409-to-master-to-upstream
ancref=$(git merge-base 3a1eeed4a7011259b845cc51b9585e1e1c54de76 a596f6e01bea6232ff60fd031021afd27d1b4338)
git cherry-pick -x $ancref..a596f6e01bea6232ff60fd031021afd27d1b4338 |
Removing the 3.7 backport label for now until I confirm that we will be backporting OSS/CE and not just EE. |
@flrgh Ah yes, only backports to EE 3.4. No backports to CE and other versions of EE from I understand. (I thought we were in the EE repo 😂 ) |
This adapts the fix from d3411e0 to additionally search $PREFIX/sockets for leftover unix sockets. See also: Kong/kong#13409
This adapts the fix from d3411e0 to additionally search $PREFIX/sockets for leftover unix sockets. See also: Kong/kong#13409
This moves all internal unix sockets managed by Kong from
{{prefix}}
into a subdirectory at{{prefix}}/sockets
. The conf loader makes this available via the newsocket_path
field, which is intended as a step towards relocating this path outside of the prefix tree in a later release.KAG-4947