If cluster support is enabled, and one server acquiesces in deference to the new server running crons, the currently running cron jobs could be killed if the server is stopped for some reason.
Ex. In a rolling deployment environment or in a Kubernetes CronJob, a new server/container instance may be started to take over the load. It's possible that the previous server/container running the cron will subsequently be killed by that process. If this happens, the previously running job threads could be abandoned and never observed to be completed.
Expected Behavior
When cluster support is enabled and the cron engine determines that it is no longer the leader/primary, it should not continue to start jobs, but it should also continue to monitor the jobs it has already started. Once all of that host's jobs have completed, the cron service should exit as normal.
Bug Description
If cluster support is enabled, and one server acquiesces in deference to the new server running crons, the currently running cron jobs could be killed if the server is stopped for some reason.
Ex. In a rolling deployment environment or in a Kubernetes CronJob, a new server/container instance may be started to take over the load. It's possible that the previous server/container running the cron will subsequently be killed by that process. If this happens, the previously running job threads could be abandoned and never observed to be completed.
Expected Behavior
When cluster support is enabled and the cron engine determines that it is no longer the leader/primary, it should not continue to start jobs, but it should also continue to monitor the jobs it has already started. Once all of that host's jobs have completed, the cron service should exit as normal.