Description of problem:
API server exits immediately if it received 2 SIGTERMs.
We use systemd scopes for containers in OpenShift today and they don't support mixed mode (See https://bugzilla.redhat.com/show_bug.cgi?id=1925623). So, to make sure that the API server can gracefully shutdown, we need to make it resilient to multiple SIGTERMs during reboot/shutdown.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Bug 1927500 is blocker+ for 4.7.0, so this will have to land before 4.8 to avoid regressing. Pretty sure that won't be a problem, but setting blocker+ here just to remove the question and hopefully save someone else a minute of process-time ;).
https://github.com/openshift/kubernetes/pull/558 merged and https://amd64.ocp.releases.ci.openshift.org/releasestream/4.8.0-0.nightly/release/4.8.0-0.nightly-2021-02-11-053857 includes it according to the changelog, but the test still failed in several jobs:
Sorry, I did not mention which test I mean, and this bug does not mention it: [sig-api-machinery][Feature:APIServer][Late] kubelet terminates kube-apiserver gracefully [Suite:openshift/conformance/parallel]
I got here via https://bugzilla.redhat.com/show_bug.cgi?id=1882750#c62 which says this is the proper bug that tracks this.
Verified on 4.8.0-0.ci-2021-02-11-165522
On 4.7: first SIGTERM to kube-apiserver starts shutdown, second SIGTERM kills it.
On 4.8: first SIGTERM starts shutdown, second SIGTERM is ignored and shutdown continues.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.