Skip to content

Conversation

@Dilnawaz-khan-ops
Copy link

@Dilnawaz-khan-ops Dilnawaz-khan-ops commented Jun 10, 2025

Jira Issue
RDGRS-1288

Context / Goal
The Chisel server container runs within AWS ECS Fargate, and during ECS task rotations, containers receive a SIGTERM signal before termination. Previously, the Chisel server did not handle SIGTERM, leading to abrupt shutdowns and potential downtime.

This PR enhances the container behavior by implementing graceful termination upon SIGTERM, ensuring cleanup occurs before exit. While this has not been tested directly in ECS Fargate, validation was performed in a local Kubernetes (k3d) cluster, which exhibits similar container lifecycle behavior, enabling faster iteration and reliable results.

Changes in this PR:
Added signal handling logic to the Chisel server to intercept SIGTERM and shut down cleanly.
Verified behavior in a local k3d Kubernetes cluster simulating ECS termination signals.
Included explanatory comments noting that SIGKILL (kill -9) cannot be handled, as it’s enforced by the OS.

Acceptance Criteria:
Chisel server intercepts SIGTERM and shuts down gracefully.
Behavior tested and confirmed in a local Kubernetes (k3d) environment.
Improves ECS task rotation by reducing downtime and enabling orderly shutdowns.
No handling logic for SIGKILL (expected OS behavior).

@Dilnawaz-khan-ops Dilnawaz-khan-ops requested a review from a team as a code owner June 10, 2025 09:54
@cssecautomation
Copy link

cssecautomation commented Jun 10, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

@Dilnawaz-khan-ops Dilnawaz-khan-ops merged commit 9ad986f into master Jun 11, 2025
5 checks passed
@Dilnawaz-khan-ops Dilnawaz-khan-ops deleted the RDGRS-1288-New branch June 11, 2025 11:02
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.

4 participants