Skip to content

hscontrol: cancel tailsql on graceful shutdown - #3400

Open
iSerganov wants to merge 1 commit into
juanfont:mainfrom
iSerganov:main
Open

hscontrol: cancel tailsql on graceful shutdown#3400
iSerganov wants to merge 1 commit into
juanfont:mainfrom
iSerganov:main

Conversation

@iSerganov

Copy link
Copy Markdown

Serve stored a Background context for tailsql and called context.Done() during signal shutdown. Done only returns the done channel and does not cancel, so tailsql never stopped when Headscale shut down.

Create a cancellable child of the Serve context, run runTailSQLService in the listener errgroup so its error is surfaced, and call the cancel func on shutdown - tailsql unblocks on ctx.Done.

Serve stored a Background context for tailsql and called
context.Done() during signal shutdown. Done only returns the
done channel and does not cancel, so tailsql never stopped
when Headscale shut down.

Create a cancellable child of the Serve context, run
`runTailSQLService` in the listener errgroup so its error is
surfaced, and call the cancel func on shutdown - tailsql
unblocks on ctx.Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant