Improve signal propagation on kubernetes executor when `FF_USE_DUMB_INIT_WITH_KUBERNETES_EXECUTOR` is enabled
Summary
In the MR !4443 (merged) and !4485 (merged), we added support for dumb-init
in the job container. However, the propagation of signals still needs improvement.
This issue is a follow-up of the thread started here: #27443 (comment 1652493554) to investigate and improve the current behavior.
Steps to reproduce
.gitlab-ci.yml
variables:
FF_PRINT_POD_EVENTS: "true"
FF_USE_POWERSHELL_PATH_RESOLVER: "true"
FF_SCRIPT_SECTIONS: "true"
FF_USE_DUMB_INIT_WITH_KUBERNETES_EXECUTOR: "true"
CI_DEBUG_SERVICES: "true"
job:
image: alpine:3.18
script: |
pstree -p
ps -ef
sleep 3600
Actual behavior
The Pod is not terminated
Expected behavior
The Pod should be terminated
Relevant logs and/or screenshots
NA
Environment description
config.toml contents
concurrent = 1
check_interval = 1
log_level = "debug"
shutdown_timeout = 0
listen_address = ':9252'
[session_server]
session_timeout = 1800
[[runners]]
name = ""
url = "https://gitlab.com/"
id = 0
token = "glrt-REDACTED"
token_obtained_at = "0001-01-01T00:00:00Z"
token_expires_at = "0001-01-01T00:00:00Z"
executor = "kubernetes"
shell = "bash"
[runners.kubernetes]
host = ""
bearer_token_overwrite_allowed = false
image = "alpine"
pull_policy = "always"
allowed_pull_policies = ["always", "if-not-present"]
pod_termination_grace_period_seconds = 3600
namespace = ""
namespace_overwrite_allowed = ""
pod_labels_overwrite_allowed = ""
service_account_overwrite_allowed = ""
pod_annotations_overwrite_allowed = ""
node_selector_overwrite_allowed = ".*"
allow_privilege_escalation = false
[[runners.kubernetes.services]]
[runners.kubernetes.dns_config]
[runners.kubernetes.pod_labels]
user = "ratchade"
Used GitLab Runner version
Possible fixes
Edited by Romuald Atchadé