RamenDR / ocm-ramen-samples

OCM Stateful application samples, including Ramen resources
Apache License 2.0
7 stars 65 forks source link

Avoids delay when terminating the busybox pod #24

Closed nirs closed 1 year ago

nirs commented 1 year ago

Without trapping SIGTERM, the signal will be ignored, and the pod will continue to run in Terminating state for 30 seconds.

Trapping SIGTERM is not enough; when sleeping 10 seconds, busybox sh will wait until the sleep command completes before handling the signal. We can avoid this delay by running sleep in the background and waiting for it.

Same fix applied to Reman test example here: https://github.com/RamenDR/ramen/pull/667