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

feat: allow dynamic config of terminationGracePeriodSeconds to work with storage.vminsertConnsShutdownDuration flag #1147

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

Conversation

rl0nergan
Copy link

Relates to #744

Currently with larger vmclusters that may need more time to handle vmstorage rollouts, there's a storage.vminsertConnsShutdownDuration flag we can use to handle gracefully closing connections to vminsert while it rolls out. However the issue we're running into is that the operator uses a hard-coded value of 30s to set the grace period for delete, so we increasing the value used for the storage.vminsertConnsShutdownDuration flag doesn't help since vmstorage pods will always be killed after 30 seconds.

…ith storage.vminsertConnsShutdownDuration flag
@rl0nergan rl0nergan marked this pull request as ready for review November 5, 2024 21:09
@@ -252,7 +252,7 @@ func performRollingUpdateOnSts(ctx context.Context, podMustRecreate bool, rclien
for _, pod := range podsForUpdate {
l.Info("updating pod", "pod", pod.Name)
// we have to delete pod and wait for it readiness
err := rclient.Delete(ctx, &pod, &client.DeleteOptions{GracePeriodSeconds: ptr.To(int64(30))})
err := rclient.Delete(ctx, &pod, &client.DeleteOptions{GracePeriodSeconds: terminationGracePeriodSeconds})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to remove client.DeleteOptions from rclient.Delete args.
According to the documentation, it's only required to be set if lower period compared to the value defined at pod level is needed.

It should solve an issue with ignored terminationGracePeriodSeconds for all statefulset components.

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