Skip to content

Improve signal handling in GardenerNodeLifecycleController#322

Open
toanju wants to merge 1 commit into
mainfrom
improve-signal-handling
Open

Improve signal handling in GardenerNodeLifecycleController#322
toanju wants to merge 1 commit into
mainfrom
improve-signal-handling

Conversation

@toanju

@toanju toanju commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

So far ending the signal deployment/pod took more time than necessary
because the sleep command was not handling the TERM signal properly.
This change modifies the command to handle the TERM signal and exit
gracefully, allowing for a faster shutdown of the container.

Summary by CodeRabbit

  • Bug Fixes
    • Improved graceful shutdown behavior for the signalling container so it handles termination signals cleanly and exits without errors.

So far ending the signal deployment/pod took more time than necessary
because the sleep command was not handling the TERM signal properly.
This change modifies the command to handle the TERM signal and exit
gracefully, allowing for a faster shutdown of the container.
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 901151c5-d9e4-483a-ac4b-4162b4ed13bd

📥 Commits

Reviewing files that changed from the base of the PR and between 62f2459 and d0a1723.

📒 Files selected for processing (1)
  • internal/controller/gardener_node_lifecycle_controller.go

📝 Walkthrough

Walkthrough

The signalling container's command in the Gardener node lifecycle controller's Deployment template was changed from running sleep inf to a shell command that traps the TERM signal, exits with code 0, and continues running via sleep infinity and wait.

Changes

Signalling Deployment Command Update

Layer / File(s) Summary
Signalling container termination handling
internal/controller/gardener_node_lifecycle_controller.go
Container command replaced sleep inf with a trap-based shell command handling TERM signal, exiting 0, while continuing via sleep infinity and wait.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change to improve TERM handling in GardenerNodeLifecycleController.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-signal-handling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 68.98% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/gardener_node_lifecycle_controller.go 72.41% (ø) 58 42 16

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

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.

3 participants