Closed echlebek closed 10 months ago
A few quick notes regarding reproducing this:
enable_round_robin: true
round-robin: true
triggers the executionenable_round_robin: false
, round-robin interval checks don't get restarted so there are small differences between etcd RR and Postgres RR ; unclear what's "correct" hereUnfortunately this problem is a design flaw. It would require an external central queue such as rabbitmq to alleviate, with agents connecting directly to it. We can't fix this in the 6.x version of Sensu.
Expected Behavior
Cron checks only execute when they are scheduled to do so.
Current Behavior
On backend startup, the cron check will execute once immediately, before resuming its scheduled operation.
Possible Solution
Suppress the initial execution by some mechanism.
Steps to Reproduce (for bugs)
Create any cron check, and restart the backend. Observe that the check executes immediately.
For example, create the following check:
Restart the backend(s) and observe that the event is created outside of the cron expression:
It also appears that the backends do indeed run round robin checks on startup:
Context
Discovered by a Sensu user in production. See https://secure.helpscout.net/conversation/2219824869/31348?folderId=1211661 for context.