Skip to content

Backport of Ensure signals are passed to commands into release/1.3.x#3555

Merged
hc-github-team-consul-core merged 2 commits intorelease/1.3.xfrom
backport/lkysow/exec/steadily-maximum-phoenix
Feb 6, 2024
Merged

Backport of Ensure signals are passed to commands into release/1.3.x#3555
hc-github-team-consul-core merged 2 commits intorelease/1.3.xfrom
backport/lkysow/exec/steadily-maximum-phoenix

Conversation

@hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #3548 to be assessed for backporting due to the inclusion of the label backport/1.3.x.

The below text is copied from the body of the original PR.


Change /bin/sh -ec "<command>" to
/bin/sh -ec "exec <command>". Adding exec ensures that <command> is not executed as a child process but replaces the /bin/sh process. This ensure that <command> receives any signals.

Specifically this is an issue when attempting to trap SIGTERMs as part of graceful pod shutdown. Without this change, we weren't receiving any signals because they aren't passed down by /bin/sh -c.

How I've tested this PR

How I expect reviewers to test this PR

Checklist


Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core merged commit ba1b06f into release/1.3.x Feb 6, 2024
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/lkysow/exec/steadily-maximum-phoenix branch February 6, 2024 19:00
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