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

fix(docker-entrypoint): search new directory for socket cleanup #724

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [[ "$1" == "kong" ]]; then

# remove all dangling sockets in $PREFIX dir before starting Kong
LOGGED_SOCKET_WARNING=0
for localfile in "$PREFIX"/*; do
for localfile in "$PREFIX"/* "$PREFIX"/sockets/*; do
locao marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copying this exposition from another thread in case it's helpful to other reviewers:

I don't know exactly how this repo interacts with Kong/kong with regards to tags and releases. With that in mind, I figured that adding the new path glob instead of just updating the old one ($PREFIX/* => $PREFIX/sockets/*) and searching both would make this more backwards compatible in case we happen to (re)build any older release trees with the docker entrypoint from this repo.

if [ -S "$localfile" ]; then
if (( LOGGED_SOCKET_WARNING == 0 )); then
printf >&2 'WARN: found dangling unix sockets in the prefix directory '
Expand Down
2 changes: 1 addition & 1 deletion ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [[ "$1" == "kong" ]]; then

# remove all dangling sockets in $PREFIX dir before starting Kong
LOGGED_SOCKET_WARNING=0
for localfile in "$PREFIX"/*; do
for localfile in "$PREFIX"/* "$PREFIX"/sockets/*; do
if [ -S "$localfile" ]; then
if (( LOGGED_SOCKET_WARNING == 0 )); then
printf >&2 'WARN: found dangling unix sockets in the prefix directory '
Expand Down
Loading