Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown http handlers before shutting down audit backend #50781

Closed
crassirostris opened this issue Aug 16, 2017 · 1 comment · Fixed by #53695
Closed

Shutdown http handlers before shutting down audit backend #50781

crassirostris opened this issue Aug 16, 2017 · 1 comment · Fixed by #53695
Assignees
Labels
area/audit sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@crassirostris
Copy link

Follow-up of #50026

Currently, audit backend is shut down before http handlers stop processing requests, so some audit events can be dropped in case of batching webhook. As a solution, during a shutdown, apiserver should close and wait until all requests are finished before shutting down the audit logging. Note, that just not accepting new requests is not enough, since audit events can be generated on every stage of the requests.

/cc @sttts @soltysh @kubernetes/sig-api-machinery-bugs

@crassirostris crassirostris added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Aug 16, 2017
@mml
Copy link
Contributor

mml commented Aug 17, 2017

/sig instrumentation
/assign @tallclair

@k8s-ci-robot k8s-ci-robot added the sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. label Aug 17, 2017
@mml mml removed the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Aug 17, 2017
@sttts sttts added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. labels Aug 21, 2017
@sttts sttts self-assigned this Aug 21, 2017
k8s-github-robot pushed a commit that referenced this issue Oct 28, 2017
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Shutdown http handlers before shutting down audit backend

**What this PR does / why we need it**:
Currently, audit backend is shut down before http handlers stop processing requests, so some audit events can be dropped in case of batching webhook.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50781

**Special notes for your reviewer**:

**Release note**:

```release-note
Shutdown http handlers in kube-apiserver before shutting down audit backend.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/audit sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants