Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Terminating function pods should attempt a graceful shutdown. #1107

Closed
d0x2f opened this issue Jan 15, 2020 · 1 comment
Closed

Terminating function pods should attempt a graceful shutdown. #1107

d0x2f opened this issue Jan 15, 2020 · 1 comment

Comments

@d0x2f
Copy link
Contributor

d0x2f commented Jan 15, 2020

Is this a BUG REPORT or FEATURE REQUEST?:
FEATURE REQUEST

What happened:
When pods are terminated, active connections are closed.

What you expected to happen:
The function pod should attempt a graceful shutdown on sigterm with some configurable timeout.

How to reproduce it (as minimally and precisely as possible):

  1. Create a function that sleeps for 10 seconds or so and returns success.
  2. Trigger the function.
  3. Intentionally terminate the pod/docker container before the function completes

You'll get a socket hang up error.

Anything else we need to know?:
I might like to attempt a PR for this if you decide it's an feature worth having.
From what I can see it looks like it could be added relatively easily to the function proxy following this example: https://gist.github.com/peterhellberg/38117e546c217960747aacf689af3dc2

Environment:

  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.12-gke.16", GitCommit:"d40fd337c7a73c3720b57f23b8d1f21f1b2df7ca", GitTreeState:"clean", BuildDate:"2019-11-25T19:40:16Z", GoVersion:"go1.12.11b4", Compiler:"gc", Platform:"linux/amd64"}
  • Kubeless version (use kubeless version): Kubeless version: v1.0.4-dirty
  • Cloud provider or physical cluster: GKE
@d0x2f
Copy link
Contributor Author

d0x2f commented Jan 20, 2020

This issue can be closed.

@d0x2f d0x2f closed this as completed Jan 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant