Skip to content

Shutdown Context and Fixes #122

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

Merged
merged 3 commits into from
Nov 3, 2023
Merged

Shutdown Context and Fixes #122

merged 3 commits into from
Nov 3, 2023

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Nov 2, 2023

This PR works on the initial signal-based context changes from #112. During testing I found my Icinga Notifications container always being stuck when being shut downed until it got SIGKILLed. Thus, next to the introduction of the signal context, a context bug in the RuntimeConfig was fixed and a simple context wrapper was added to the Listener.

  • listener: context for Listener.Run
    Allow gracefully stopping the internal web server when the parent context is closed.
  • runtime: fix RuntimeConfig.PeriodicUpdates context
    The break only broke out of the select, but continued to for loop.
  • icinga-notifications-daemon: handle SIGINT/SIGTERM
    Switch to a signal based context which is being canceled for SIGINT and SIGTERM. This change was extracted from the ongoing PR Icinga 2 API as Event Source #112.

Switch to a signal based context which is being canceled for SIGINT and
SIGTERM. This change was extracted from the ongoing PR #112.
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Nov 2, 2023
@oxzi oxzi requested a review from julianbrost November 2, 2023 09:04
oxzi added 2 commits November 2, 2023 16:54
The break only broke out of the select, but continued the for loop.
Allow gracefully stopping the internal web server when the parent
context is closed.
@julianbrost julianbrost merged commit 877f53c into main Nov 3, 2023
@julianbrost julianbrost deleted the stop-ctx branch November 3, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants