Bug 1926484

Summary: API server exits non-zero on 2 SIGTERM signals
Product: OpenShift Container Platform Reporter: Mrunal Patel <mpatel>
Component: kube-apiserverAssignee: Stefan Schimanski <sttts>
Status: CLOSED ERRATA QA Contact: Mike Fiedler <mifiedle>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.7CC: aos-bugs, mfojtik, mifiedle, pmuller, wking, xxia
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1927500 (view as bug list) Environment:
Last Closed: 2021-07-27 22:42:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1927500    

Description Mrunal Patel 2021-02-08 21:09:16 UTC
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):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 1 W. Trevor King 2021-02-10 21:02:54 UTC
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 ;).

Comment 4 Petr Muller 2021-02-11 12:44:22 UTC
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.

Comment 5 Mike Fiedler 2021-02-11 19:13:38 UTC
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.

Comment 8 errata-xmlrpc 2021-07-27 22:42:29 UTC
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.