Skip to content

test(cli): daemon graceful shutdown on SIGTERM #152

Description

@btwshivam

kerno start wires signal.NotifyContext and an http-server Shutdown, but nothing tests that a real SIGTERM drains the server, detaches bpf, and exits 0. shutdown bugs (skipped cleanup, hung goroutines, non-zero exit) only show up in production.

propose: an integration test that runs the daemon in a container, waits for /healthz to come up, sends SIGTERM, and asserts it exits 0 within the shutdown timeout with the metrics server closed and no goroutine leak in the logs. also assert a second SIGTERM or a stuck request doesn't wedge it.

depends on the harness (#143). this would also catch the os.Exit-skips-cleanup concern raised on the panic-recovery work in #95.

Metadata

Metadata

Assignees

Labels

claimedSomeone is actively working on this (auto-released after 10d inactivity)testingTests and test coverage

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions