-
Notifications
You must be signed in to change notification settings - Fork 593
Description
Background:
The OCI hooks mechanism looks like a good place to register container in discovery service or add it to load balancer pool - as we have Prestart and Poststart hooks, but there is a problem when we want to remove old containers after new version deployment. We only have Poststop hook which is fired during container deletion (so process inside container is already dead), which in practice makes impossible to gracefully remove old containers (e.g. by using load balancer connection draining feature). When a single container handles high traffic (thousands of requests per seconds) it ends with a lot of 502 HTTP errors for the site users. Currently each popular container management software provides some way to achieve graceful container removal (Kubernetes has PostStart/PreStop container lifecycle hooks, on Mesos we can write custom executors with that logic), but OCI spec is missing that feature.
Question:
Can the OCI spec be extended to allow to do some actions before container process stop in a standardised way?