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

Speed up the default preStop hook to allow for graceful shutdown #3909

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nemacysts
Copy link
Member

The default PaaSTA preStop hook sleeps for 30s - which is exactly the same as the default termination grace period, therefore preventing anything that gets this default hook from being able to gracefully shutdown.

We could (should?) look into simply not adding a hook for things that don't need one (i.e., not mesh-registed and no custom hooks), but in the meantime adding a silly message doesn't seem particularly harmful.

nemacysts added 4 commits July 1, 2024 12:04
The default PaaSTA preStop hook sleeps for 30s - which is exactly the
same as the default termination grace period, therefore preventing
anything that gets this default hook from being able to gracefully
shutdown.

We could (should?) look into simply not adding a hook for things that
don't need one (i.e., not mesh-registed and no custom hooks), but in the
meantime adding a silly message doesn't seem particularly harmful.
I missed that the special-cased preStop is only on the hacheck
container. If a pod is mesh-registered, the main container needs to
sleep for as long as the hacheck sidecar to allow requests to drain.
@nemacysts nemacysts marked this pull request as ready for review July 1, 2024 19:38
@nemacysts
Copy link
Member Author

i haven't tested this in infrastage/kubestage yet - but the unit tests are passing on my devbox :p

@nemacysts
Copy link
Member Author

(i'll try to test this in infrastage tomorrow)

@nemacysts
Copy link
Member Author

(although the routable pod big bounce test not firing is a good sign :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants